Hoshi
Hoshi is Sidespace's built-in AI assistant. It lives in the right panel and is available from every view, so you never leave your current context to ask a question, create a feature, or trigger a workflow.
Most AI coding tools give you a chat window and leave you to copy-paste context in. Hoshi is different: it reads the product surface directly. The roadmap, the linked design docs, the memory bank, the research pipeline: all of it is context that Hoshi can access through the same MCP tools that every other agent shares. When you ask Hoshi to create a feature, it writes to the project graph. When the research agent finds something relevant, Hoshi surfaces it proactively. Chat is one communication channel. The product artifacts you already maintain are the richest source of context.
What's Built
AI SDK Architecture
Hoshi's brain runs on the Vercel AI SDK using streamText for streaming agent loops with tool calling. Modular server-side code handles initialization, context assembly, persistence, and post-chat effects. There are no feature flags, no adapter interfaces, no dual-engine complexity. Just one engine with automatic provider failover.
| Component | Purpose |
|---|---|
AI SDK streamText | Streaming agent loop with multi-turn tool calling |
| Gemini provider | Primary brain (gemini-3.1-pro-preview via @ai-sdk/google) |
| Anthropic provider | Automatic fallback (Claude Sonnet via @ai-sdk/anthropic) |
Chat endpoint (/api/chat) | Server-side SSE streaming with context assembly, persistence, and post-chat effects |
| Model registry | Single source of truth for model names, pricing, token limits, and validation |
Gemini handles production traffic. If it fails (503, timeout, rate limit), the SDK immediately swaps to Claude with zero retries on the primary provider. This keeps the assistant responsive without manual intervention. Chat is served via SSE from Railway.
Tool System
Hoshi operates through 54 MCP tools (served by the Sidespace MCP server on Railway) plus 14 local Tauri commands for native OS operations:
| Category | Count | Examples |
|---|---|---|
| Roadmap | 13 | Create/edit features, move horizons, link documentation |
| Project & orchestration | ~25 | Tasks, notes, todos, project settings, research triggers |
| Information | 7 | Search memories, list projects, list documents |
| Theme | 6 | Create/edit themes, merge themes, assign to features |
| Ideas | 5 | Create ideas, promote to features, delete ideas |
| Diagrams | 1 | Generate Mermaid diagrams rendered as SVG |
The MCP server runs as a stateless HTTP endpoint on Railway, providing a shared tool surface. Hoshi, Umbra, Kosmos, and Claude Code in Squad View all use the same tools through the same server. Stateless mode means the endpoint survives container restarts and redeploys without losing sessions.
When mutating tools execute, they emit Tauri events. React Query hooks listen for these events and invalidate relevant cache entries, ensuring the UI updates immediately without polling.
Conversations & Context
Chat history persists as one continuous thread per user with a content_blocks JSONB column that preserves multi-turn tool conversations. Both messages and associated costs are tracked in the database.
The context window is token-budgeted to ~8,000 tokens. On each turn, the system loads recent messages within that budget, then layers in:
- Research briefings: unsurfaced findings from the research pipeline, injected as
[RESEARCH BRIEFING]blocks - Memories: relevant entries from the knowledge bank, retrieved by hybrid search for semantic and keyword relevance
- Project context: active project metadata, linked documents, current task state
Cost Tracking
Token usage and costs are tracked per turn and persisted to the database for budget monitoring and usage analysis across conversations.
Where It's Heading
Near-term work focuses on expanding Hoshi's autonomy: longer tool chains, better cost controls, and tighter integration with Squad View so Hoshi can coordinate the agents running in terminals rather than just chatting alongside them. Diagram generation is growing into a richer visual layer for architecture and workflow visualization.