Skip to content

Agents, Graphs, Loops

Run Claude Code and Codex agents as workflows you write in Python. AGL can use your subscription limits so API keys are optional.

uv tool install agents-gl

You write a workflow as an async Python function. Each step runs an agent role on a git branch AGL makes for the run, so your checkout stays as it is. When the run ends, its work waits for you on one branch, agl/<label>.

Features

Getting started

Before a run starts or resumes, AGL checks that each tool the workflow's roles use is ready. If one isn't, AGL refuses the run before any agent spends tokens.

Requirements

  • uv. If you don't have Python 3.14 or later, uv installs it for AGL.

  • git, with your name and email set. AGL commits agents' work under your name.

    git config --global user.name "Your Name"
    git config --global user.email "you@example.com"
    
  • Claude Code, Codex, or both. Either one is enough if your workflows only use its models.

Claude Code

AGL runs Claude models through Claude Code. Log in once and AGL uses that login.

claude

Then follow the login steps. If claude isn't found, install Claude Code first.

You can also set ANTHROPIC_API_KEY instead. When it is set, AGL uses the key, not your login.

Codex

AGL runs OpenAI models through Codex. Install it and log in.

curl -fsSL https://chatgpt.com/codex/install.sh | sh
codex login

You can also log in with an API key:

printenv OPENAI_API_KEY | codex login --with-api-key

Check the install

Check that AGL is installed:

agl --version

If your shell doesn't find agl, run uv tool update-shell and open a new terminal.

Next