Repository navigation
Closed
Labels
enhancementNew feature or requesthardeningProduction hardening & reliabilityv1.0v1.0 β Production Ready
Description
Problem
The --agent flag exists but it's bolted on, not woven in. In a world where personal agents are the primary users of Cortex, multi-agent support needs to be seamless β not an afterthought.
Today: three agents (Mister, Niot, Hawk) each have separate Cortex databases on separate machines. That works, but it's the brute-force version. The v1.0 vision is that multiple agents can share a single Cortex instance with scoped access.
Current State
--agentflag exists onimportandsearch- Agent field stored in memories table
- No agent scoping on: graph, MCP tools, connectors, stats, stale, conflicts, classify, cleanup
- No agent-level access control
What "First-Class" Means
Every command respects --agent
| Command | Agent-scoped today? | v1.0 target |
|---|---|---|
import |
β | β |
search |
β | β |
extract |
β | β Extracts only from agent's memories |
classify |
β | β Classifies only agent's facts |
graph |
β | β Graph shows only agent's knowledge |
stats |
β | β Stats scoped to agent |
stale |
β | β Staleness per agent |
conflicts |
β | β Conflicts within agent's facts |
cleanup |
β | β Cleanup scoped to agent |
connect sync |
β | β Connector data tagged with agent |
| MCP tools | β | β Agent context passed through MCP |
Agent Discovery
cortex agentsβ list all agents that have imported data- Shows: agent name, memory count, fact count, last import time, DB size contribution
MCP Agent Context
When an MCP client connects, it should be able to declare its agent identity. This could be:
- A
--agentflag oncortex mcpstartup - Or a session-level parameter in the MCP protocol
- All subsequent tool calls are automatically scoped to that agent
Shared vs. Scoped
Some data should be agent-scoped, some shared:
- Scoped: Memories, facts, connectors, graph edges (an agent's knowledge is its own)
- Shared: Schema, embeddings model config, LLM provider config (infrastructure is shared)
- Configurable: Whether
searchcan see other agents' data (default: own agent only,--all-agentsflag to see everything)
Non-Goals for v1.0
- No authentication/authorization (agents are trusted, this isn't multi-tenant SaaS)
- No network-level isolation (single binary, single DB file)
- No agent-to-agent messaging (that's OpenClaw's job)
Acceptance Criteria
- Every CLI command respects
--agentflag -
cortex agentslists known agents with stats - MCP server accepts agent identity at startup
- Graph explorer can filter by agent
- Stats/stale/conflicts all support agent scoping
- Tests cover agent isolation (agent A's facts don't leak into agent B's search)
- Documentation explains the multi-agent model
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requesthardeningProduction hardening & reliabilityv1.0v1.0 β Production Ready
Activity
feat: CLI hardening, doctor/agents commands, graph pagination (#228, #β¦
feat: wire --agent through stats, stale, conflicts (#231)
feat: wire --agent through classify, graph serve, cleanup, connect syβ¦
hurttlocker commentedon Feb 26, 2026
All acceptance criteria met:
--agentwired through every applicable command:importsearchstatsstaleconflictsclassifygraph <id>graph --servecleanupconnect syncextractOther criteria:
cortex agentscommand (ac5a54c)--agentat startup (2b8c0a6)851 test functions, 15 packages green.