DEV Community

sun young
sun young

Posted on

trueforge: The Runtime Layer That Turns an LLM Into a Working Agent

Writing an AI agent is easy. Running one well is hard.

You connect a model API, write a loop, wire up a few tools — five minutes, and you have an "agent." Then reality hits: streaming output means hand-rolling SSE, session persistence means building storage, tools mean standing up MCP servers, code execution means sandbox isolation, and a UI is a whole other abyss.

The 100 lines that define your agent are about 1% of the work. The other 99% is the unglamorous plumbing.

trueforge (5k stars, MIT, TypeScript) exists to own that 99%. Its one-line pitch: the open-source agent harness — the runtime layer that turns an LLM into a working agent.

It runs the agent loop for you

trueforge runs the full agent execution loop — model calls, MCP tools, skills, sandbox, approvals, context management, and session state — and exposes it three ways:

  • a chat UI out of the box,
  • an HTTP API with a TypeScript SDK for automation,
  • an embeddable UI SDK to drop into your own app.
npx @truefoundry/trueforge@latest
Enter fullscreen mode Exit fullscreen mode

The pieces I care about

  • Any model provider — OpenAI, Anthropic, Gemini, or any OpenAI-compatible endpoint (including local models, so data never leaves your network).
  • Sandbox-as-a-tool — isolated code/file execution with secrets kept in the framework, only enabled when you need it.
  • Human checkpoints — tool approvals, asking the user, and generative UI, so an agent can't just delete your database.
  • Context engineering — sub-agents, lazy tool loading, code patterns, offloading, and compaction, baked in.
  • Two modes — local (single process, SQLite) or hosted (Postgres + Redis via Docker Compose, Helm, or Railway).

Why "runtime" matters more than "framework"

Most agent frameworks stop at "help you write agent logic" and leave the rest to you. trueforge is a runtime layer: it doesn't care how you define the agent, it cares who's responsible for streaming, state, tools, sandbox, approvals, and UI once the agent is actually running.

It's the difference between an ORM and a database engine. The ORM helps you write SQL; the engine makes the queries run fast and reliably. trueforge wants to be the database engine of the agent world — you define the agent, it makes the agent run well.

That's the rare and expensive capability in this space: not "make a cooler agent," but "make an agent actually run, reliably and safely."

One honest caveat: local mode has no login and stores data in a local SQLite file — keep it on localhost. For anything shared or production-facing, use hosted mode with OIDC.

I've localized the README and core docs to Chinese: https://github.com/yangshun2005/trueforge-cn

If you find this project useful, a star on the original repo supports the author's ongoing maintenance.

Top comments (0)