Context Manager
The Context Manager is a Tauri plugin that owns all client-side state: the EstateView (local RAG), conversation history, session state, artifacts, and evidence. It assembles the context payload sent to backend agents on every request.
What it owns
| Data | Storage | Description |
|---|---|---|
| EstateView (local RAG) | SurrealDB graph (local) | All cloud resources, edges, overlays, embeddings |
| Conversation history | Serial DB (local) | Full message history across all sessions |
| Session state | Serial DB (local) | Active session metadata, current scope, active profiles |
| Step summaries | Serial DB (local) | Per-step summaries for long-running multi-step operations |
| Artifacts | Serial DB (local) | Persisted outputs — findings, reports, plans, bundles |
| Evidence | Serial DB (local) | Execution records, before/after state, approval logs |
Nothing in this list leaves the customer's machine unless explicitly exported.
Context assembly
On every request to a backend agent, the Context Manager:
- Reads the current session state (active profiles, scope filters)
- Queries the local EstateView RAG for relevant resources (vector search + graph traversal)
- Applies overlay annotations (tags, labels, deployment groups added by users)
- Serialises the assembled context as a JSON payload
- Attaches conversation history from the serial DB
- Sends the complete, self-contained request to the Gateway
The backend agent receives everything it needs. It never needs to query the estate directly.
Estate-injected context types
Some context types are always available from the local estate without a fetch step. These do not need to appear in a skill's execution_plan.steps:
| Context type | Description |
|---|---|
account_scope | Active account IDs and regions from enabled profiles |
environment_scope | Environment labels inferred from tags and naming patterns |
resource_scope_summary | High-level resource counts by service across enabled profiles |
active_profiles | Currently enabled ObserverContext profiles |
Declare these in supported_context_types in skill.yaml for ADK validation, but omit them from execution_plan.steps.
Local RAG pipeline
The Context Manager's local RAG is built on the EstateView graph in SurrealDB:
Estate scan (Rust plugins) → ingest_resource() → EstateView nodes
→ write_edge() → EstateView edges
→ commit_snapshot() → versioned snapshot
Query time:
embed_query(user_question) → 384-dim vector (ONNX, all-MiniLM-L6-v2)
search_resources(vector) → cosine similarity over resource embeddings
get_neighbors(resource_id) → graph traversal for related resources
build_rag_context(results) → structured JSON context for agentThe embedding model (all-MiniLM-L6-v2) runs entirely on-device via ONNX Runtime. No embeddings are sent to external services.
Next steps
- Context Engine — The server-side counterpart
- Core Concepts — EstateView and ObserverContext explained
- Platform Overview — Thin backend, stateful frontend principle