Skip to main content

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:
  1. Log in at app.arize.com
  2. Click Settings and copy the Space ID
  3. 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:
  1. Agent name — the Kiro agent to install hooks into (default: arize-traced)
  2. Set as default — whether to run kiro-cli agent set-default <name> so the agent is used by default
  3. Backend — Phoenix or Arize AX, plus endpoint and credentials
  4. Project name — project name in your backend (default: kiro)
  5. User ID — optional user identifier added to all spans
  6. 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
FlagRedacts
log_promptsUser prompt and assistant response text
log_tool_detailsTool names and arguments
log_tool_contentTool call output content

Run

If you set the traced agent as Kiro’s default during install:
kiro-cli chat
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 durationllm.model_name, kiro.turn_duration_ms, and kiro.context_usage_percentage from the session sidecar

Hooks Captured

HookSpan KindDescription
agentSpawnCHAINAgent spawned, trace/tool counters reset
userPromptSubmitCHAINUser prompt captured, session lazy-initialized
preToolUseTOOLTool invocation started, records tool name and input
postToolUseTOOLTool invocation completed, records output and duration
stopLLMModel 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.
AttributeDescription
session.idKiro session UUID
llm.model_nameModel ID from the session sidecar
kiro.cost.creditsCost in credits from metering data
kiro.metering_usageFull metering usage JSON
kiro.turn_duration_msTurn duration in milliseconds
kiro.agent_nameName of the Kiro agent
kiro.context_usage_percentageContext 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