- Updated: January 18, 2026
- 7 min read
Introducing Gambit: An Open‑Source Agent Harness Framework for LLM Workflows
Gambit is an open‑source, Apache‑2.0 licensed agent‑harness framework that lets developers build, run, and verify reliable LLM workflows by composing small, typed “decks” with explicit inputs, outputs, and guardrails.
What Is the Gambit Project?
The Gambit project was launched by the Bolt‑Foundry team to address a common pain point in LLM development: the lack of a structured, testable, and observable orchestration layer. Traditional pipelines often chain a single massive prompt to many tools, leading to ballooning costs, hallucinations, and opaque debugging. Gambit replaces that monolith with a modular, deck‑based architecture where each step is a self‑contained unit with typed contracts and built‑in observability.
By treating every model call, API request, or compute task as a “deck”, developers can mix LLM and non‑LLM actions seamlessly, inject only the data a model truly needs, and run the entire workflow locally for deterministic testing. The framework ships with a CLI, a REPL, and a browser‑based Debug UI that streams traces in real time.
For teams looking to accelerate AI product development while keeping costs predictable, Gambit offers a clear path from prototype to production without sacrificing transparency.
Core Features That Set Gambit Apart
Typed Decks with Guardrails
Each deck is defined with Zod schemas for inputs and outputs, guaranteeing type safety before runtime. This eliminates the “garbage‑in, garbage‑out” problem that plagues ad‑hoc prompt engineering.
Local‑First Execution & Debugging
Run decks on your machine with npx @bolt-foundry/gambit or via Deno. The built‑in simulator UI visualizes transcript lanes, trace events, and schema‑driven input forms, turning debugging into a familiar software‑engineering experience.
Composable Action Decks
Decks can call child decks, enabling hierarchical workflows. For example, an “agent_with_time” deck can invoke a “get_time” compute deck, then feed the timestamp back to an LLM for a natural‑language response.
Streaming & Trace Export
Use --trace to export JSONL logs, or --verbose for live console output. These traces can be fed into analytics pipelines or replayed for regression testing.
Multi‑Runtime Support
Gambit works with both Node.js (v18+) and Deno, giving teams flexibility to adopt their preferred runtime without code changes.
Open‑Source & Extensible
Licensed under Apache‑2.0, the framework encourages community contributions, custom deck libraries, and integration with existing AI stacks.
Getting Started in Minutes
The Gambit CLI requires only an OPENROUTER_API_KEY (or any OpenRouter‑compatible endpoint). Below is a step‑by‑step guide that gets you from zero to a running deck.
-
Install the CLI (no global install needed):
export OPENROUTER_API_KEY=YOUR_KEY npx @bolt-foundry/gambit initThis command pulls example decks and creates a
.gambit/workspace. -
Run the hello‑world deck in REPL mode:
npx @bolt-foundry/gambit repl gambit/hello.deck.mdThe deck simply greets you and echoes the input, demonstrating the basic deck lifecycle.
-
Launch the visual Debug UI:
npx @bolt-foundry/gambit serve gambit/hello.deck.md --port 8000Open http://localhost:8000/debug to see live traces, schema forms, and JSON views.
-
Create a custom compute deck: Save the following as
echo.deck.ts.import { defineDeck } from "jsr:@bolt-foundry/gambit"; import { z } from "zod"; export default defineDeck({ label: "echo", inputSchema: z.object({ text: z.string() }), outputSchema: z.object({ text: z.string(), length: z.number() }), run(ctx) { return { text: ctx.input.text, length: ctx.input.text.length }; }, });Execute it with:
npx @bolt-foundry/gambit run ./echo.deck.ts --init '{"text":"Hello Gambit"}' -
Combine decks with child actions: An
agent_with_timedeck can call theget_timecompute deck, then hand the timestamp to an LLM for a natural‑language reply. This pattern scales to complex agents, chatbots, or data pipelines.
For rapid prototyping, you can also explore UBOS templates for quick start, many of which are built on top of Gambit‑style decks.
Community, Licensing, and Roadmap
Gambit is maintained by a small core team (GitHub repository) and an active open‑source community. With 160 stars and 7 forks, the project has already attracted contributors who add new deck types, improve the UI, and write language‑specific adapters.
The Apache‑2.0 license ensures commercial freedom: you can embed Gambit in proprietary products, modify the source, and redistribute without viral obligations.
The roadmap (v0.8‑v1.0) focuses on:
- First‑class support for OpenAI ChatGPT integration and other LLM providers.
- Native Chroma DB integration for vector store caching.
- Enhanced visual debugging with timeline zoom and breakpoint support.
- Plugin ecosystem for custom compute steps (e.g., ElevenLabs AI voice integration).
New contributors can start by forking the repo, adding a deck, and opening a pull request. The AGENTS.md file outlines best practices for naming, schema design, and test coverage.
How Gambit Fits Into the UBOS AI Ecosystem
UBOS (Unified Business Operating System) provides a full‑stack AI platform that complements Gambit’s workflow engine. While Gambit focuses on the orchestration layer, UBOS supplies the underlying services, UI components, and marketplace of ready‑made AI applications.
Deploy Decks as UBOS Apps
Using the Web app editor on UBOS, developers can wrap a Gambit deck into a low‑code web app, expose it via REST or WebSocket, and instantly share it with non‑technical stakeholders.
Automate End‑to‑End Pipelines
The Workflow automation studio can trigger Gambit decks based on events (e.g., new CRM record, incoming email). This creates a seamless bridge between data ingestion and LLM reasoning.
Leverage AI Marketing Agents
UBOS’s AI marketing agents are built on top of Gambit decks that generate copy, segment audiences, and schedule campaigns. You can customize them further with your own decks.
Scale with Enterprise AI Platform
For large organizations, the Enterprise AI platform by UBOS offers multi‑tenant governance, role‑based access, and audit logging for every Gambit execution.
Startups can quickly prototype using UBOS for startups, while SMBs benefit from pre‑configured UBOS solutions for SMBs. Pricing details are transparent on the UBOS pricing plans page.
The UBOS partner program welcomes agencies and SaaS vendors who want to bundle Gambit‑powered agents with their own services. By joining, you gain access to priority support, co‑marketing assets, and early‑beta features.
To see concrete examples, explore the UBOS portfolio examples. Many showcase Gambit decks that power chatbots, data extractors, and content generators.
If you need a ready‑made AI chatbot, the AI Chatbot template provides a pre‑wired deck that integrates with OpenAI, includes fallback handling, and can be deployed in minutes.
For Telegram enthusiasts, the GPT-Powered Telegram Bot demonstrates how to combine Gambit’s REPL with the Telegram integration on UBOS and the ChatGPT and Telegram integration to deliver real‑time conversational experiences.
Why You Should Try Gambit Today
If you’re building AI‑driven products, you already know that reliable orchestration is the missing piece between a brilliant model and a production‑ready service. Gambit gives you:
- Typed, testable decks that prevent runtime surprises.
- Local debugging with visual traces, eliminating costly cloud‑only logs.
- Seamless integration with UBOS’s low‑code platform, marketplace, and enterprise features.
- An open‑source license that protects your commercial interests.
Ready to experiment? Clone the repo, spin up a deck, and connect it to UBOS’s About UBOS ecosystem. For hands‑on guidance, check out the Agent Framework documentation and start building the next generation of AI agents.
Andrii Bidochko
CTO UBOS
Andrii Bidochko is an AI entrepreneur and researcher focused on AI agents, reinforcement learning, and autonomous systems. He writes about the technologies shaping the future of machine intelligence, from frontier models and agent architectures to real-world AI applications.