LibreChat Removal Plan 2
Scope: Rewrite the six Forge Knowledge files identified in Spec §2 so they describe the current uvilo-mono / forgentic architecture and contain no residual references to the former stack. This Plan covers Knowledge files only. Do not update Skills, archive MongoDB, remove obsolete files, or run the final all-published-file grep in this Plan; those are covered by Plans 1 and 3.
Shared edit rule for every task: Preserve frontmatter and current document purpose where possible, but remove or replace every reference to the former runtime, librechat.yaml, forge-spawn, former agent definitions, former chat history, former Docker images, and /workspace/librechat. After editing each file, run a file-local grep for librechat, LibreChat, forge-spawn, and librechat.yaml; the grep must return no hits for that file before continuing.
Task 1 — Update Forge/README.md
Spec §2: Forge/README.md has no LibreChat references.
Edit Forge/README.md in this order:
- Read the whole file once and note the current section order.
- Replace the entire section
## 1. How to Access LibreChatwith a new## 1. How to Access Forge Chatsection.- Keep the section procedural and user-facing.
- Describe access through the current Forge Chat / Bot interface.
- Do not mention the former chat product, former model picker, or former runtime.
- In
## 3. Where Files Go, replace theForge/Configs/bullet.- Remove the phrase that says the folder contains former runtime config.
- Replace it with content that says this folder contains current service configuration, MCP server configuration, and infrastructure references.
- In
## 6. What to Do When You're Stuck, replace the urgent-infrastructure sentence.- Remove the parenthetical example that names the former runtime as the thing that is down.
- Replace it with a current example such as forgentic, uvilo-mono, Railway, or deployment health being broken.
- Run
grep -niE 'librechat|forge-spawn|librechat\.yaml' Forge/README.md. - If the grep returns any hits, repeat the targeted replacement steps above until it returns no hits.
- Build to verify after the file is clean.
Task 2 — Rewrite Forge/Forge_Setup.md
Spec §2: Forge_Setup.md describes deploying uvilo-mono (bot-craft) on Railway, not LibreChat.
This is the largest Knowledge rewrite. Edit Forge/Forge_Setup.md in this order:
- Read the whole file and keep the frontmatter, title, and broad setup/rebuild purpose.
- Replace
## Execution Contexts.- Replace the row that says the agent runs inside the former Railway container.
- The replacement row should say the Forge agent operates in the current forgentic / uvilo-mono Railway environment and invokes shell work through
forge-bash__runand tool work through attached MCP tools.
- Rewrite
## Part A: Disaster Recovery — What to Back Upbefore editing the rebuild steps.- Replace
### 1. MongoDB Datawith a current application-data backup section for the uvilo-mono / bot-craft runtime. Do not preserve MongoDB as a required Forge runtime backup unless another current source proves it is still active. - Keep
### 2. Typesense Indexonly as a Typesense backup/reindex section; replace any wording that says indexing scripts run inside the former container with wording that says they run through the current repo tooling orforge-bash__run. - Replace
### 3. Railway Persistent Volume (/workspace)with a current workspace/runtime persistence section. Delete the rows for/workspace/librechat/.secretsand/workspace/librechat/librechat.yaml; replace them with environment-variable and current service configuration notes. - Replace
### 4. Docker Imagewith a uvilo-mono / bot-craft Railway service build/deploy section. Delete the former image name, former Dockerfile path, and former startup script path. - Replace
### 5. Railway Environment Variablesso it describes environment variables on the forgentic container as the source of credentials and configuration. - Replace the DNS row for the former chat subdomain with current domains that remain active, such as the OS/docs site and current service domains.
- Replace
### 8. Railway Backup Summaryso it lists only current Railway services and current backup responsibilities.
- Replace
- Rewrite
## Part B: Step-by-Step Environment Rebuildafter Part A is current.- Keep
### Prerequisitesand### Step 1: Railway Project Setup **[Agent]**, but remove any prerequisite that points to former runtime config or former secrets files. - Delete
### Step 2: MongoDB Service **[Agent]**if it only supports the former stack. If a current database is required, replace the section with the current database service and its environment variables. - Replace the entire section
### Step 3: LibreChat Service (Custom Image)with### Step 3: uvilo-mono / bot-craft Service **[Agent]**.- Delete
#### 3a. Build and Push the Docker Image **[Operator]**and its GHCR commands for the former image. - Replace
#### 3b. Create the Railway Service **[Agent]**with steps for the current Railway service, current source image/build source, current start command, and current public/internal URLs. - Keep the TypeScript build concept from
#### 3b½. TypeScript Build (Automatic) **[Agent]**, but update it so it references current MCP/server TypeScript build needs and not former bundled servers. - Replace
#### 3c. Set Environment Variables **[Agent]**with current uvilo-mono / forgentic environment variables and removeCONFIG_PATH, former auth encryption variables, and former config-path examples unless they are still current under new names. - Delete
#### 3d. Seed .secrets **[Agent]**; replace it with a short step explaining that credentials are supplied through Railway environment variables on the forgentic container. - Delete
#### 3e. Seed Deployed Config **[Agent]**; replace it with current Bot/MCP configuration deployment steps and no YAML-copy procedure. - Keep
### Step 3f: Set GitHub Repository Secrets **[Operator]**only if the listed secrets are still needed; otherwise replace the list with current GitHub Actions and deployment secrets.
- Delete
- In
### Step 4: Typesense Service **[Agent]**, replace the bullet that says indexing scripts run inside the former container with current repo tooling orforge-bash__runwording. - In
### Step 5: Playwright MCP Service **[Agent]**, keep the current service instructions but remove any coupling to the former runtime or former credential file. - Replace
### Step 6: Admin Panel Service **[Agent]**if it describes the former admin panel. Either delete it or replace it with current admin/operator access for uvilo-mono / bot-craft. - In
### Step 7: DNS Configuration **[Operator]**, delete the former chat subdomain row and keep only current DNS entries. - In
### Step 9: Create User Account **[Agent]**, replace former account creation with current Bot/user access setup or delete the section if account creation is no longer an infrastructure rebuild step.
- Keep
- Rewrite
## Part C: Operational Gotchasafter the rebuild procedure is current.- Keep generic Railway gotchas that remain true.
- Delete or replace each former-runtime-specific gotcha in this order:
Railway Volume Mount Hides Image Contents,Dockerfile USER node Breaks Volume Write Access,node:22-slim Missing ca-certificates,Docker Build Platform Must Match Railway,Railway Internal Networking May Be Refused Between Containers,Seed MongoDB via PyMongo, Not mongodump/mongorestore, andRailway Env Vars NOT in os.environ. - For the environment-variable gotcha, replace it with current guidance for reading variables from the forgentic Railway environment when needed.
- Rewrite
## Part D: Post-Setup Verification Checklistlast.- Replace
### LibreChat Applicationwith a uvilo-mono / bot-craft runtime health section. - Replace former Admin Panel checks with current admin/operator checks or delete them if no current admin panel exists.
- Replace MCP server checks so they verify current attached/deferred MCP tools rather than former chat MCP status.
- Replace environment-variable checks so they verify current Railway environment variables, not former counts, former files, or former credential keys.
- Replace backup checks so they list only current services.
- Replace
- Run
grep -niE 'librechat|forge-spawn|librechat\.yaml|/workspace/librechat' Forge/Forge_Setup.md. - If the grep returns any hits, edit the named sections again until it returns no hits.
- Build to verify after the file is clean.
Task 3 — Rewrite Forge/Forge_Infrastructure.md
Spec §2: Forge_Infrastructure.md shows the current service architecture with uvilo-mono as the runtime, not LibreChat.
Edit Forge/Forge_Infrastructure.md in this order:
- Read the whole file and keep the frontmatter, title, and purpose as the current infrastructure reference.
- Replace
## Architecturecompletely.- Remove the former runtime service, former config path, former secrets path, former RAG image, former admin panel image, former API links, former chat history, and former sub-agent launcher.
- Replace the tree with the current architecture: Railway project, forgentic / uvilo-mono runtime, Bot execution, orchestrator Hono service, current MCP tool attachment/deferred-tool model, Typesense, Playwright MCP, Vercel docs site, and current data stores.
- Replace the explanatory paragraphs immediately after
## Architecture.- Delete former Docker registry examples that use former images.
- Replace the config deployment model with Bot/MCP configuration and environment-variable configuration.
- Replace the startup model with the current forgentic / uvilo-mono Railway startup model.
- Update
## Railway IDs.- Delete the row for the former service ID.
- Add or keep only rows for current services that can be verified from the current infrastructure state.
- If a current service ID cannot be verified, omit that row instead of preserving obsolete data.
- Replace
## Environment Variablesand## Secrets File.- Keep current guidance for reading Railway environment variables.
- Delete the former secrets-file path and former credential-key list.
- Replace them with current environment-variable names and tool-specific credential access guidance.
- Replace
## Manual Operations.- Delete
### Updating LibreChat to a New Versionand every former image build step underneath it. - Add current deployment/update steps for uvilo-mono / bot-craft and current Railway services.
- Keep SSH/Railway access instructions only after removing former service names and former filesystem paths from examples.
- Delete
- Replace
## Common Operations.- Delete the second
### Updating LibreChat to a New Versionsection. - Replace
### Deploying Config Changesso it describes current Bot/MCP/environment-variable deployment and current Railway redeploy behavior. - Update
### User Managementto current user/Bot access if it is still needed.
- Delete the second
- Replace
## Admin Panelif it documents the former admin panel.- Delete former image, URL, env vars, and former auth model.
- Add current admin/operator surface if one exists; otherwise remove the section.
- In
## Vercel — Documentation Site, replace any bypass-token source that points to the former secrets file with environment-variable-based access. - In
## Typesense, replace former container/env-var wording with currentforge-bash__runor indexing-script wording. - In
## MCP Server Details, keep current MCP server names but remove former transport/container wording. - Replace
## MCP Development Notes.- Keep generic schema compatibility guidance.
- Replace
### LibreChat Runtime Behaviorwith a current### forgentic Runtime Behaviorsection. - Delete former config-validation and ModelSpecs notes.
- Replace the later infrastructure-reference sections in this order:
## Persistent Volume Structure,## Docker Image Build,## Environment Variable Locations,## Image Details,## Debian-slim Container Notes, and## Lessons Learned.- Delete former image names, former Dockerfile path, former startup script path, former volume path, former YAML/env substitution model, and former lessons.
- Replace them with current uvilo-mono / forgentic equivalents.
- Run
grep -niE 'librechat|forge-spawn|librechat\.yaml|/workspace/librechat|Ralph Wiggum|ModelSpecs' Forge/Forge_Infrastructure.md. - If the grep returns any hits, edit the named sections again until it returns no hits.
- Build to verify after the file is clean.
Task 4 — Rewrite Forge/Forge_Agent_Architecture.md
Spec §2: Forge_Agent_Architecture.md describes the Bot model, not LibreChat agent definitions, ModelSpecs, or sync scripts.
Edit Forge/Forge_Agent_Architecture.md in this order:
- Read the whole file and keep the frontmatter, title, and purpose as an architecture reference for Forge agents.
- Replace
## Three-Layer Prompt Pipeline.- Remove the former memory-injection layer.
- Replace the pipeline with the current Bot prompt model: Bot configuration, modular Prompt and ChildPrompt composition, model selection, tool access, and runtime context.
- Replace
## Forge_Chat_Prompt.md as Inlined Agent Instructions.- Delete the former deployment sentence that says a skill copies prompt text into former agent instructions.
- Replace it with current Bot prompt/version management and Bot system prompt configuration.
- Rewrite
## Memory Architecture.- Keep
### File-Based Memory (Shared / Team-Scoped)if still current. - Replace
### LibreChat Per-User Memorywith a current section about user/conversation context in uvilo-mono. - Keep the rule that project state belongs in project files, Skills, Knowledge, and durable reports rather than ephemeral chat memory.
- Keep
- Replace the entire
## Agent Sync Architecturesection with## Bot Configuration Architecture.- Delete
### Overview,### Key Files,### How It Works,### Multi-Family Agent Sync,### Master + Clone Pattern,### Agent CRUD API Gap, and### ACL Requirementif they depend on former agent definitions, sync scripts, or former REST API gaps. - Replace them with procedural Bot configuration concepts: Bot identity, prompt tree, model selection, tool attachments, access control, and deployment/update flow.
- Delete
- Update
### SRP Agent Architecture.- Replace invocation through the former sub-agent launcher with invocation through the current
spawnAgenttool and orchestrator. - Keep the single-responsibility and least-privilege principles.
- Replace invocation through the former sub-agent launcher with invocation through the current
- Update
### Adding a New Model.- Delete the step to add a ModelSpecs entry to the former YAML file.
- Replace it with current model availability and Bot configuration steps.
- Update
### Adding a New SRP Agent.- Delete the step to add a ModelSpecs entry to the former YAML file.
- Replace it with steps to create or update the Bot, assign prompt text/ChildPrompts, assign tools, and test via
spawnAgentor direct chat.
- Update
## Artifact Instructions.- Replace any row that names a former artifact-instructions field.
- Replace it with the current artifact tool/instruction mechanism.
- Run
grep -niE 'librechat|forge-spawn|librechat\.yaml|ModelSpec|ModelSpecs|Ralph Wiggum' Forge/Forge_Agent_Architecture.md. - If the grep returns any hits, edit the named sections again until it returns no hits.
- Build to verify after the file is clean.
Task 5 — Rewrite Forge/Forge_Agent_Orchestration.md
Spec §2: Forge_Agent_Orchestration.md describes the orchestrator → uvilo-mono execution path, not forge-spawn or LibreChat conversation transcripts.
Edit Forge/Forge_Agent_Orchestration.md in this order:
- Read the whole file and keep the frontmatter, title, and purpose as the orchestration reference.
- Replace
## Requirements Summary.- Replace the cron row with Inngest schedules → orchestrator → uvilo-mono / Bot execution.
- Replace the sub-agent row with
spawnAgent. - Replace the monitor row with current AgentJob status, async completion,
checkAgentJob,abortAgent, and any current reaper behavior.
- Replace
## Execution Layer — LibreChat UI Chat APIwith## Execution Layer — uvilo-mono Bot API.- Replace
### Invocation Protocolwith current API-key-authenticated conversation creation and chat execution. - Replace
### Support Endpointswith current uvilo-mono endpoints or tooling used by the orchestrator. - Replace
### Persistenceso conversations and AgentJobs point to current uvilo-mono persistence, not former chat history. - Replace
### SSE Event Typesand### Auth Lifecyclewith current streaming/status and API-key auth behavior. - Keep parameter-control guidance only after updating it for current model override and Bot execution.
- Delete
### Why Not the OpenAI-Compatible APIif it is only about the former runtime; replace it only if there is a current reason to document.
- Replace
- Update
## Orchestrator Service — Dispatcher.- Keep the TypeScript/Hono Railway service concept.
- Replace every former-runtime authentication step with API-key auth to uvilo-mono.
- Replace
### JWT Auth Managerwith a current API-key or service-auth section. - Replace
### Hybrid Migration Pathwith a current-state note that the migration to uvilo-mono is complete.
- Update
## Discovery MCP Server.- Replace configuration through the former YAML file with current Bot/tool attachment or deferred-tool configuration.
- Replace former-container transport wording with current tool execution wording.
- Replace
## Sub-Agent Spawning — forge-spawn MCPwith## Sub-Agent Spawning — spawnAgent Tool.- Replace the description with the current
spawnAgentbehavior: sync mode waits for a result, async mode creates an AgentJob, model overrides are supported, andcompletionEventcan trigger workflows. - Replace
### Spawn Tool Parameterswith currentspawnAgentparameters. - Replace
### Transcript Reviewwith current conversation/AgentJob review links and durable project reports.
- Replace the description with the current
- Replace
## Ralph Wiggum Monitor.- Delete the former monitor name and former restart behavior.
- Add current async job monitoring,
checkAgentJob,abortAgent, timeout/reaper, and restart/continuation behavior if available.
- Update
## Agent Types,## Agent Handoffs,## Cron Scheduling, and## Data Storage.- Replace former sub-agent launcher references with
spawnAgent. - Replace former handoff mechanism with current Bot handoff/routing behavior.
- Replace MongoDB conversation-history wording with current uvilo-mono conversation persistence.
- Keep filesystem, Postgres, Typesense, and durable report guidance if current.
- Replace former sub-agent launcher references with
- Replace or delete
## Agent CRUD API Notesif it only documents former API gaps. - Run
grep -niE 'librechat|forge-spawn|librechat\.yaml|Ralph Wiggum|MongoDB \(Conversation History\)' Forge/Forge_Agent_Orchestration.md. - If the grep returns any hits, edit the named sections again until it returns no hits.
- Build to verify after the file is clean.
Task 6 — Rewrite Forge/Forge_Agents_User_Guide.md
Spec §2: Forge_Agents_User_Guide.md references the current Bot system and tooling, not forge-spawn, librechat.yaml, or LibreChat chat history.
Edit Forge/Forge_Agents_User_Guide.md in this order:
- Read the whole file and keep the frontmatter, title, and human-facing guide purpose.
- In
## Current Workflows, update### Project Workflow.- Replace the step that says the runner spawns an agent through the former launcher.
- The replacement step should say the runner spawns or hands off to Bots through the current
spawnAgent/ orchestrator path.
- In
## Agent Reference, update### Spawning an Agent Directly.- Replace the former tool name and former MCP label with the current
spawnAgenttool name. - Replace disconnect/monitor examples with current sync and async examples.
- Replace the former monitor example with current async job monitoring using
checkAgentJob.
- Replace the former tool name and former MCP label with the current
- Update
### Checking Job Statusand### Aborting a Job.- Replace former conversation-status wording with current AgentJob and uvilo-mono conversation status.
- Replace former abort wording with current
abortAgentbehavior.
- In
## Creating New Workflows, update### 2. Choose the Agent.- Delete the step to add a ModelSpecs entry to the former YAML file.
- Replace it with current Bot creation/update, prompt configuration, model selection, and tool assignment.
- In
## Scheduling Agent Execution, update### Monitoring and Troubleshooting.- Replace stuck-job cleanup tied to the former runtime with current AgentJob/reaper behavior.
- Replace former transcript viewing with current conversation/AgentJob review and persisted project reports.
- In
## Architectural Notes, replace### Hybrid Migration Path.- Remove roadmap wording that assumes the former runtime is still the execution layer.
- Replace it with a current-state note that orchestration targets uvilo-mono / Bots.
- Run
grep -niE 'librechat|forge-spawn|librechat\.yaml|Ralph Wiggum|ModelSpecs' Forge/Forge_Agents_User_Guide.md. - If the grep returns any hits, edit the named sections again until it returns no hits.
- Build to verify after the file is clean.