Skip to content

Comments

GenAI Utils | Add _BaseAgent base class and agent creation lifecycle#4217

Open
etserend wants to merge 6 commits intoopen-telemetry:mainfrom
etserend:genai-utils/agent-base-and-creation
Open

GenAI Utils | Add _BaseAgent base class and agent creation lifecycle#4217
etserend wants to merge 6 commits intoopen-telemetry:mainfrom
etserend:genai-utils/agent-base-and-creation

Conversation

@etserend
Copy link

@etserend etserend commented Feb 19, 2026

Description

The GenAI Utils package includes boilerplate and helpers to standardize instrumentation for Generative AI.

This PR adds the foundational agent type hierarchy and creation lifecycle. It provides a shared _BaseAgent base class and an AgentCreation type, along with TelemetryHandler methods to start, stop, and fail agent creation spans — aligned with the GenAI agent span semantic conventions.

Agent invocation type (invoke_agent), metrics, and events to come in follow-up PRs.

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • Basic unit tests for starting and stopping agent creation spans
  • Unit tests for context manager happy path and error path
  • Unit tests for AgentCreation

Does This PR Require a Core Repo Change?

  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@etserend etserend force-pushed the genai-utils/agent-base-and-creation branch from e8e9669 to bbcbded Compare February 19, 2026 17:23
@etserend etserend marked this pull request as ready for review February 23, 2026 15:54
@etserend etserend requested a review from a team as a code owner February 23, 2026 15:54
@tammy-baylis-swi tammy-baylis-swi moved this to Ready for review in @xrmx's Python PR digest Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Ready for review

Development

Successfully merging this pull request may close these issues.

4 participants