Guide

August 19, 2026 · View on GitHub

This directory is the home of OpenProgram's own programming model — the concepts you will not find in a generic LLM-framework tutorial, collected in one place. If you are writing functions for OpenProgram (or deciding whether to), read here first; the generic project docs (install, API index, troubleshooting) live in the other tabs. For the paradigm's background, see the philosophy.

Learning path

Read in order; each step builds on the previous one.

#DocWhat it teaches
1philosophy.mdWhy "agentic programming" — the rationale behind the model
2writing-functions/agentic-function.md@agentic_function: wrap a Python function whose body runs single LLM calls via llm(); composition patterns
3writing-functions/function-metadata.mdParameter descriptions, placeholders, hidden arguments, render_range — the source of truth for function metadata
4writing-functions/pure-python.mdWhen NOT to use the decorator: plain deterministic helpers
5embedding-in-your-own-stack.mdUsing the model as a plain library inside your own app or framework — bring your own LLM call, point state at your own directory

Choosing the next step

OpenProgram gives you three ways to decide "what runs next" inside a function. They are not alternatives to learn once and forget — picking the right one per task is the core skill:

DocMechanismUse when
choosing-the-next-step/fixed-order-calls.mdPython code calls sub-functions in a fixed orderThe step order is known ahead of time (pipelines: draft → review → revise)
choosing-the-next-step/tool-calling.mdProvider-native tool use: the model picks a function each turn, loop until it answers in textOpen-ended work where the model decides how many and which calls to make
choosing-the-next-step/next-step-decision.mddecision.make(prompt, options) / runtime.exec(..., choices=...): a text menu of options, the choice itself resolves into the next resultRouting / finite branches; options may be plain values, not just functions; no provider tool-use support needed

Reference