Skip to main content

LoongSuite DeepAgents Instrumentation

LoongSuite instrumentation for DeepAgents.

Installation

pip install loongsuite-instrumentation-deepagents

Usage

from opentelemetry.instrumentation.deepagents import DeepAgentsInstrumentor

DeepAgentsInstrumentor().instrument()

from deepagents import create_deep_agent

When instrumenting manually, call DeepAgentsInstrumentor().instrument() before importing or binding deepagents.create_deep_agent. Auto-instrumentation runs before application imports and does not need this extra ordering step.

What it does

This instrumentation patches deepagents.graph.create_deep_agent so the final graph returned by DeepAgents is marked with _loongsuite_react_agent = True. It also marks the graph as a DeepAgents agent and injects the same flags into call-time RunnableConfig metadata for invoke, ainvoke, stream, and astream.

The marker is consumed by loongsuite-instrumentation-langchain, which routes the DeepAgents root graph span as an AGENT span instead of a generic CHAIN span.

The LangChain tracer also maps each DeepAgents model decision node to a react step span. Multi-round tool flows end the previous step with gen_ai.react.finish_reason = "tool_calls" and the final step with "stop". This package intentionally does not create separate ENTRY spans or GenAI metrics.

For DeepAgents skills, the framework first loads skill metadata through SkillsMiddleware.before_agent and exposes the available skills in the system prompt. Loading the full skill instructions happens when the agent calls the built-in filesystem tool to read the skill file, for example read_file(file_path="/skills/foo/SKILL.md"). That execute_tool read_file span is annotated with gen_ai.skill.name, gen_ai.skill.id, gen_ai.skill.description, and gen_ai.skill.version when the file path matches a registered top-level SKILL.md. Reading helper files under the same skill directory is recorded as a normal file read, not as a skill load.

Compatibility

  • deepagents >= 0.6.0, < 0.7.0
  • Python 3.11+

Metadata

Release files for loongsuite-instrumentation-deepagents 0.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for loongsuite-instrumentation-deepagents 0.9.0
File Interpreter ABI Platform Actions
loongsuite_instrumentation_deepagents-0.9.0-py3-none-any.whl Python 3 none any Details for loongsuite_instrumentation_deepagents-0.9.0-py3-none-any.whl

Release files / loongsuite_instrumentation_deepagents-0.9.0-py3-none-any.whl

Download URL loongsuite_instrumentation_deepagents-0.9.0-py3-none-any.whl
Size 8.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
72b98e8ea09db175a9c293a906681e1ad231b9f8fbada10398b49a0c066767a8
BLAKE2b-256 checksum
How to use checksums
1fbf68f592dde30fc96bb874caf8090c6a9e784c7c3cc20d010de4761d3fc27b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Security for loongsuite-instrumentation-deepagents 0.9.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page