TL;DR

Gambit is an open-source toolkit for building LLM-driven workflows from small, typed components called decks. It provides a CLI, a local debug UI/simulator, tracing and state persistence, and TypeScript/Zod libraries to validate inputs and compose compute and model actions.

What happened

Bolt Foundry published Gambit, an open-source framework for composing reliable large-language-model workflows out of small, typed building blocks called decks. The project emphasizes explicit input/output schemas and local orchestration so developers can test and reproduce runs without relying solely on provider logs. Gambit ships as a CLI and a local Debug UI (simulator) that streams execution traces, renders transcripts and tool feeds, and exposes routes such as /test-bot and /calibrate. Developers can run example decks directly with npx or Deno, stream traces to JSONL, persist session state, and inspect verbose events. The library surface supports TypeScript decks and cards; authors can declare Zod input/output schemas, spawn child decks, and emit structured trace events. Examples in the repository include a minimal model-driven deck, a pure compute TypeScript deck, and a deck that calls a child compute action to return an ISO timestamp.

Why it matters

  • Typed inputs and outputs make orchestration more testable and reduce brittleness compared with long untyped prompts.
  • Local-first traces and a built-in debug UI let developers reproduce and debug runs without relying only on remote provider logs.
  • Composing small steps and feeding models only the necessary context can help control cost and reduce hallucinations.
  • Mixing model calls and compute tasks in the same deck tree enables flexible hybrid workflows that can keep orchestration logic local.

Key facts

  • Gambit requires Node.js 18+ and an OPENROUTER_API_KEY; OPENROUTER_BASE_URL can be set when proxying OpenRouter-style APIs.
  • You can run Gambit via npx (no install) or with Deno; example: npx @bolt-foundry/gambit init downloads example files and configures env vars.
  • The CLI supports commands including run, repl, test-bot, grade, and serve; run and serve accept flags for –trace, –state, and –verbose.
  • The local Debug UI (simulator) streams runs, shows transcript lanes and a trace/tools feed, and serves routes such as http://localhost:8000/, /test-bot, and /calibrate.
  • Authors can write decks in Markdown with model parameters or in TypeScript using defineDeck/defineCard from jsr:@bolt-foundry/gambit and validate IO with Zod.
  • Examples provided include hello_world.deck.md (model-powered), echo.deck.ts (compute-only), and an agent_with_time deck that calls a child get_time.deck.ts.
  • Local-first session data (sessions, traces, notes) is stored under a .gambit/ directory in the working tree.
  • Tracing can be exported to JSONL via the –trace flag and sessions persisted with –state <file> for later grading or inspection.

What to watch next

  • Adoption and integration with other toolchains and provider APIs: not confirmed in the source
  • Plans for official production readiness, support guarantees, or enterprise features: not confirmed in the source
  • Roadmap for additional built-in observability or hosted services beyond the local Debug UI: not confirmed in the source

Quick glossary

  • Deck: A small, self-contained workflow unit in Gambit that declares inputs, outputs and one or more actions (model calls or compute steps).
  • Card: A reusable component or sub-unit that can be used inside decks to encapsulate a specific piece of logic or data.
  • REPL: Read–Eval–Print Loop; an interactive shell mode provided by the Gambit CLI for running decks and streaming outputs.
  • Zod: A TypeScript-first schema validation library used in Gambit examples to declare and validate deck input and output shapes.
  • Trace: A structured record of events produced during a deck run; Gambit can stream traces to the Debug UI and export them to files (JSONL).

Reader FAQ

How do I run Gambit locally?
You can run the CLI with npx (no install) or Deno. Common commands include npx @bolt-foundry/gambit run <deck>, repl <deck>, and serve <deck> –port 8000.

Which models does Gambit support?
The project demonstrates usage with an OpenRouter-style API and an example model parameter 'openai/gpt-4o-mini'; a full list of supported models is not confirmed in the source.

Can I author decks in TypeScript?
Yes. The library exposes helpers (defineDeck, defineCard) and the examples show TypeScript decks that use Zod for schemas and implement run/execute functions.

Is there a graphical interface for debugging?
Yes. Gambit includes a local Debug UI (simulator) that streams runs, renders transcripts and a trace/tools feed, and exposes routes such as /test-bot and /calibrate.

Is Gambit production-ready or supported commercially?
not confirmed in the source

Gambit Gambit helps you build reliable LLM workflows by composing small, typed “decks” with clear inputs/outputs and guardrails. Run decks locally, stream traces, and debug with a built-in UI. Quickstart…

Sources

Related posts

By

Leave a Reply

Your email address will not be published. Required fields are marked *