Callable agents in orchestration
A CallableAgent is a saved agent definition that a workflow node can invoke as a subagent. Each run uses a snapshot taken at run start, so later library edits do not affect it.
agent.rs owns CRUD, validation, and the AgentStore trait. adapters/storage/agent_store.rs persists openflow/agents.json. The orchestration guide covers the rest of the crate.
Data model
engine::graph::CallableAgent is the canonical type. Orchestration re-exports it as AgentDefinition for saved definitions. A run uses an immutable snapshot of the selected records.
Run lifecycle
RunCoordinatorloads agents throughAgentLibraryand freezes the selected records asCallableAgentsnapshots.- Installed
/skill-idtokens anywhere in task prompts resolve through the configured skill catalog. OpenFlow reads the exactSKILL.mdfiles, appends their contents to the node or callable-agent system prompt before the snapshot starts executing, and keeps the resolved paths for later chat turns. - The engine uses the snapshot and never re-fetches saved agents during the run.
- The snapshot is discarded, and the next run takes a fresh one.
Extend agents
- Add the field to
engine::CallableAgent. - Cover it in persisted
AgentDefinitionJSON and compatibility tests. - Update
agent.rsvalidation if needed. - Update
RunCoordinator::start_run()if snapshot semantics change.
