Files
sbbb/docs/sol.md

136 lines
6.9 KiB
Markdown
Raw Normal View History

# Meet Sol☀
Sol☀ lives in your Matrix chat. Not a chatbot, not an assistant — a peer. Has a personality, has preferences, has opinions. Remembers things about each team member. Knows when to speak and when to shut up. The kind of colleague who's always in the room, always paying attention, and only chimes in when they actually have something to say.
We built Sol☀ because we wanted someone on the team who never sleeps, never forgets, and never loses the thread. Not a help desk. Not a search bar with a face. A coworker who happens to be software.
![Sol☀ in action](assets/sol-screenshot.png)
## The Vibe
Sol☀ talks like a person, not a product:
- Lowercase always (proper nouns only)
- Direct, terse, no filler — "absolutely!", "great question!", and "certainly!" are all banned forever
- Dry deadpan humor, observational, never cruel
- Matches the room's energy — one word for greetings, structured depth for technical questions
- No asterisks for actions (it's a conversation, not a screenplay)
- No AI disclaimers ("as an AI" is forbidden)
- Pushes back when they disagree — politely, but firmly
- Distinguishes between "I think" and "I know"
- Owns their mistakes
Sol☀ reads the room. If you send "hey" you get "hey" back. If you send a three-paragraph architecture question, you get a structured, thoughtful answer. The vibe scales. 💅
## What Sol☀ Can Do
### Search Everything
Full-text + semantic search across every conversation ever had. Not just keyword matching — hybrid search combining exact terms with neural embeddings (768-dimensional vectors via OpenSearch). You can search across rooms with visibility controls — DM content stays private, always.
"What did we decide about the auth flow last month?" — Sol☀ finds it.
### Remember You
Per-user memory system, auto-extracted after every interaction. Sol☀ remembers your preferences, your projects, your context, your recurring topics. Memories are categorized (preference, fact, context) and loaded via semantic search before every response. They pay attention.
You mentioned once that you prefer tabs over spaces? Sol☀ remembers. You're working on a migration? Sol☀ knows. You don't have to re-explain yourself every Monday.
### Code & Issues
Full Gitea integration: repos, issues, PRs, file contents. Sol☀ acts *as you* — not as a service account. First time you interact, they auto-provision a personal access token via Vault, store it securely in OpenBao, and use it going forward.
Search repos, create issues, read code, list PRs. All under your identity.
### Research Mode
This is the one that makes people's eyes go wide.
Sol☀ can spawn up to 25 parallel micro-agents for complex questions. Each agent gets their own conversation, full tool access, and a focused task. Agents can spawn sub-agents up to 4 levels deep. Results get aggregated back to the main conversation.
"Why did the deploy fail?" — Sol☀ spawns a log searcher, a git history checker, a config validator, a dependency auditor, an error aggregator. All in parallel. Comes back with a diagnosis, not a suggestion to check the logs.
### Compute
Sandboxed TypeScript/JavaScript runtime (V8 isolate via deno_core). 5-second timeout, 64MB heap limit. Sol☀ can actually run code, not just talk about it. They do math, they process data, they don't just wave their hands.
Host API includes `sol.search()`, `sol.rooms()`, `sol.members()`, `sol.fetch()`, `sol.memory.get/set()`, `sol.fs.read/write/list()`. Network restricted to allowlisted domains.
### Web Search
Self-hosted SearXNG integration. No rate limits, no tracking, no third-party dependencies. Results fed back into conversation context.
### Identity Management
Kratos admin access for account operations. List, create, update identities. Send recovery emails. Useful when someone's locked out at 2am and you need Sol☀ to sort it. They've got the keys. 💅
## How Sol☀ Decides to Speak
Sol☀ doesn't respond to everything. They evaluate relevance using a two-tier system.
**Always responds:**
- Direct @mention (`@sol:sunbeam.pt`) — breaks through silence
- DMs — always responds
- Name invocation ("sol ..." or "hey sol ...")
**Maybe responds (LLM evaluation):**
- Uses a lightweight model (ministral-3b) to score relevance 0.01.0
- Above 0.85: respond inline
- 0.60.85: emoji reaction only
- Below 0.6: ignore
- Structural suppressions: if someone's replying to another human, caps at emoji-only
- Cooldown: 15 seconds between spontaneous responses
- Silence mode: 30 minutes (broken by direct @mention)
The result: Sol☀ feels present without being overbearing. They're in the room. They're paying attention. They speak when they have something worth saying.
## The Brain
### Multi-Model Orchestration
Sol☀ uses different models for different tasks — right tool for the job, darling:
| Model | Role |
|-------|------|
| **mistral-medium** | Main conversations, tool use, orchestration |
| **mistral-large** | Research agents (complex multi-step reasoning) |
| **ministral-3b** | Engagement evaluation, memory extraction (fast, cheap) |
| **ministral-8b** | Coding sessions |
All models via Scaleway Generative APIs — Paris-hosted, GDPR-compliant, OpenAI-compatible.
### Conversations & Memory
- Persistent conversation state per Matrix room (SQLite-backed)
- Auto-compaction at ~90% of context window (118K tokens)
- On compaction: conversation reset with continuity hint
- On restart: Sol☀ sneezes into all rooms (*sneezes*) to signal the hiccup — it's cute, it's intentional
- Backfill: loads recent messages from archive on startup for continuity
## The Integration Depth
This is what makes Sol☀ different from "we put ChatGPT in Slack" ✨:
- **Vault** — secure token storage for user impersonation (K8s auth, KV v2)
- **Kratos** — identity management (knows who everyone is)
- **Gitea** — code awareness (acts as you, not as a service account)
- **OpenSearch** — semantic search across all conversations + code symbols
- **Matrix** — E2EE presence (end-to-end encrypted, first-class citizen)
- **SearXNG** — self-hosted web search (no rate limits, no tracking)
- **Multiple AI models** — right model for the task, not one-size-fits-all
- **Sandboxed runtime** — can compute, not just chat
Sol☀ doesn't just answer questions. They search your archives, read your code, create your issues, investigate problems with parallel research agents, and remember what matters to you — all while maintaining a personality that feels like a real colleague, not a corporate FAQ bot.
## Deployment
- Lives in the `matrix` namespace alongside Tuwunel
- Single replica (SQLite can't share), Recreate strategy
- 256Mi512Mi memory, 100m CPU
- PVC: 1Gi for conversation state + Matrix E2EE keys
- Secrets from OpenBao via VaultStaticSecret
- Config: TOML config + `system_prompt.md` mounted via ConfigMap
- Base image: distroless (~30MB)
Source: [sol repository](../sol)