Self-programming AI agent framework

Build agents that program their own workflows.

OpenProgram agents are Python classes that can write new methods into their own code. Python owns the control flow and checks, and the model is called only where judgment is needed. Run them in one workspace with chat, files, a terminal, and a browser side by side.

OpenProgram workspace showing an agent session that ran two sub-agents OpenProgram workspace showing an agent session that ran two sub-agents
Hand parts of a task to sub-agents and get back only their results.

How it works

Every call recorded. Every decision checked.

Python runs the program and the model makes the calls. Every call is recorded, every model decision is checked before it runs, and an agent can change its own code between turns.

support.py
from openprogram import Agent

class Support(Agent):
    def triage(self, ticket: str) -> str:
        """Classify the ticket, then draft a reply."""
        kind = self(ticket, choices=["bug", "question"])
        if kind == "bug":
            logs = search_logs(ticket)  # your own helper
            return self(f"Reply using:\n{logs}")
        return self("Draft a short reply.")

Branches and checks are plain Python. self(...) is a model call, and choices makes the model pick from a fixed menu.

  1. 1

    A graph, not a transcript

    User turns, model calls, and function calls are nodes in one graph. Each call reads a selection of earlier nodes, so a sub-agent works on its own branch and hands back only its result.

    Context documentation →
  2. 2

    Agents that program themselves

    An agent writes and revises the methods of its own class with ordinary file tools. A watcher reloads the change, and the new method is a tool from the next turn.

    Workflows →
  3. 3

    Checked decisions

    When the model picks a step, code checks the pick before anything runs and sends a bad one back for another try.

    Next-step decisions →
  4. 4

    Events

    One process-wide bus carries typed events from the agent loop, context, files, channels, and memory. Plugins can gate a tool call before it runs.

    Event design →

One workspace

Use the interface that fits the task.

The Desktop App and the web UI are one workspace: split chats, files, terminals, and web pages into panes. The terminal UI, CLI, and ACP reach the same sessions, models, and tools.

OpenProgram context graph of a session with two user turns and their model calls OpenProgram context graph of a session with two user turns and their model calls
Every user turn, model call, and function call is a node you can open, branch from, or retry.

Agents

Use an agent or build your own.

Start from an agent that ships with OpenProgram, install one with a single command, or write your own in ordinary Python on the same runtime.

Installable programs

Your agent, packaged

An agent is a Python class, so it can live in its own repository. Install any packaged agent from GitHub and it shows up next to the built-in ones. Applications and tools are Programs too.

Quick start

Install, then run.

The installer brings its own Python. The first openprogram run walks you through connecting a model provider, either by importing a signed-in Claude Code, Codex, or Gemini CLI or by pasting an API key. openprogram web then opens the workspace at http://localhost:18100.

Prefer an app? The macOS Desktop App ships as a signed, notarized DMG on the releases page.

Platform and developer installation →
  1. 1
  2. 2
  3. 3

Build your next agent with OpenProgram.

Install it, connect a model, and start from a shipped agent or your own Python class.