Loading...
Loading...
Systematic debugging for ADK agents — trace reading, log analysis, common failure diagnosis, and the debug loop.
npx skill4agent add botpress/skills adk-debugger--format jsonadk check| File | Contents |
|---|---|
| CLI debugging tools, log querying, trace structure, span types, |
| Runtime failure patterns — validation, bot not responding, tool errors, workflow stuck, integration failures, build errors, config confusion |
| LLM behavior issues — wrong tool, hallucinated params, refusals, token limits, looping, reading model reasoning |
| The systematic 8-step debug loop: validate → reproduce → logs → traces → classify → fix → verify → prevent |
| How to fetch, walk, and summarize traces as free-form natural-language narratives — adapting depth to context |
traces-and-logs.mdcommon-failures.mdllm-debugging.mddebug-workflow.mdtrace-summarization.mdadk-evalssymptom → validate (adk check) → reproduce (adk chat) → logs (adk logs) → traces (adk traces) → root cause → fix → verify--format jsonadk check --format json # offline validation
adk logs error --format json # recent errors
adk logs --follow --format json # stream live
adk traces --format json # recent traces
adk traces --conversation-id <id> --format json # specific conversation
adk chat --single "msg" --format json # test message
adk dev --non-interactive --format json # structured dev output| Type | What It Shows |
|---|---|
| LLM reasoning — why it chose an action |
| Tool invocation — name, input, output, success/error |
| Runtime error — message and stack trace |
| Conversation turn completed |
adk check --format jsonadk devadk dev --non-interactive --format jsonagent.jsonbotIdworkspaceIdadk linkagent.local.jsondevIdadk devadk check# CORRECT — catch config/schema problems offline first
adk check --format json
# Then debug runtime issues# WRONG — jumping straight to runtime debugging wastes time on config issues
adk traces --format json # might be chasing a config problem--format json# CORRECT — structured output for reliable parsing
adk logs error --format json
adk traces --format json
adk chat --single "test" --format json# WRONG — human-readable format is for display, not parsing
adk logs error
adk tracesadk logs error# CORRECT — focused error scan
adk logs error --format json
adk logs warning since=1h --format json# WRONG — too much noise, easy to miss the actual error
adk logs --format json # 50 entries of everythingonTrace// CORRECT — structured, automated trace analysis
hooks: {
onTrace: ({ trace }) => {
if (trace.type === "tool_call" && !trace.success) {
console.error(`[TOOL ERROR] ${trace.tool_name}`, trace.error);
}
}
}// WRONG — console.log in handlers misses the structured trace data
handler: async (input) => {
console.log("tool called"); // not useful for debugging
}// CORRECT — prevents the bug from coming back
export default new Eval({
name: 'fix-order-lookup',
type: 'regression',
conversation: [{ user: 'Look up order 123', assert: { tools: [{ called: 'lookupOrder' }] } }],
})// WRONG — the same bug will return and you'll debug it againadk check --format jsonadk chat --single "msg" --format jsonadk logs error --format jsonadk traces --format jsonadk-evals