Files
sol/Cargo.toml
Sienna Meridian Satterwhite 7580c10dda feat: multi-agent architecture with Conversations API and persistent state
Mistral Agents + Conversations API integration:
- Orchestrator agent created on startup with Sol's personality + tools
- ConversationRegistry routes messages through persistent conversations
- Per-room conversation state (room_id → conversation_id + token counts)
- Function call handling within conversation responses
- Configurable via [agents] section in sol.toml (use_conversations_api flag)

Multimodal support:
- m.image detection and Matrix media download (mxc:// → base64 data URI)
- ContentPart-based messages sent to Mistral vision models
- Archive stores media_urls for image messages

System prompt rewrite:
- 687 → 150 lines — dense, few-shot examples, hard rules
- {room_context_rules} placeholder for group vs DM behavior
- Sender prefixing (<@user:server>) for multi-user turns in group rooms

SQLite persistence (/data/sol.db):
- Conversation mappings and agent IDs survive reboots
- WAL mode for concurrent reads
- Falls back to in-memory on failure (sneezes into all rooms to signal)
- PVC already mounted at /data alongside Matrix SDK state store

New modules:
- src/persistence.rs — SQLite state store
- src/conversations.rs — ConversationRegistry + message merging
- src/agents/{mod,definitions,registry}.rs — agent lifecycle
- src/agent_ux.rs — reaction + thread progress UX
- src/tools/bridge.rs — tool dispatch for domain agents

102 tests passing.
2026-03-21 22:21:14 +00:00

40 lines
1.2 KiB
TOML

[package]
name = "sol"
version = "0.1.0"
edition = "2021"
rust-version = "1.76.0"
authors = ["Sunbeam Studios <hello@sunbeam.pt>"]
description = "Sol — virtual librarian Matrix bot with E2EE, OpenSearch archive, and Mistral AI"
license = "MIT"
repository = "https://src.sunbeam.pt/studio/sol"
[[bin]]
name = "sol"
path = "src/main.rs"
[dependencies]
mistralai-client = { version = "1.1.0", registry = "sunbeam" }
matrix-sdk = { version = "0.9", features = ["e2e-encryption", "sqlite"] }
opensearch = "2"
tokio = { version = "1", features = ["full"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
toml = "0.8"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
rand = "0.8"
regex = "1"
anyhow = "1"
chrono = { version = "0.4", features = ["serde"] }
url = "2"
ruma = { version = "0.12", features = ["events", "client", "markdown"] }
libsqlite3-sys = { version = "0.30", features = ["bundled"] }
deno_core = "0.393"
deno_ast = { version = "0.53", features = ["transpiling"] }
deno_error = "0.7"
tempfile = "3"
reqwest = { version = "0.12", default-features = false, features = ["rustls-tls"] }
uuid = { version = "1", features = ["v4"] }
base64 = "0.22"
rusqlite = { version = "0.32", features = ["bundled"] }