Skip to content

Seven Planes

AgentCTX organizes all agent interactions into seven planes. Each plane is a distinct domain with its own storage, query semantics, and access patterns.

The tools plane provides MCP (Model Context Protocol) tool discovery, inspection, and execution.

OperationExampleDescription
Discover?t githubFuzzy search for matching tools
Inspect!t github.issues.createGet the full schema for a tool
Call>t github.issues.create title="Fix SSE"Execute a tool with arguments
Register+t custom-tool endpoint="..."Register a custom tool

Key features:

  • Lazy spawning — backends start on first query, not at boot
  • Role-scoped — agents only see tools matching their configured roles
  • Namespaced — tools are prefixed with backend ID (github.issues.create)
  • Schema compression — tool schemas are compressed from ~67 tokens to ~25 for calls

The knowledge plane provides full-text search with fuzzy matching across ingested documents and data.

OperationExampleDescription
Search?k "auth patterns" #code @7d ^3Full-text search with filters
Ingest+k source="docs/"Add documents to the knowledge base
Lookup!k doc-abc123Exact lookup by document ID
Update~k doc-abc123 "revised content"Update document content

Key features:

  • Chunking — documents are split into semantically meaningful chunks
  • Write gate — validates and deduplicates before storage
  • Filesystem watcher — automatically re-indexes when source files change
  • Dual-path — MiniSearch (full-text) by default, SurrealDB HNSW vectors via surrealqlNative=true

The memory plane provides persistent, cross-session storage with a 5-layer architecture.

LayerTagScopePersistence
Ephemeral#ephemeralSingle sessionAuto-expires
Individual#myPer-agentCross-session
Team#teamShared teamCross-session
Organization#orgOrg-widePermanent
Global#globalPlatform-widePermanent

Key features:

  • Decay scoring — memories lose relevance over time unless reinforced
  • Consensus — multi-agent agreement on shared facts
  • Spatial recall — graph-based relationship traversal
  • Archive tier — cold storage for rarely accessed memories
  • Kind classification#fact, #lesson, #preference, #spatial, #temporal, #social, #relation, #handoff

Decorators for advanced operations:

?m @similar "auth-decision" #k:5 Vector similarity search
?m @traverse auth-decision #depth:3 Graph traversal
+m @relate A->informs->B Create graph relationships
?m @changes #since:2026-03-01 Track changes over time
+m @promote lesson #layer:team Promote to higher layer

The skills plane manages reusable agent workflows and capabilities.

OperationExampleDescription
Search?s "process assets" ^3Find relevant skills
Inspect!s deploy-pipelineGet skill details
Execute>s deploy-pipeline env="staging"Run a skill workflow
Register+s new-skill "Steps: ..."Register a new skill

Key features:

  • File-based — skills are .md files loaded from configured directories
  • Registry — skills are indexed and searchable by name and content
  • Composable — skills can reference other skills

Multi-agent coordination — discovery, delegation, and federation.

?a "code reviewer" Discover agents
^a code-review agent="opus" Delegate work
-a agent-123 Unregister

Runtime introspection of the CTX system itself.

?i grammar Get the full operator × plane matrix and syntax rules

Direct language model inference and embedding.

>l "summarize" model="claude-sonnet" Inference
>l:embed "text" model="text-embedding-3" Embedding

The gateway routes each CTX statement to the correct plane handler based on the operator-plane pair:

?k → Knowledge.search()
>t → Tools.call()
+m → Memory.store()
?s → Skills.search()
^a → Agents.delegate()
?i → Inspection.query()
>l → LLM.infer()

Invalid combinations (like >k — you can’t “call” knowledge) are rejected at parse time with error code INVALID_OP_PLANE.