Trace Devin CLI interactions, model calls, token usage, and tool calls in Arize AX for full observability.Devin is Cognition’s autonomous software engineer. The Arize Coding Harness Tracing instruments the Devin CLI and exports OpenInference spans to Arize AX. Each agent interaction emits its own trace: a root AGENT span, per-generation LLM spans with real token counts, and TOOL spans for tool calls. Devin’s hook payloads are thin, carrying no session ID and no token or model data, so the rich content is read from Devin’s live SQLite session database instead. The harness registers a
Stop hook that fires at the end of each agent response: it resolves the session, reads the generations that have appeared since the last emission, and emits one self-contained trace for that interaction. Traces therefore appear as each interaction completes, not only after the session exits. A SessionEnd hook is also registered as a final flush for an interrupted last turn.
Launch Arize AX
To get started, sign up for a free Arize AX 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:Local clone
~/.arize/harness/config.json and registers Stop and SessionEnd command hooks under the top-level hooks key in Devin’s user config: ~/.config/devin/config.json on macOS and Linux, %APPDATA%\devin\config.json on Windows.
The installer runs a short interactive setup. Every harness in the Arize Coding Harness Tracing repo asks the same questions, in the same order.
Setup walkthrough
1. Backend selection
Choose where spans are sent:- Phoenix — your own Phoenix instance.
- Arize AX — the hosted Arize platform.
2. Credentials
The prompts depend on the backend you picked.- Arize AX
- Phoenix
- API key — create one on the API keys tab.
- Space ID — shown on the same settings tab as your API keys.
- OTLP endpoint — defaults to
otlp.arize.com:443. Override it only for a hosted or dedicated instance.
3. Project name
The project that this harness’s spans are grouped under. Defaults to the harness name.4. User ID (optional)
A free-form identifier attached to every span asuser.id. Useful when teammates share one backend. Leave it blank to skip.
5. Content logging
Three[Y/n] opt-outs that apply to every harness, not only the one you are installing:
- Log user prompts?
- Log what tools were asked to do (commands, file paths, URLs)?
- Log what tools returned (file contents, command output)?
logging block in ~/.arize/harness/config.json, which you can edit at any time.
Install flags
Non-interactive install
Pass--non-interactive (or -y) to skip every prompt above and take each value from the environment instead. Nothing is asked, and a missing required value is an error rather than a prompt, which makes this the mode to use from a script, from CI, or when a coding agent is driving the install itself.
Values come from the environment, or from a dotenv file named explicitly with ARIZE_ENV_FILE. Naming a file keeps the API key out of the command line and your shell history.
Content logging is off by default in this mode, unlike the interactive wizard where each question defaults to yes. A
[Y/n] default is a person declining to change an answer they were shown; the same default unattended would capture prompts, commands, and file contents that nobody agreed to. Set the ARIZE_LOG_* variables you want to true.Check what’s installed
status reports which harnesses are configured and whether their hooks are actually wired into each harness’s own settings file. Both have to be true for traces to appear.
hooks: NOT registered means credentials are saved but the harness was never wired up, or something removed the hooks. Re-run the install for that harness.
Use --json from a script or a coding agent to gate on the exit code without parsing output: 0 means every configured harness is wired up, 1 means nothing is configured, and 2 means at least one harness’s hooks are missing. The payload contains no secrets — an API key appears only as "api_key_present": true — so it is safe to paste into a bug report.
Keep it up to date
update pulls the latest code and re-registers every harness already in config.json.
config.json.
Configuration
Credentials live in~/.arize/harness/config.json. Environment variables override values in config.json and can be set in your shell profile so they apply to every Devin session.
Redaction controls
EachARIZE_LOG_* flag accepts "true" or "false" and defaults to "true". Set to "false" to opt out per category:
Default settings
On Windows only the config file moves, to
%APPDATA%. The sessions database stays home-relative at %USERPROFILE%\.local\share\devin\cli\sessions.db, the same layout as macOS and Linux. If traces do not appear, check ~/.arize/harness/logs/devin.log for the database path the hook tried.Observe
Once tracing is enabled, Devin activity is streamed to Arize AX. Each agent interaction is captured as a trace.Spans Captured
- Interaction traces — one root AGENT span per agent response, carrying the user prompt as input, the final assistant text as output, the model name, and interaction token totals
- LLM spans — one per real model generation, with that generation’s prompt, completion, and cache token counts, model name, and reasoning content
- Tool spans — one per tool call, parented to the LLM span that issued it, with the serialized tool arguments as input
- Session grouping — interactions from the same session grouped by
session.id
metadata.request_id. Devin rebuilds the message chain as the conversation grows, so the same generation reappears under new node IDs, and a per-session, per-request watermark ensures each generation is emitted exactly once. The database is opened read-only in WAL-respecting mode, so the newest turn’s rows are visible without disturbing Devin’s writers.
Span shape
The root AGENT span carriessession.id, input.value, output.value, llm.model_name, the llm.token_count.* totals (including prompt_details.cache_read and prompt_details.cache_write), project.name, an optional user.id, and devin.backend for the agent backend.
What does not carry over
- LLM spans do not carry
input.value. The per-generation prompt messages sent to the model are not reconstructed from the database, so the interaction’s user prompt lives on the root AGENT span instead. A generation that issued only tool calls, with no assistant text or reasoning, has an emptyoutput.value; its visible output appears on the later generation that answers the user. No output is lost, it is attributed to the generation that produced it. - Tool output is best-effort. Tool results are not reliably present in the live database at the moment
Stopfires, so a TOOL span may carry only its input arguments.
Reference
For the full list of environment variables, default file paths, and troubleshooting steps, see the Devin tracing README. Errors always land in~/.arize/harness/logs/devin.log. Set export ARIZE_VERBOSE=true before launching Devin to also log routine hook activity.
Uninstall
Stop and SessionEnd hook entries the installer added, leaving any hooks you added yourself untouched.