Orchestration Plan 5
Scope: Build the SRP agent set and agent configuration management — Page Manager, Project Worker, Project Evaluator, Project Thinker (Spec §8). Migrate from manual Agent Builder creation to programmatic deployment via LibreChat’s Agent CRUD API.
Spec: Orchestration Spec
Prior plan: Plan 4
Task 1 — Create SRP Agent System Prompt Files
Each agent family needs its own system prompt file, analogous to how the Forge Agent uses
FORGE.md(Spec §8.3). These are markdown files that define the agent’s single responsibility and instructions.
- Create system prompt files in the repo:
Forge/Agents/PAGE_MANAGER.md— Page Manager instructions: create, rename, move, delete pages; update front matter; update sidebar to matchForge/Agents/PROJECT_WORKER.md— Project Worker instructions: knows basic project flow by default; loads the necessary project skill as neededForge/Agents/PROJECT_EVALUATOR.md— Project Evaluator instructions: same as Project Worker, but focused on evaluation tasks using an evaluation-suitable modelForge/Agents/PROJECT_THINKER.md— Project Thinker instructions: same as Project Worker, but focused on complex planning using a planning-suitable model
- Each prompt file follows the same pattern:
- Single responsibility statement
- Available tools (MCP servers)
- Step-by-step procedure for the agent’s job
- Output format expectations
- Error handling instructions
- Keep prompts minimal — SRP agents have small contexts (Spec §8.1)
Deliverable: Four SRP agent system prompt files.
Task 2 — Create Agents via LibreChat Agent Builder (Manual)
Start with Option A from Research §8 — manual creation in LibreChat Agent Builder (Spec §8.3). This gets agents running immediately while the programmatic deployment path is built.
- For each SRP agent, create it in LibreChat’s Agent Builder UI:
Agent Tools Model Page Manager forge-discovery, uvilo-filesystem, Update_Sidebar skill OpenRouter / z-ai/glm-5.1 Project Worker forge-discovery, uvilo-filesystem OpenRouter / z-ai/glm-5.1 Project Evaluator forge-discovery, uvilo-filesystem anthropic / claude-sonnet-4-6 Project Thinker forge-discovery, uvilo-filesystem OpenRouter / z-ai/glm-5.1 - Configure each agent with:
- System prompt content from the corresponding
.mdfile - MCP tools appropriate to its responsibility (principle of least privilege — Spec §8.2)
- Model selection per the table above
- System prompt content from the corresponding
- Record each agent’s ID (format:
agent_<alphanumeric>) for use in the orchestrator
Deliverable: Four SRP agents created in LibreChat and callable via the UI Chat API.
Task 3 — Verify Agent CRUD API for Programmatic Deployment
When the orchestrator is built, agent configs should be deployed programmatically via LibreChat’s Agent CRUD API (
/api/agents/v1/with JWT auth) (Spec §8.3). This task verifies the CRUD API works.
- Using the AuthManager’s JWT (with browser User-Agent header — Spec §1.5), test the Agent CRUD API:
GET /api/agents/v1/— list all agentsGET /api/agents/v1/:agentId— get specific agent configPOST /api/agents/v1/— create a new agentPATCH /api/agents/v1/:agentId— update agent configDELETE /api/agents/v1/:agentId— delete agent
- Document which fields are settable: name, description, model, model_parameters, instructions, tools, capabilities
- Verify that system prompt content can be set via the
instructionsfield - Verify that MCP tool assignments can be configured
- If the CRUD API is functional, create a script
orchestrator/src/agent-sync.tsthat:- Reads agent definitions from TypeScript config objects
- Creates or updates agents in LibreChat via the CRUD API
- Runs on orchestrator startup (Spec §8.3: “agent configs as TypeScript objects, deployed to LibreChat on orchestrator startup”)
- If the CRUD API is NOT functional, document the gap and continue using manual Agent Builder creation
Deliverable: Agent CRUD API verified; agent-sync script if API works, or documented gap if it doesn’t.
Task 4 — Update agent-sync.yaml and update-agents.ts for Agent Families
The existing
agent-sync.yamlandupdate-agents.tsneed to handle multiple agent families — members that share all settings except name, description, model, and model parameters (Spec §8.3).
- Read the current
agent-sync.yamlandupdate-agents.tsto understand the existing Forge Agent family pattern - Extend the configuration to support multiple families:
- Forge Agent family (existing): shared system prompt (
FORGE.md), shared tools, multiple members with different models - Page Manager family: single member, its own system prompt
- Project Worker family: multiple members (Worker, Evaluator, Thinker) with shared tools and different models
- Forge Agent family (existing): shared system prompt (
- Each family has its own system prompt file (Spec §8.3)
- Update
agent-sync.yamlwith the new agent families - Update
update-agents.tsto process all families - Test: run the sync script and verify all agents are created/updated correctly in LibreChat
Deliverable: Updated agent-sync.yaml and update-agents.ts supporting multiple agent families.