feat: add end-to-end agent diagnostics command - #509
GautamKumarOffical wants to merge 1 commit into
Conversation
Add 'agn diagnose <agent-name>' command that runs a structured set of health checks to determine if an agent is truly usable end-to-end. Checks performed: - Daemon liveness (is the daemon process running?) - Adapter state (is the adapter marked as running?) - Workspace health (is the workspace backend reachable?) - Workspace presence (is the agent online with fresh heartbeats?) - Session validity (can the agent heartbeat successfully?) - LLM connectivity (can the configured LLM provider respond?) Output is a structured verdict with ok/warn/error status per check, making it easy to identify exactly where an agent's problems lie. Usage: agn diagnose my-agent Output: Diagnosing agent: my-agent (claude) ✓ daemon PID 12345 ✓ adapter_state running ✓ workspace_health reachable ✓ workspace_presence online (12s ago) ✓ session valid ✓ llm claude-3-5-sonnet-20241022 Result: ALL CHECKS PASSED — agent is ready Fixes openagents-org#485 Signed-off-by: Gautam Kumar <gautamkumarofficial@users.noreply.github.com>
|
Someone is attempting to deploy a commit to the Raphael's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Closing this one with thanks. The problem it targets — needing to stitch together agn status, /v1/health, /v1/discover and heartbeat logs to tell whether an agent can really take work — has since been covered on develop by the live agent probe and smoke-test path (agn probe / the launcher's agent smoke tests, shipped 2026-08-21), which exercises the round trip end to end and prints failure guidance. This branch is three months behind cli.js and would need a rewrite against that rather than a rebase. If there's a specific diagnostic the probe still doesn't surface, a small PR adding it to the probe would be very welcome. |
Summary
Adds
agn diagnose <agent-name>command that runs structured health checks to determine if an agent is truly usable end-to-end.Problem
Users currently need to manually combine multiple status surfaces (agn status, /v1/health, /v1/discover, heartbeat logs) to answer the question: "Can this agent actually receive and complete work right now?" This makes debugging "agent is running but not responding" problems difficult.
Solution
New
agn diagnosecommand that runs a comprehensive set of checks:Output Format
Each check shows ok/warn/error status, making it easy to identify exactly where an agent's problems lie.
Changes
packages/agent-connector/src/cli.js:cmdDiagnose()function with structured health checksUsage
Fixes #485