Skip to content
approved Visibility internal Owner erik@uvilo.com Approver _ Created 2026-06-15 Updated 2026-06-15

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.

  1. 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 match
    • Forge/Agents/PROJECT_WORKER.md — Project Worker instructions: knows basic project flow by default; loads the necessary project skill as needed
    • Forge/Agents/PROJECT_EVALUATOR.md — Project Evaluator instructions: same as Project Worker, but focused on evaluation tasks using an evaluation-suitable model
    • Forge/Agents/PROJECT_THINKER.md — Project Thinker instructions: same as Project Worker, but focused on complex planning using a planning-suitable model
  2. 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
  3. 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.

  1. For each SRP agent, create it in LibreChat’s Agent Builder UI:
    AgentToolsModel
    Page Managerforge-discovery, uvilo-filesystem, Update_Sidebar skillOpenRouter / z-ai/glm-5.1
    Project Workerforge-discovery, uvilo-filesystemOpenRouter / z-ai/glm-5.1
    Project Evaluatorforge-discovery, uvilo-filesystemanthropic / claude-sonnet-4-6
    Project Thinkerforge-discovery, uvilo-filesystemOpenRouter / z-ai/glm-5.1
  2. Configure each agent with:
    • System prompt content from the corresponding .md file
    • MCP tools appropriate to its responsibility (principle of least privilege — Spec §8.2)
    • Model selection per the table above
  3. 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.

  1. Using the AuthManager’s JWT (with browser User-Agent header — Spec §1.5), test the Agent CRUD API:
    • GET /api/agents/v1/ — list all agents
    • GET /api/agents/v1/:agentId — get specific agent config
    • POST /api/agents/v1/ — create a new agent
    • PATCH /api/agents/v1/:agentId — update agent config
    • DELETE /api/agents/v1/:agentId — delete agent
  2. Document which fields are settable: name, description, model, model_parameters, instructions, tools, capabilities
  3. Verify that system prompt content can be set via the instructions field
  4. Verify that MCP tool assignments can be configured
  5. If the CRUD API is functional, create a script orchestrator/src/agent-sync.ts that:
    • 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”)
  6. 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.yaml and update-agents.ts need to handle multiple agent families — members that share all settings except name, description, model, and model parameters (Spec §8.3).

  1. Read the current agent-sync.yaml and update-agents.ts to understand the existing Forge Agent family pattern
  2. 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
  3. Each family has its own system prompt file (Spec §8.3)
  4. Update agent-sync.yaml with the new agent families
  5. Update update-agents.ts to process all families
  6. 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.