Workspace
Shared key-value workspace for multi-agent communication and data passing.
WorkspaceStore
The workspace is a shared key-value store accessible by all agents in a coordination:
interface WorkspaceStore {
get(key: string): Promise<WorkspaceEntry | null>;
set(key: string, value: unknown, metadata?: Record<string, unknown>): Promise<void>;
list(): Promise<WorkspaceEntry[]>;
delete(key: string): Promise<void>;
}WorkspaceEntry
interface WorkspaceEntry {
key: string;
value: unknown;
metadata?: Record<string, unknown>;
updatedAt: number;
updatedBy?: string;
}InMemoryWorkspaceStore
import { InMemoryWorkspaceStore, Coordinator } from '@ahzan-agentforge/core';
const coordinator = new Coordinator({
agents: { researcher, writer },
workspace: new InMemoryWorkspaceStore(),
});Workspace Tools
The Coordinator automatically injects workspace tools into each agent:
workspace_get(key)— read from workspaceworkspace_set(key, value)— write to workspaceworkspace_list()— list all entries
Agents use these tools naturally during execution.