Skip to content

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

DataStorageDescription
EstateView (local RAG)SurrealDB graph (local)All cloud resources, edges, overlays, embeddings
Conversation historySerial DB (local)Full message history across all sessions
Session stateSerial DB (local)Active session metadata, current scope, active profiles
Step summariesSerial DB (local)Per-step summaries for long-running multi-step operations
ArtifactsSerial DB (local)Persisted outputs — findings, reports, plans, bundles
EvidenceSerial 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:

  1. Reads the current session state (active profiles, scope filters)
  2. Queries the local EstateView RAG for relevant resources (vector search + graph traversal)
  3. Applies overlay annotations (tags, labels, deployment groups added by users)
  4. Serialises the assembled context as a JSON payload
  5. Attaches conversation history from the serial DB
  6. 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 typeDescription
account_scopeActive account IDs and regions from enabled profiles
environment_scopeEnvironment labels inferred from tags and naming patterns
resource_scope_summaryHigh-level resource counts by service across enabled profiles
active_profilesCurrently 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 agent

The embedding model (all-MiniLM-L6-v2) runs entirely on-device via ONNX Runtime. No embeddings are sent to external services.


Next steps

Escher — Agentic CloudOps by Tessell