View and investigate logs
First identify the process that failed, then search by failure time and request, session, or run ID. Logs diagnose startup, connection, and execution errors. Use trace files for the full call tree and model/tool steps. See Troubleshooting for individual error conditions.
Find the process's logs
Logs live under that process's <home>/runtime/logs/. Home comes from its DATAAGENT_HOME process environment, defaulting to ~/.dataagent. With separate Server, TUI, and Web deployments, inspect each machine and process Home. A local TUI Home does not necessarily match the remote Server Home.
| File | Start here for |
|---|---|
backend.log |
Backend startup, models, tools, plugins, shared dependency preparation, and overall start/stop |
tui.log |
Terminal client build, startup, connection, transport, and interaction errors |
web.log |
Web build, Next.js server, proxy errors, and browser error reports |
For a TUI connection failure, start with tui.log. If Server accepted the request but execution failed, inspect Server's backend.log. Browser reports can fail to arrive during network faults, so an empty web.log does not prove the page had no error. See Home directory and files.
Follow recent records
Run these commands on the target process's machine. Use its actual Home; this example defaults to the current terminal's DATAAGENT_HOME. If that value is relative or contains a literal ~/..., set agent_home to the absolute directory resolved by the target process:
agent_home="${DATAAGENT_HOME:-$HOME/.dataagent}"
ls -lh "$agent_home/runtime/logs/"
tail -n 100 -F "$agent_home/runtime/logs/backend.log"-F reopens the filename after rotation. Substitute tui.log or web.log for client errors. A component that has never started may have no log file.
For a managed Linux deployment, ./deploy.sh logs in the repository follows all three files. There are no separate deployment logs or combined process-output files.
Read a record
Each line is one JSON object. This is an illustrative format example for a backend error; its time, identifiers, message, and stack are not real runtime data:
{"timestamp":"2026-11-27T10:00:00+00:00","level":"ERROR","component":"dataagent.api","requestId":"req-example","threadId":"thread-example","runId":"run-example","stage":"run","code":"INTERNAL_ERROR","message":"Agent execution failed","stack":"Traceback ...\nValueError: example failure"}| Field | What to inspect |
|---|---|
timestamp |
Event time with timezone; narrow the failure window first |
level |
Severity; Python uses WARNING and Node uses WARN, so include both when searching |
component |
Emitting module or component, which is not necessarily the filename |
message |
Event or error description |
stage, code |
When present, identify preparation, startup, streaming execution, or error category |
stack, error.stack |
Full Python or Node exception stack, when recorded |
An escaped \n represents a newline inside the JSON value, so a multiline stack still occupies one file line. UI error summaries can be shortened; inspect the logged diagnostic details for the cause.
Correlate requests, sessions, and runs
| Entry point | Common correlation fields |
|---|---|
| REST / AG-UI | requestId identifies the request; obtain X-Request-ID from the response header. threadId identifies the session, and runId identifies the turn |
| A2A audit | request_id, context_id, task_id, and root_run_id identify the request, session, Task, and host run, with additional fields such as rpc_id and message_id |
A2A structured audits use snake_case; do not filter them only with REST's camelCase field names. HTTP success does not establish A2A Task success: inspect task state and failure stage too. An audit may contain an error summary and frames without a full stack. See A2A correlation.
Search current and rotated backend logs with an actual ID:
lookup_id="your-request-thread-or-run-id"
rg -n -F -- "$lookup_id" "$agent_home"/runtime/logs/backend.log*This example uses rg. If it is unavailable, use grep -n -F -- "$lookup_id" "$agent_home"/runtime/logs/backend.log*. Find the failure by request ID first, then use the session or run ID for context. Without an ID, search the failure time, component, stage, and message. Order cross-file matches by timestamp, not filename order.
Inspect exception stacks
Find the initial failure before subsequent cleanup or cancellation records. When an error is brief, search the same ID for stack or error.stack. If jq is installed, expand escaped stack newlines with:
rg --no-filename --no-line-number --color never -F -- "$lookup_id" \
"$agent_home"/runtime/logs/backend.log* | jq -r '.stack // .error.stack? // empty'No output means matching records have neither stack field. Inspect their original message, stage, code, or A2A frames instead. The last record alone does not necessarily identify the cause.
Rotation and retention
All three logs rotate at a 5_000_000-byte threshold and keep three backups, such as backend.log.1, .2, and .3. .1 is the newest rotated file; subsequent rotations replace older backups. The active file and three backups are not a permanent archive. Files use mode 0600. Check the covered time range before investigating older failures. Logs left by previous versions are not automatically relocated.
Entry-point differences
| Entry point | Logging setup |
|---|---|
dataagent serve, serve-a2a |
Configure backend logging automatically, including an attempt to record startup failures before configuration is prepared |
| Official TUI and Web entry points | Use their respective logs; when managed by a launcher, it collects output through the shared writer to avoid duplicate file writes |
| Python SDK | Retains the caller's logging configuration; does not automatically create backend.log or capture the caller's exceptions |
For unified SDK logs, import configure_logging from dataagent.host and call configure_logging(runtime) after prepare_runtime(...), before invoking the Agent. It replaces the Python root logger’s existing handlers, so let the host arrange initialization. See the SDK logging example.
Levels and write failures
The backend console shows INFO and higher by default. To see DEBUG output, set DATAAGENT_CONSOLE_LOG_LEVEL=DEBUG before launching Server, for example DATAAGENT_CONSOLE_LOG_LEVEL=DEBUG dataagent serve. The backend.log file and ./deploy.sh logs still show INFO and higher. See CLI and environment for supported values. TUI manages its own log level, which defaults to INFO.
If backend file initialization fails, it falls back to formatted stderr. Later write failures produce a one-time warning. The Node writer likewise emits unable to write ...log to stderr; this does not guarantee the failed record was persisted. Inspect the launch terminal or process manager's stderr capture, then check directory writability, permissions, and available disk space.
Move from logs to traces and sessions
Configuration validation, port binding, or other failures before graph execution may have logs without a trace. For an execution that started, locate the request and failure stage in logs, then inspect that session's trace files, session records, and artifacts. A2A's a2a.trace.saved also supplies native_run_id and trace_file; an AG-UI runId is not a trace filename.
See developer observability for redaction internals, complete audit events, and client-reporting boundaries.