Skip to content
archived Visibility internal Owner erik@uvilo.com Approver _ Created 2026-04-25 Updated 2026-04-25

Orchestration Requirements


Vision

Agent orchestration — the coordination of multiple, specialized AI agents to work together on complex, multi-step tasks that a single model cannot handle alone. It provides structure for managing, scheduling, and connecting agents, enabling them to share context, reduce errors, and automate end-to-end workflows independently.

Background

LibreChat already has:

  • Agent Handoffs — agents delegate to specialized agents (recursive handoffs supported)
  • Mixture-of-Agents (MoA) chains — up to 10 agents in sequence, each receiving prior agents’ output
  • Programmatic API — OpenAI-compatible endpoint for invoking agents from external scripts
  • Model flexibility — swap between Anthropic, OpenAI, Google, local models
  • Pay-per-token billing via API keys to each provider

External orchestrator scripts (TypeScript, running on Railway) would:

  1. Trigger as a cron job
  2. Determine the next task to do
  3. Call LibreChat’s Agents API with the task prompt + context
  4. Monitor the agent’s progress via streaming responses
  5. On completion, error or timeout:
    • Start a new agent to continue the job, or
    • Report to the user if human-in-the-loop decisions are necessary

LibreChat’s agent orchestration is still maturing. Scheduled/triggered agent workflows are on the 2026 Q2 roadmap but not yet implemented. Our orchestrator scripts will fill the gap in the meantime.


Requirements

R1: Cron scheduling of agents

Agents must be triggered on a schedule (cron). The system determines the next task and invokes the appropriate agent via LibreChat’s API.

R2: Project discovery tool

A tool so that agents don’t have to grep/ls directories to find active projects, their files, and the current phase. Active projects live in {DEPT}/Projects/.

R3: Skill discovery tool

A tool for agents to discover available skills without manually searching the filesystem.

R4: Todo/checklist MCP

A multi-state checklist MCP to track tasks for agents and users. States: empty, started, blocked, completed. Covers agent tasks and human-in-the-loop items (confirmations, manual config, authentication, etc.).

R5: Spawning sub-agents

The orchestrator must be able to spawn sub-agents for specialized work.

R6: Ralph Wiggum pattern

Keep agents going when they stop prematurely — auto-restart or continue the workflow from where it left off.

R7: Sub-agent transcript review

The ability to review the transcript of sub-agent runs as one would review a chat in Chat history.

R8: Project Runner agent

A Project Runner agent that checks active projects periodically. When one project phase is completed, it initiates the next phase or notifies the user (adds an item to the user’s todo list) to approve the next step.

R9: Task Runner agent

A Task Runner agent that checks for new items on the agent todo list and dispatches the correct sub-agent to execute each task.

R10: Single-Responsibility agents

Create agents for common tasks following the Single Responsibility Principle (e.g., Create Page + Update Sidebar). Specialized agents with smaller contexts can be called by agents running complex jobs with large contexts, potentially reducing the size of FORGE.md.

Success Criteria

#CriterionMeasured by
V1Cron-scheduled agents execute on time and invoke correct tasksVerify cron job runs and triggers agent with correct prompt+context
V2Agents can discover projects and current phase without filesystem explorationAgent query returns project list, files, and phase in a single call
V3Agents can discover skills without filesystem explorationAgent query returns skill list and details in a single call
V4Todo/checklist MCP supports multi-state items (empty, started, blocked, completed) for both agents and usersCreate, update, and query items across all states
V5Orchestrator spawns sub-agents for specialized workSub-agent is invoked and returns results to caller
V6Prematurely stopped agents are detected and resumedAgent stops mid-task; system detects and restarts/continues
V7Sub-agent transcripts are reviewable in chat historyTranscript appears in LibreChat chat history and is readable
V8Project Runner detects completed phases and initiates next phase or notifies userPhase completion triggers next phase or user todo item
V9Task Runner dispatches correct sub-agent for new todo itemsNew agent todo item triggers dispatch of appropriate sub-agent
V10SRP agents handle single responsibilities and are invocable from complex agentsAgent performs one task; callable from another agent with full results returned

Out Of Scope

  • Full GUI implementation (research only at this stage)
  • Database migration (research only — determine feasibility)
  • Forking LibreChat (research only — determine if needed)

Additional Requirements (Research Phase)

Implementation may be beyond scope, but research must confirm direction:

  • GUI: Cron jobs CRUD, Department/Project/Skill browsers, Todo Lists CRUD, agent launcher with context selection
  • GUI ↔ LibreChat integration: Select dept → project → skills → agent → instructions → launch agent in new LibreChat chat with selected context

Research Instructions

  • Research the current state of LibreChat Agent Handoffs and Mixture-of-Agents implementation; collect signals from discussions/issues/PRs in https://github.com/danny-avila/LibreChat to determine what’s coming.
  • Research the internet in depth for best practices in Agent Orchestration.
  • Research the best way to implement orchestration and the GUI: fork LibreChat? Use a 3rd-party agentic system? Write individual TypeScript scripts? Build a TanStack Start app?
  • Is it practical to keep using filesystem-based config and memory, or should we adopt a database for this project?
  • Can we make use of https://mastra.ai/ to build this out faster, or does it duplicate features LibreChat already has? Can we integrate it at all?