Skip to content

feat: add end-to-end agent diagnostics command#509

Open
GautamKumarOffical wants to merge 1 commit into
openagents-org:developfrom
GautamKumarOffical:feat/agent-diagnostics
Open

feat: add end-to-end agent diagnostics command#509
GautamKumarOffical wants to merge 1 commit into
openagents-org:developfrom
GautamKumarOffical:feat/agent-diagnostics

Conversation

@GautamKumarOffical

Copy link
Copy Markdown

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 diagnose command that runs a comprehensive set of checks:

  1. Daemon liveness: Is the daemon process running?
  2. Adapter state: Is the adapter marked as running?
  3. Workspace health: Is the workspace backend reachable?
  4. Workspace presence: Is the agent online with fresh heartbeats?
  5. Session validity: Can the agent heartbeat successfully?
  6. LLM connectivity: Can the configured LLM provider respond?

Output Format

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

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:
    • Add cmdDiagnose() function with structured health checks
    • Add 'diagnose' to help text and command handler

Usage

agn diagnose <agent-name>

Fixes #485

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>
@vercel

vercel Bot commented Jun 20, 2026

Copy link
Copy Markdown

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add an end-to-end agent diagnostics command

1 participant