Skip to content

One function. That's the entire agent.

One function. That's the entire agent.

JAZ is an open-source Python framework for LLM agents. You hand one function a task and the Python objects you already have; the model writes the code, JAZ runs it, and you get a real, typed Python value back.

Why JAZ

Three reasons to use it.

  1. Easy to integrate

    Your functions are the tools and your objects are the inputs: nothing to rewrite, nothing to convert into a format the agent can read. The answer comes back as a Python value you can use.

  2. Cheap and efficient

    The agent writes its own workflow and manages its own memory, under a dollar cap you set once. Ahead of specialised systems on published benchmarks, at lower cost.

  3. Observable and open

    Every step is code you can read, log and replay, in a sandbox that allows only what you allow. Open source, Apache-2.0. Any model provider, or a model on your own machine: no lock-in.

Prompt only, no tools or memory system, against a memory agent (Letta) and a self-improving harness (ACE). GPT-5.4 nano, mean of three runs, from the paper's tables 1 and 2.

The same task in LangChain, OpenAI Agents, PydanticAI, smolagents, CrewAI and DSPy, side by side. Compare →

One function

What you call is what you get.

JAZ is an open-source Python framework for building agents on top of large language models. There is one function to learn, invoke. You call it with a task and whatever Python you have in hand: a DataFrame, a database connection, your own functions and classes. The model writes the body of that call as Python code, JAZ runs it in a sandboxed interpreter, and the result comes back as a real Python value of the type you asked for. There is no graph to wire, no tool schema to write and nothing to parse: the model's reply is the program.

penguins.ipynb
plots = jaz.invoke(    task="Make plots comparing penguin species.",    df=pd.read_csv("penguins.csv"),    web_search=web_search,)plots

The model wrote the loop that drew these; JAZ ran it and handed back the list. See what happens under the hood →

Tutorials

Learn by running it

Five Colab notebooks, one concept each — no install required. Open the first and watch an agent turn a real dataset into a typed report in minutes.

In [1]~10 min

Inputs: prompts, tools, and data

One kind of argument. A prompt, a tool, a number, your own object — each becomes a variable in the agent's REPL and is described in its prompt. Nothing else to learn first.

Open in Colab
In [2]~10 min

Recursive subagents and scope

An agent that calls agents. Why the inputs you pass stop at the call that received them, and how scope hands a tool to the whole tree.

Open in Colab
In [3]~12 min

Hooks, events and effects

Typed returns, validation, budgets and limits turn out to be one mechanism: a hook observes events and returns effects. Write your own.

Open in Colab
In [4]~10 min

Configuration

The LLM, the REPL and the protocol underneath it all — including what the agent is allowed to import, and how to change any of it for a single call.

Open in Colab
In [5]~12 min

Putting it together

The homepage's program with every feature on: the penguins DataFrame and a live web search in, a typed report out, validated, logged and on a budget.

Open in Colab

The jaz console

Or just talk to it.

Installing puts a jaz command on your PATH: a real Python REPL where a sentence is a statement. Ask with >, capture a typed result with <-, and ?x shows exactly what the agent sees for x. Pick a line to type it.

$ jazrecorded session
Interactive jaz console — a real Python REPL with conversational sugar. > summarize {doc} ask the agent (binds `doc` as input) n: int <- how many words? capture a typed result ?doc show what the agent sees for `doc` % why did that time out? ask the jaz helper — questions are answered, % switch to gpt-5 changes are confirmed before running <any Python> runs as normal Python setup_llm() guided LLM setup (providers, keys, models) jaz, invoke and jprint are pre-imported. Type exit() or Ctrl-D to quit.
>>> > what is 2 + 2?
│ [0] return 2 + 2
✓ (0.0s)
4
>>> import pandas as pd
>>> df = pd.read_csv("penguins.csv")
>>> ?df
species island bill_length_mm bill_depth_mm flipper_length_mm body_mass_g sex 0 Adelie Torgersen 39.1 18.7 181.0 3750.0 MALE 1 Adelie Torgersen 39.5 17.4 186.0 3800.0 FEMALE 2 Adelie Torgersen 40.3 18.0 195.0 3250.0 FEMALE 3 Adelie Torgersen NaN NaN NaN NaN NaN 4 Adelie Torgersen 36.7 19.3 193.0 3450.0 FEMALE .. ... ... ... ... ... ... ... 339 Gentoo Biscoe NaN NaN NaN NaN NaN 340 Gentoo Biscoe 46.8 14.3 215.0 4850.0 FEMALE 341 Gentoo Biscoe 50.4 15.7 222.0 5750.0 MALE 342 Gentoo Biscoe 45.2 14.8 212.0 5200.0 FEMALE 343 Gentoo Biscoe 49.9 16.1 213.0 5400.0 MALE [344 rows x 7 columns]
>>> > which island has the most penguins in {df}?
│ [0] return df["island"].value_counts().idxmax()
✓ (0.1s)
'Biscoe'
>>> heaviest: str <- the heaviest species in {df}, on average
│ [0] return df.groupby("species")["body_mass_g"].mean().idxmax()
✓ (0.1s)
>>> ?heaviest
Gentoo
>>> n: int <- how many penguins have no recorded sex in {df}?
│ [0] return int(df["sex"].isna().sum())
✓ (0.1s)
>>> n * 2
22
>>> > plot body mass by species from {df}
│ [0] ax = df.boxplot(column="body_mass_g", by="species")
│ ax.set_ylabel("body mass (g)")
│ ax.figure.suptitle("")
│ return ax.figure
✓ (0.6s)
<Figure size 640x480 with 1 Axes>
>>> _.savefig("mass.png")
>>>

A recorded session, replayed as you pick lines. The console needs Python 3.14; pip install jaz-lang puts jaz on your PATH. How the console works ↗