Amazon Bedrock Agents are managed agents you define, prepare, and deploy on AWS. Arize AX captures every Bedrock Agent invocation — the agent’s reasoning steps, action-group (tool) calls, knowledge-base lookups, and the underlying LLM calls — via theDocumentation Index
Fetch the complete documentation index at: https://arize-ax.mintlify.dev/docs/llms.txt
Use this file to discover all available pages before exploring further.
openinference-instrumentation-bedrock package (the same instrumentor used by the Amazon Bedrock tracing guide for plain invoke_model / converse calls).
Prerequisites
- Python 3.10+
- An Arize AX account (sign up)
- An AWS account with:
- Bedrock model access enabled for the foundation model your agent uses
- A deployed Bedrock Agent in the
PREPAREDstate, with a callable agent alias. Create one from the Bedrock console or via thebedrock-agent(control-plane) API — see Create an agent. You’ll need the agent ID (e.g.WYHKWZQCFM) and the agent alias ID (e.g.TSTALIASIDfor the auto-generated draft, or a custom alias) to invoke it.
Launch Arize AX
- Sign in to your Arize AX account.
- From Space Settings, copy your Space ID and API Key. You will set them as
ARIZE_SPACE_IDandARIZE_API_KEYbelow.
Install
Configure credentials
Setup tracing
Run Amazon Bedrock Agents
Expected output
Verify in Arize AX
- Open your Arize AX space and select project
amazon-bedrock-agents-tracing-example. - You should see a new trace within ~30 seconds containing a
bedrock_agent.invoke_agentparent span (AGENT) wrapping per-step orchestration spans, anybedrock_agent.action_group_invocation(TOOL) orbedrock_agent.knowledge_base_lookup(RETRIEVER) spans your agent uses, and abedrock_agent.llmLLM span (with the prompt, response, and token usage attached). - If no traces appear, see Troubleshooting.
Troubleshooting
- No traces in Arize AX. Confirm
ARIZE_SPACE_IDandARIZE_API_KEYare set in the same shell that runsexample.py. Enable OpenTelemetry debug logs withexport OTEL_LOG_LEVEL=debugand re-run. - Bedrock Agents spans missing but other spans present.
BedrockInstrumentor().instrument(...)must run beforeboto3.client("bedrock-agent-runtime", ...)is called. Make sureinstrumentation.pyis the first import in your entry point — clients created before instrumentation aren’t patched. ValidationException: Agent <agent_id> is not in PREPARED state. A newly-created agent stays inNOT_PREPAREDuntil you click Prepare in the console (or callbedrock_agent.prepare_agent(agentId=...)followed by polling untilagentStatus == "PREPARED"). Agents must be re-prepared after any change to instructions, action groups, or knowledge bases.ResourceNotFoundException: ... agent alias .... A “draft” agent has no callable alias by default — the auto-generated test aliasTSTALIASIDonly works once the agent is prepared. Create an alias via the Aliases tab in the Bedrock console orbedrock_agent.create_agent_alias(agentId=..., agentAliasName=...).AccessDeniedException. Your IAM principal needsbedrock:InvokeAgent(note: different permission frombedrock:InvokeModelused by the plain Bedrock tracing guide) plus model-access for the underlying foundation model.- Only LLM spans, no agent-reasoning spans. Make sure
enableTrace=Trueis in theinvoke_agentcall — without it, Bedrock returns only the final answer chunks and the instrumentor has no orchestration data to build the span tree.