Skip to content

feat(llmobs): [MLOB-2662] [MLOB-3100] add agent manifest#13311

Merged
ncybul merged 104 commits intomainfrom
nicole-cybul/agent-manifest-instrumentation
Jul 24, 2025
Merged

feat(llmobs): [MLOB-2662] [MLOB-3100] add agent manifest#13311
ncybul merged 104 commits intomainfrom
nicole-cybul/agent-manifest-instrumentation

Conversation

@ncybul
Copy link
Copy Markdown
Contributor

@ncybul ncybul commented May 1, 2025

This PR adds instrumentation for the agent manifest for our LLM Obs agentic integrations (minus LangGraph which will be covered in @sabrenner's PR). I have been using this doc to track what information is available in the Agent Manifest for each integration, but a summary is below:

Agent Manifest Schema

Crew AI

  • Framework
  • Name
  • Goal
  • Backstory
  • Model
  • Model Settings
  • Tools
  • Handoffs
  • Code Execution Permissions
  • Max Iterations
image

Open AI Agents

  • Framework
  • Name
  • Instructions
  • Handoff Description
  • Model
  • Model Settings
  • Tools
  • Handoffs
  • Guardrails
image

PydanticAI

  • Framework
  • Name
  • Instructions
  • System Prompts
  • Model
  • Model Settings
  • Tools
  • Dependencies
image

Next Steps

  • Make the current Agent Manifest UI work for the new fields that have been added

Checklist

  • PR author has checked that all the criteria below are met
  • The PR description includes an overview of the change
  • The PR description articulates the motivation for the change
  • The change includes tests OR the PR description describes a testing strategy
  • The PR description notes risks associated with the change, if any
  • Newly-added code is easy to change
  • The change follows the library release note guidelines
  • The change includes or references documentation updates if necessary
  • Backport labels are set (if applicable)

Reviewer Checklist

  • Reviewer has checked that all the criteria below are met
  • Title is accurate
  • All changes are related to the pull request's stated goal
  • Avoids breaking API changes
  • Testing strategy adequately addresses listed risks
  • Newly-added code is easy to change
  • Release note makes sense to a user of the library
  • If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment
  • Backport labels are set in a manner that is consistent with the release branch maintenance policy

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2025

CODEOWNERS have been resolved as:

releasenotes/notes/tag-agent-manifest-fa6c399b5ec46e18.yaml             @DataDog/apm-python
tests/contrib/openai_agents/cassettes/test_single_agent_with_ootb_tools.yaml  @DataDog/ml-observability
ddtrace/contrib/internal/openai_agents/patch.py                         @DataDog/ml-observability
ddtrace/llmobs/_constants.py                                            @DataDog/ml-observability
ddtrace/llmobs/_integrations/crewai.py                                  @DataDog/ml-observability
ddtrace/llmobs/_integrations/openai_agents.py                           @DataDog/ml-observability
ddtrace/llmobs/_integrations/pydantic_ai.py                             @DataDog/ml-observability
ddtrace/llmobs/_integrations/utils.py                                   @DataDog/ml-observability
ddtrace/llmobs/_llmobs.py                                               @DataDog/ml-observability
ddtrace/llmobs/_utils.py                                                @DataDog/ml-observability
tests/contrib/crewai/test_crewai_llmobs.py                              @DataDog/ml-observability
tests/contrib/openai_agents/conftest.py                                 @DataDog/ml-observability
tests/contrib/openai_agents/test_openai_agents_llmobs.py                @DataDog/ml-observability
tests/contrib/pydantic_ai/test_pydantic_ai_llmobs.py                    @DataDog/ml-observability
tests/contrib/pydantic_ai/utils.py                                      @DataDog/ml-observability

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2025

Bootstrap import analysis

Comparison of import times between this PR and base.

Summary

The average import time from this PR is: 283 ± 4 ms.

The average import time from base is: 286 ± 4 ms.

The import time difference between this PR and base is: -2.3 ± 0.2 ms.

Import time breakdown

The following import paths have shrunk:

ddtrace.auto 2.063 ms (0.73%)
ddtrace.bootstrap.sitecustomize 1.385 ms (0.49%)
ddtrace.bootstrap.preload 1.385 ms (0.49%)
ddtrace.internal.remoteconfig.client 0.682 ms (0.24%)
ddtrace 0.678 ms (0.24%)
ddtrace.internal._unpatched 0.030 ms (0.01%)
json 0.030 ms (0.01%)
json.decoder 0.030 ms (0.01%)
re 0.030 ms (0.01%)
enum 0.030 ms (0.01%)
types 0.030 ms (0.01%)

@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented May 1, 2025

Benchmarks

Benchmark execution time: 2025-07-16 20:53:43

Comparing candidate commit dc1036c in PR branch nicole-cybul/agent-manifest-instrumentation with baseline commit ff294ae in branch main.

Found 0 performance improvements and 1 performance regressions! Performance is the same for 546 metrics, 3 unstable metrics.

scenario:telemetryaddmetric-flush-1-metric

  • 🟥 execution_time [+381.238ns; +458.769ns] or [+9.285%; +11.173%]

@ncybul ncybul changed the title add agent manifest feat(llmobs): [MLOB-2662] add agent manifest May 7, 2025
@github-actions github-actions Bot added the stale label Jun 13, 2025
@github-actions
Copy link
Copy Markdown
Contributor

This pull request has been automatically closed after a period of inactivity.
After this much time, it will likely be easier to open a new pull request with the
same changes than to update this one from the base branch. Please comment or reopen
if you think this pull request was closed in error.

@github-actions github-actions Bot closed this Jun 15, 2025
Copy link
Copy Markdown
Contributor

@sabrenner sabrenner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, super cool!! did a first pass and mostly just some cleanup stuff, most of the actual implementation lgtm

Comment thread ddtrace/contrib/internal/openai_agents/patch.py Outdated
Comment thread ddtrace/contrib/internal/openai_agents/patch.py Outdated
Comment thread ddtrace/contrib/internal/openai_agents/patch.py Outdated
Comment thread ddtrace/contrib/internal/openai_agents/patch.py Outdated
Comment thread ddtrace/contrib/internal/openai_agents/utils.py Outdated
Comment thread ddtrace/llmobs/_integrations/pydantic_ai.py Outdated
Comment thread ddtrace/llmobs/_integrations/pydantic_ai.py Outdated
Comment thread ddtrace/llmobs/_integrations/pydantic_ai.py Outdated
Comment thread ddtrace/llmobs/_integrations/pydantic_ai.py Outdated
Comment thread tests/contrib/openai_agents/test_openai_agents_llmobs.py Outdated
Copy link
Copy Markdown
Contributor

@sabrenner sabrenner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice! lgtm - just a couple small comments

Comment thread ddtrace/llmobs/_integrations/openai_agents.py Outdated
Comment thread ddtrace/llmobs/_integrations/openai_agents.py Outdated
Comment thread ddtrace/llmobs/_integrations/openai_agents.py Outdated
Comment thread ddtrace/llmobs/_integrations/openai_agents.py Outdated
Comment thread ddtrace/llmobs/_integrations/openai_agents.py Outdated
Comment thread ddtrace/llmobs/_integrations/openai_agents.py Outdated
@ncybul ncybul merged commit 40bf75c into main Jul 24, 2025
469 checks passed
@ncybul ncybul deleted the nicole-cybul/agent-manifest-instrumentation branch July 24, 2025 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants