Documentation 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.
Trace Kiro CLI agent turns, tool calls, and credit usage in Arize AX for full observability.
Kiro is AWS’s agentic IDE and CLI for spec-driven development. The Arize Harness Tracing registers hooks on a Kiro agent and exports OpenInference spans to Arize AX or Phoenix. Each agent turn is captured as an LLM span with tool calls, model info, credit cost, and turn duration.
Launch Arize
To get started, sign up for a free Arize account and get your Space ID and API Key:
- Log in at app.arize.com
- Click Settings and copy the Space ID
- Open the API Keys tab and create or copy an API key
Install
Curl installer
macOS / Linux:
curl -sSL https://raw.githubusercontent.com/Arize-ai/arize-harness-tracing/main/install.sh | bash -s -- kiro
Windows (PowerShell):
iwr -useb https://raw.githubusercontent.com/Arize-ai/arize-harness-tracing/main/install.bat -OutFile $env:TEMP\install.bat
& $env:TEMP\install.bat kiro
Local clone
git clone https://github.com/Arize-ai/arize-harness-tracing.git
cd arize-harness-tracing
./install.sh kiro # macOS / Linux
install.bat kiro # Windows
The installer prompts you through:
- Agent name — the Kiro agent to install hooks into (default:
arize-traced)
- Set as default — whether to run
kiro-cli agent set-default <name> so the agent is used by default
- Backend — Phoenix or Arize AX, plus endpoint and credentials
- Project name — project name in your backend (default:
kiro)
- User ID — optional user identifier added to all spans
- Logging — whether to include prompt text, tool content, and tool details in spans
Redaction controls
The installer prompts you to enable or disable each content category; preferences are stored under logging in config.yaml. Set any flag to false to opt out:
logging:
log_prompts: false
log_tool_details: false
log_tool_content: false
| Flag | Redacts |
|---|
log_prompts | User prompt and assistant response text |
log_tool_details | Tool names and arguments |
log_tool_content | Tool call output content |
Run
If you set the traced agent as Kiro’s default during install:
Otherwise, point Kiro at the agent explicitly:
kiro-cli chat --agent arize-traced
Observe
Once tracing is enabled, Kiro activity is streamed to Arize. You’ll see:
- Turn traces — each agent turn (user prompt to assistant response) as a parent LLM span
- Tool call spans — one per pre/post tool event pair, parented to the LLM turn
- Session grouping — all turns from the same Kiro session grouped by
session.id
- Credit cost — Kiro meters in credits rather than tokens; cost is captured as
kiro.cost.credits
- Model and duration —
llm.model_name, kiro.turn_duration_ms, and kiro.context_usage_percentage from the session sidecar
Hooks Captured
| Hook | Span Kind | Description |
|---|
agentSpawn | CHAIN | Agent spawned, trace/tool counters reset |
userPromptSubmit | CHAIN | User prompt captured, session lazy-initialized |
preToolUse | TOOL | Tool invocation started, records tool name and input |
postToolUse | TOOL | Tool invocation completed, records output and duration |
stop | LLM | Model response completed with input/output values |
Span attributes
LLM spans are enriched from the session sidecar at ~/.kiro/sessions/cli/<session_id>.json with model name, cost in credits, metering usage, and turn duration. Enrichment is fail-soft — if the sidecar is unavailable, the span is emitted with basic attributes only.
| Attribute | Description |
|---|
session.id | Kiro session UUID |
llm.model_name | Model ID from the session sidecar |
kiro.cost.credits | Cost in credits from metering data |
kiro.metering_usage | Full metering usage JSON |
kiro.turn_duration_ms | Turn duration in milliseconds |
kiro.agent_name | Name of the Kiro agent |
kiro.context_usage_percentage | Context window usage percentage |
Known limitations
- Token counts are 0. Kiro CLI does not report prompt or completion token counts in current versions and meters in credits instead. Token count attributes are omitted when 0; see
kiro.cost.credits.
- FIFO tool matching. Kiro does not expose a tool-call ID, so pre/post tool events are matched using a FIFO stack. This assumes serial tool execution within a session.
- Per-workspace agents not supported. Only global agents under
~/.kiro/agents/ are instrumented.
Reference
For the full list of environment variables, default file paths, and troubleshooting steps, see the Kiro tracing README.
Uninstall
curl -sSL https://raw.githubusercontent.com/Arize-ai/arize-harness-tracing/main/install.sh | bash -s -- uninstall kiro
Uninstall removes hook entries from every Kiro agent file. If the arize-traced agent was created by the installer, that agent file is deleted; pre-existing agents are preserved.
Resources