Skip to content

Director integration

Director is the workbench — actor canvas plus chat tab. It consumes system.agents in two places.

1. The chat tab (the prompt path)

DirectorApp.ts:1829:

ts
backendMount: 'system.agents',

When the user selects an actor on the canvas and asks a question in the chat tab, Director sends a $prompt to system.agents with:

  • The active TargetRef (the selected actor).
  • The user's question text.
  • A correlation requestId for activity-frame matching.

The response stream renders into the chat tab. ChatPanel extraction — moving the chat surface to ConversationSurface — is partially complete (see MEMORY.md § ConversationSurface & Silent Prompt Failure); the integration today still works, with system.agents as the backend regardless of which front-end component renders.

2. The session lookup

DirectorRuntimeAdapter.ts:2119 and DirectorDataAdapter.ts:265 register system.agents as a known backend mount and surface its session list / status to the UI. The Director chat tab can show:

  • Session list. Sessions for the current target, via $sessionList.
  • Active prompts. In-flight $prompt calls, via $status.
  • Activity frames. Streaming, via the activityTo mount that Director registers when it issues $prompt.

What Director DOES NOT consume

  • Memory. Director doesn't read or write system.agents.memory directly. Memory is the agent's tool surface, not Director's.
  • Embeddings. Same — used by MemoryActor, not by Director.
  • Inference. Director doesn't call system.inference; that's the agent's job.

The "what is this actor for?" recipe

Step by step (the canonical example used in WORKSTREAMS/loose-ends/items/P1.11):

  1. User clicks an actor node on the canvas → TargetRef becomes active.
  2. User types "what is this actor for?" in the chat tab → Director sends $prompt.
  3. AgentsRoot resolves (targetKey, profileKey='default') → no session yet → creates one.
  4. Spawns an AgentActor child, passes targetMount, snapshot, prompt.
  5. Loop runs: model gets target snapshot, calls matrix_introspect if it needs more, returns a description.
  6. Frames stream back: inference.startinference.token* → tool.call (introspect) → tool.resultinference.completeresponse.final.
  7. Director renders the streamed response.

Cognitive readiness panel — target state

P1.12-cognitive-readiness-panel.md files a Director feature: a panel that shows whether system.agents, system.inference, providers, frames, and persistence are all healthy. It would consume $status and $metrics. Not yet wired. The panel is the Director-side artifact for the cognitive product proof (P1.11).

See also

Source: projects/matrix-3/packages/director/src/DirectorApp.ts:1829, projects/matrix-3/packages/director/src/services/DirectorRuntimeAdapter.ts:2119, WORKSTREAMS/loose-ends/items/P1.12-cognitive-readiness-panel.md (target state).