OpenProgram Docs

API reference

ComponentSourceWhat it is
Agent Context agent agent_asyncruntime/agent/, runtime/context/model.pyDirect calls, configured Agent methods, automatic execution context
Runtimeruntime/agent/runtime/Computes context from the DAG, calls the LLM, writes the response back
create_runtime and providersruntime/agent/runtime/factory.py, models/providers/Detect or explicitly create a Runtime

Paths are under openprogram/. The session context is a flat DAG of user messages, LLM calls and function calls: architecture.

Imports

from openprogram import Agent, Context, agent, agent_async, Runtime, Session, decision
from openprogram import ChatAgent, TurnRequest, TurnResult
from openprogram.runtime.agent.runtime.factory import create_runtime

Example

from openprogram import Agent

class Observer(Agent):
    tools = []

    def observe(self, task: str) -> str:
        """Identify the requested UI element."""
        return self(f"Find the UI element for: {task}. Reply with its label only.")

print(Observer().observe("login button"))

There are no meta functions like create() or fix(). Write, change and validate Agent methods and Program functions with ordinary file-editing tools.

Last updated · 2026-11-25