Who it is forA developer who wants to call an agent from a script, service, or pipeline instead of the chat UI.
The problemTeams need agent runs that other code can start, track, and read back, not only interactive chat.
The outcomeA script that creates a session, sends turns, reads events, and produces a result that can be inspected later in Sessions.
What you need first
- A machine where you can run npx, for the local quickstart
- API access to at least one model provider you plan to connect (OpenAI, Anthropic, Google Gemini, or an OpenAI-compatible endpoint)
- Optional: credentials for any remote MCP server you plan to use (header auth or OAuth)
- For hosted mode: Postgres and Redis, plus Docker Compose, Helm, or Railway
Steps
- Start TrueForge with
npx @truefoundry/trueforge@latest. - Install the client with
npm install @truefoundry/trueforge-sdkin your project. (inferred, check the README) - Create a session with the SDK and send a turn that asks the agent for <task>.
- Read the streamed events and save the final answer to <output-file>.
- Open Sessions in the UI and check that the turns, tool calls, and token counts match your script's output.
Prompt for your agent
In the truefoundry/trueforge repo, use the TypeScript SDK @truefoundry/trueforge-sdk to create a session against a running local TrueForge instance and send one turn asking for <task>. Output the final answer and the session ID. Verify that the same session appears in the Sessions view with its turns and tool calls.
Caveat. The README says maintainers regenerate the SDK after merge, so check the API Reference for current paths before you hard-code calls.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for truefoundry/trueforge and "Script agent sessions with the TrueForge TypeScript SDK"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer