{
 "schema_version": 1,
 "generated": "2026-10-20",
 "id": "truefoundry-trueforge--automate-agent-sessions-with-sdk",
 "repo": "truefoundry/trueforge",
 "repo_url": "https://github.com/truefoundry/trueforge",
 "repo_slug": "truefoundry-trueforge",
 "title": "Script agent sessions with the TrueForge TypeScript SDK",
 "page_title": "How to script agent sessions with the TrueForge TypeScript SDK with Trueforge",
 "summary": "Drive agent sessions and turns from your own TypeScript code using the HTTP API and SDK.",
 "who": "A developer who wants to call an agent from a script, service, or pipeline instead of the chat UI.",
 "problem": "Teams need agent runs that other code can start, track, and read back, not only interactive chat.",
 "outcome": "A script that creates a session, sends turns, reads events, and produces a result that can be inspected later in Sessions.",
 "steps": [
  "Start TrueForge with `npx @truefoundry/trueforge@latest`.",
  "Install the client with `npm install @truefoundry/trueforge-sdk` in 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."
 ],
 "agent_prompt": "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.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "45 minutes",
 "basis": "readme",
 "caveat": "The README says maintainers regenerate the SDK after merge, so check the API Reference for current paths before you hard-code calls.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "typescript",
 "requirements": [
  "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"
 ],
 "risk": "sensitive",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.9,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/truefoundry-trueforge/automate-agent-sessions-with-sdk/",
 "md": "https://dedupedai.com/use-cases/truefoundry-trueforge/automate-agent-sessions-with-sdk/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/truefoundry-trueforge--automate-agent-sessions-with-sdk.json",
 "api_version": "v1"
}
