Creates a new AgencyRegistry instance.
Optional logger: ILoggerOptional logger for diagnostics
Creates or updates an agency session associated with a workflow.
Upsert payload containing workflow linkage, memory config, and optional metadata.
The upserted agency session.
const session = registry.upsertAgency({
workflowId: 'workflow-123',
conversationId: 'conv-456',
memoryConfig: {
enabled: true,
autoIngestCommunications: true,
},
});
Retrieves an agency session by identifier.
Target Agency identifier.
The matching agency session or undefined when absent.
Resolves the agency session associated with a workflow instance (if any).
Workflow instance identifier.
The agency session mapped to the workflow, if present.
Copies of the agency sessions running now, in the order they were created: workflow agencies, and the teams a GMI
launched on the full runtime (launch_agency), whose metadata has kind: 'launched'. Each copy's seats, their
histories, its metadata and its memory config are copied as far down as they hold arrays and plain objects, so a
caller cannot change the registry through them; a value of another kind in a metadata record (a Date, a class
instance) is the registry's own.
The running sessions.
Registers or updates a seat inside the agency.
Seat registration payload.
Updated agency session after the seat registration.
When attempting to register against an unknown agency.
Appends a history entry to the specified seat and returns the updated state.
Merges metadata onto a seat without altering other properties.
Tracks the Agencies (multi-GMI collectives) active inside the AgentOS runtime.
Remarks
The registry is intentionally ephemeral; durable state should be captured via workflow persistence. For shared memory, use AgencyMemoryManager.
Example