Observed since 20 Oct, 23:02 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
AgentQ SDK — agent observability for Python.
A Python SDK for instrumenting AI agents with observability. Traces agent runs, LLM calls, and tool invocations, sending data to an AgentQ server via OpenTelemetry.
pip install agentq
For auto-instrumentation of specific LLM providers, install them alongside:
pip install agentq openai anthropic google-genai
import agentq
# Point to your AgentQ server
agentq.init(endpoint="http://localhost:3000")
# Auto-patch supported LLM libraries
agentq.instrument()
@agentq.agent(name="my-agent")
def run_task(prompt: str) -> str:
# Any OpenAI/Anthropic/Gemini calls inside here are traced automatically
response = openai.chat.completions.create(
model="gpt-4",
messages=[{"role": "user", "content": prompt}],
)
return response.choices[0].message.content
@agent decorator -- Wraps functions and classes to create traced runs with input/output capturesession context manager@agent calls and manual track_agent/track_llm/track_tool spansagentq.init(endpoint, headers, service_name)Initialize the SDK. Call once at startup.
endpoint -- OTLP HTTP base URL (e.g. http://localhost:3000). Falls back to OTEL_EXPORTER_OTLP_ENDPOINT.headers -- Extra headers for OTLP requests (e.g. {"Authorization": "Bearer sk-xxx"}).service_name -- Value for the service.name resource attribute (default: "agentq").agentq.instrument()Activate auto-instrumentation for OpenAI, Anthropic, Google Gemini, and Celery. Safe to call even if libraries aren't installed.
@agentq.agent(name, entry_method, description, version, metadata)Decorator for functions or classes. Creates a traced run for each invocation.
For classes, entry_method specifies which method(s) to instrument (default: "execute").
agentq.session(name, session_id, run_id, metadata)Context manager that groups runs into a session:
with agentq.session(name="user-chat"):
run_task("Hello")
run_task("Follow up")
with agentq.track_agent("sub-agent") as span:
...
with agentq.track_llm("gpt-4") as span:
...
with agentq.track_tool("web-search") as span:
...
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.1.0 | 7 Apr 2026 | 7 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 23:02 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:b0f12d0793a57bf14b6aafa6884f4cd7711c53a450cf1180332a2c5f2477ad51