decimalai.agent_config() for model calls you make yourself. Microsoft Agent Framework and Strands are traced the OpenTelemetry way below and have skill loaders of their own.
Install
DECIMAL_API_KEY: decimalai.init() raises without one.
LlamaIndex
init(llamaindex=True) installs a span handler on LlamaIndex’s instrumentation dispatcher, which records every query engine call, retriever hop and model call:
- What’s installed. The extra brings
llama-index-core>=0.14.25, which ships no model bindings. LlamaIndex defaults to OpenAI’s, which the install’s last line supplies. For another provider, pointSettings.embed_modelandSettings.llmat its bindings. - The name. Runs are filed under
agent_nameorDECIMAL_AGENT_NAME, and underllamaindex-agentwhen nothing names one. - What’s recorded. Query engine, retriever and synthesizer spans, embedding calls with token counts, and model calls with the full prompt. The manifest (the agent’s setup, which DecimalAI versions) comes from the query engine’s config and holds tool names only. For tool schemas, use
register_manifest(). - Install it once.
decimalai.llamaindex.instrument(agent_name=...)is the by-hand form of the flag. LlamaIndex’s dispatcher keeps every handler it’s given, so a second install makes one query send two traces.
Several agents in one process
One handler serves the whole process, so name the run instead of the install, withagent_run:
asyncio task, not around the dispatch. LlamaIndex’s own instrument_tags({"agent_name": "..."}) wins when both are set.
OpenTelemetry and Haystack
init(otel=True) puts DecimalAI’s exporter on the global tracer provider. The exporter reads span attributes, so anything that puts gen_ai.* spans on that provider is recorded: a framework’s own instrumentor, or a span you open yourself:
The exporter reads OpenInference’s
llm.* attributes too, which is how Haystack gets here: pip install openinference-instrumentation-haystack, call decimalai.init(otel=True), then HaystackInstrumentor().instrument().
Spans leave within about five seconds and at exit, and decimalai.flush() sends them at once. The manifest is built from what the spans show. For tool schemas, use register_manifest().
AutoGen and AG2
Neither is an integration.decimalai.init(autogen=True) and decimalai.autogen.instrument() still run, but they only install the same exporter as init(otel=True) and log a warning, so nothing instruments your agents for you.
AG2 emits no spans until you call autogen.opentelemetry.instrument_llm_wrapper(capture_messages=True) once and autogen.opentelemetry.instrument_agent(agent) per agent. Its spans then arrive like any others. The classic autogen package is frozen at 0.14.1, because AG2 moved to the ag2 package, which no longer provides the autogen API.
Microsoft’s autogen-core and autogen-agentchat are a different framework. Their spans reach the exporter, but carry no model or token counts.
Direct provider tracing
For raw SDK calls with no framework,init(openai=True), init(anthropic=True) or init(google=True) traces every openai, anthropic or google.genai call in the process:
- Each flag needs its instrumentor. Install
openinference-instrumentation-openai,-anthropicor-google-genai. Without it, the flag warns and skips. - Each call is its own trace. To group a run’s calls into one trace, wrap them in
agent_run. - Don’t combine it with a framework flag that traces the same provider, or each call is recorded twice.
agent_config().