Skip to content

feat: kbagent diagnose — intent-based debugging for AI agents #147

Description

@padak

Problem

When an AI agent needs to debug a failing job, it currently needs 5+ sequential commands:

  1. kbagent job list --status error
  2. kbagent job detail --job-id X (per job)
  3. kbagent config detail (to understand the config)
  4. kbagent storage table-detail (to check source data)
  5. Manual correlation of results

This is the opposite of good agentic UX. The agent spends most of its context window on data gathering, not problem-solving.

Proposal

kbagent diagnose --project prod --job-id 123

Output: structured JSON with root cause analysis:

  • Job error message + stack trace
  • Config that triggered the job
  • What changed recently (config version diff, source data changes)
  • Related failures (same component, same time window)
  • Suggested next steps

Why this matters

From the "agentic UX" perspective: the difference between a tool and a partner is whether the agent has to assemble context itself or gets it pre-assembled. diagnose is the highest-impact single command we could add for AI agent productivity.

Context

Discussion from Devil's Advocate analysis of kbagent's agentic capabilities.

Metadata

Metadata

Assignees

No one assigned

    Labels

    epic/agentic-cliSub-issue of #152 (Modern Agentic CLI)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions