Pragmatic

The documentation.

How to install Pragmatic, what ships in 0.5, what is in preview for 0.6, and the terms. If this site and the repository’s release/0.5.0 branch ever disagree, believe the branch.

Get it

Install it, wrap a client.

Pragmatic 0.5 is a drop-in Python package for agents built on the Anthropic or OpenAI SDKs. It is not yet a packaged release, so install it from source, which needs Python 3.9 or later and a Rust toolchain.

your terminal

# from source, on the release/0.5.0 branch
git clone -b release/0.5.0 https://github.com/pragmaticco/pragmatic
pip install "./pragmatic/crates/pragmatic-python[anthropic]"   # or [openai]

# the CLI, to inspect and verify journals
cargo install --path pragmatic/crates/pragmatic-cli

Next, the quickstart takes one agent through record, crash, resume, replay and verify. The repository’s release/0.5.0 branch carries the full usage guide and runnable examples: github.com/pragmaticco/pragmatic.

What ships

Python · 0.5

The Python package.

pragmatic-runtime, imported as pragmatic. ctx.wrap for Anthropic and OpenAI clients, sync and async. ctx.run_tools for the tool calls in a model response. ctx.draw and ctx.tool for any other model client or function. @pragmatic.durable to catch a changed agent before it replays. Per-run budgets, tool allowlists, a recovery policy for interrupted tool calls, and keyed journals.

Rust · 0.5

The crates.

pragmatic is the runtime itself, sync and async, with no dependencies. pragmatic-anthropic and pragmatic-openai record Claude and any OpenAI-compatible server, including full tool-use loops for Claude. The Python package runs on the same core, so journals are the same format from either language.

The CLI · 0.5

Inspect and verify.

The pragmatic command: runs, show, verify, export and serve, over a directory of journals. verify walks the hash chain and names the first entry that does not match. export writes one run as a self-contained HTML file. serve opens a console on 127.0.0.1 only, since journals hold prompts and outputs.

Other languages

C++, Java, Go and Node.

Bindings over one C interface, covering record, resume, replay and verify. They are maintained; new features land in Python and Rust first.

0.6 · design-partner preview

The system-of-record features.

A new journal format in which each piece of content can be erased; branches for parallel work; capture at the HTTP layer for streaming and agent frameworks; erasure, evidence bundles and evidence verification in the CLI; and Pragmatic Server. These are being built and are not yet generally available. Talk to us about the preview.

The terms

Open source, Apache 2.0.

From 0.5, the runtime, the Python SDK, the Rust crates, the language bindings, the CLI, the journal format and its verifier are licensed under the Apache License 2.0. Use them anywhere, in production, at any scale. Version 0.4 was source-available under the Business Source License.

Pragmatic Server, commercial.

Pragmatic Server is a commercial product from Pragmatic Research, Inc., in preview with design partners while 0.6 is built. Email us to join.

Scope, stated honestly.

In 0.5, journals are files on local disk, written by one process at a time. Only calls made through Pragmatic are recorded: the wrapped client, ctx.run_tools, ctx.tool, ctx.draw and the other ctx methods. Streaming and .parse() are refused inside a run rather than skipped. Pragmatic sends no telemetry and never contacts a Pragmatic service; it talks only to the model APIs you call. Journals written by 0.5 can still be verified and exported in 0.6, but not resumed or replayed; 0.6 uses a new journal format.

Next Quickstart