Skip to content

Dashboard: replace Kai tile with 'Claude / Codex / Gemini AI' entry point + skill #300

Description

@padak

Background

Tracking issue spun out of #291 and #288 (both closed wontfix).

Why this matters now:

Net effect: the Kai dashboard tile is broken for a non-trivial subset of users and provides no value for cross-project work even when it does work.

Proposal

Remove the Kai Chat entry from the dashboard's left nav and replace it with a Local AI (Claude / Codex / Gemini) tile that opens a chat surface backed by the same machinery as:

  • the AI SQL helper in the workspace editor (POST /workspaces/sql/improve/stream)
  • the agent task prompt-helper drawer (POST /agents/prompt/improve/stream)

both shipped in v0.40.3. Both already spawn claude / codex / gemini via the existing stream_ai_agent_events plumbing in server/agent_runner.py.

UX sketch

┌─────────────────────────────────────────────────────────────┐
│ AI / TOOLS                                                  │
│─────────────────────────────────────────────────────────────│
│ 🤖 Local AI                            [claude  codex  gem] │
│ MCP Tools                                                   │
│ Agent Tasks                                                 │
└─────────────────────────────────────────────────────────────┘

Replaces:

│ Kai Chat                                                    │

Behavior

  • Free-form chat panel (textarea + Send + live progress / Activity log, mirroring the existing AI SQL helper transparency UI).
  • A built-in kbagent skill loaded into the AI's system prompt: "you have kbagent on PATH; kbagent http get/post reaches the running serve; kbagent context documents every command; multi-project is a first-class flag." The skill text already exists in plugins/kbagent/skills/kbagent/SKILL.md.
  • Project selector at the top (similar to the SQL helper) but defaulting to all projects for cross-project flows.
  • Conversation persistence (optional follow-up — minimum viable is single-shot Q&A).

What stays

  • The Kai backend endpoints (POST /kai/chat, /kai/preflight, etc.) remain available for callers that explicitly want Kai's per-project chat with full API session state (which Kai does well, just not for the failure modes the dashboard tile invited). They are simply no longer surfaced in the default nav.

Out of scope for this issue

  • Re-architecting Kai itself.
  • Making the Manage-API-vs-Storage-API token distinction more transparent in org setup output (separate concern, possibly its own issue).

Acceptance criteria

  • Dashboard left nav no longer shows "Kai Chat".
  • A new "Local AI" tile appears in the same nav section.
  • Clicking it opens a panel with CLI selector + free-form goal textarea + live streaming response.
  • The panel surfaces stream_ai_agent_events output (assistant text + tool_use + tool_result) in the same Activity-log style as the AI SQL helper.
  • The system prompt loaded into the spawned CLI includes the kbagent skill (SKILL.md content).
  • No regression in existing Kai backend tests (the routes stay; only the nav entry changes).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions