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:
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
Background
Tracking issue spun out of #291 and #288 (both closed wontfix).
Why this matters now:
kbagent org setup(non-master Storage token). Fixing it on the kbagent side would either degrade security posture (always-master tokens) or wrap Kai in token-swapping UX nobody wants. The correct fix lives in Kai, not here.claude/codex/gemini) with kbagent's multi-project flags.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:POST /workspaces/sql/improve/stream)POST /agents/prompt/improve/stream)both shipped in v0.40.3. Both already spawn
claude/codex/geminivia the existingstream_ai_agent_eventsplumbing inserver/agent_runner.py.UX sketch
Replaces:
Behavior
kbagenton PATH;kbagent http get/postreaches the running serve;kbagent contextdocuments every command; multi-project is a first-class flag." The skill text already exists inplugins/kbagent/skills/kbagent/SKILL.md.What stays
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
org setupoutput (separate concern, possibly its own issue).Acceptance criteria
stream_ai_agent_eventsoutput (assistant text + tool_use + tool_result) in the same Activity-log style as the AI SQL helper.SKILL.mdcontent).