A modular TypeScript AI agent harness with an Express NDJSON streaming API, CLI, and React web workspace. Explores multi-provider model routing, sandboxed workspace tools, event-sourced sessions, persistent memory, and JSON-RPC stdio MCP integration.
OpenGPT Forge is an open-source, multi-provider AI agent runtime and workspace inspired by DeepSeek Harness. It brings together an agent execution loop, scoped tool execution, append-only session logs, persistent cross-session memory, and external MCP tool discovery behind both an interactive CLI and a streaming React web interface.
02. Problem & Exploration
Built as a technical exploration of how to structure an extensible agent harness with strict tool boundaries, provider portability, and deterministic session replay without coupling orchestration logic to a single model vendor.
What This Experiment Explores
Explores agent runtime architecture: bounded step loops, context compaction, concurrency-safe vs. mutating tool scheduling, filesystem sandboxing, and stdio-based Model Context Protocol tool federation.
03. Implemented Capabilities
Multi-provider streaming adapters supporting DeepSeek (including reasoning traces), OpenAI, Anthropic, Google Gemini, and local OpenAI-compatible servers such as Ollama.
Event-sourced JSONL session storage with heuristic token metering and automatic or manual context compaction checkpoints.
Scoped ToolRegistry supporting parallel execution for read-safe tools, sequential barriers for mutating tools, and built-in filesystem, repository, shell, planning, memory, and subagent delegation tools.
JSON-RPC 2.0 stdio MCP client (McpStdioClient and McpManager) for dynamic external tool discovery alongside a disposable PluginHost lifecycle.
04. Technical Approach & Stack
ForgeHarness acts as the composition root wiring ProviderRegistry, SessionStore, MemoryStore, ToolRegistry, CompactionEngine, PromptAssembler, McpManager, PluginHost, and AgentLoop. An Express server exposes conversation, memory, provider, and compaction endpoints while streaming turn events as NDJSON to the React and Vite client, and a separate CLI entrypoint runs one-shot or interactive terminal sessions.
Verified Technology Stack
TypeScript
Node.js
Express
React
Vite
Zod
MCP
Docker
05. Known Limitations & Notes
—Requires at least one configured LLM provider API key or a local OpenAI-compatible server to run live model turns.
—The danger-full-access sandbox mode bypasses filesystem confinement and is intended only for trusted or containerized environments.