Skip to main content
Open Agent Spec is Oracle’s portable, platform-agnostic configuration language for describing agents and agentic systems. Its tracing extension standardizes how agent and flow executions emit traces across runtime adapters. Arize AX captures every Agent Spec run — agent invocations, LLM turns, and tool calls — via the openinference-instrumentation-agentspec package.

Prerequisites

  • Python 3.10+
  • An Arize AX account (sign up)
  • An OPENAI_API_KEY from the OpenAI Platform (the example loads the Agent Spec agent through the LangGraph adapter, which calls OpenAI)

Launch Arize AX

  1. Sign in to your Arize AX account.
  2. From Space Settings, copy your Space ID and API Key. You will set them as ARIZE_SPACE_ID and ARIZE_API_KEY below.

Install

The langgraph extra pulls the LangGraph adapter (and langchain-openai) that turns an Agent Spec definition into a runnable agent:

Configure credentials

Setup tracing

Run Open Agent Spec

Expected output

Verify in Arize AX

  1. Open your Arize AX space and select project agentspec-tracing-example.
  2. You should see a new trace within ~30 seconds with an AgentExecution[assistant] AGENT span carrying the prompt as input and the agent’s answer as output, wrapping an LlmGenerationSpan LLM child span with the model call and token usage. Any tools the agent invokes appear as child TOOL spans with their inputs and outputs.
  3. If no traces appear, see Troubleshooting.

Check from the skill, CLI, or SDK

Confirm spans are actually reaching your Arize AX project. Use whichever fits your workflow — the skill and CLI work for any framework; the SDK check is shown for each language.
Install the Arize Skills plugin and let your coding agent check for you:
Then prompt your agent:
Use the arize-trace skill to export and analyze recent traces from my project. Confirm spans are arriving, and summarize any errors or latency issues.

Troubleshooting

  • No traces in Arize AX. Confirm ARIZE_SPACE_ID and ARIZE_API_KEY are set in the same shell that runs example.py. Enable OpenTelemetry debug logs with export OTEL_LOG_LEVEL=debug and re-run.
  • Agent spans missing. AgentSpecInstrumentor().instrument(...) must run before the agent is loaded and invoked. Make sure instrumentation.py is the first import in your entry point.
  • ModuleNotFoundError: No module named 'langgraph'. Install the LangGraph adapter with the langgraph extra: pip install "pyagentspec[langgraph]". Other runtime adapters (agent-framework, autogen, crewai) have their own extras.
  • 401 from OpenAI. Verify OPENAI_API_KEY is set and has access to the model in the example. Swap gpt-5.4-mini for a model your key can call.

Resources

Open Agent Spec Documentation

Agent Spec Tracing

OpenInference Agent Spec Instrumentor