# Agentic Programming guide

1. [Philosophy](https://fzkuji.github.io/OpenProgram/docs/capabilities/agentic-programming/philosophy.html): why this model.
2. [Agent calls and methods](https://fzkuji.github.io/OpenProgram/docs/capabilities/agentic-programming/writing-functions/agent.html): direct `agent()` calls, configured `Agent` methods, method metadata.
3. [Function metadata](https://fzkuji.github.io/OpenProgram/docs/capabilities/agentic-programming/writing-functions/function-metadata.html): parameter descriptions, placeholders, hidden arguments, `render_range`.
4. [Pure Python](https://fzkuji.github.io/OpenProgram/docs/capabilities/agentic-programming/writing-functions/pure-python.html): deterministic helpers.
5. [Embedding](https://fzkuji.github.io/OpenProgram/docs/capabilities/agentic-programming/embedding-in-your-own-stack.html): the model as a library in your own app, with your LLM call and state directory.

## Choosing the next step

Picking the right one per task is the core skill.

| Mechanism | Who picks | Use when |
| --- | --- | --- |
| [Fixed-order calls](https://fzkuji.github.io/OpenProgram/docs/capabilities/agentic-programming/choosing-the-next-step/fixed-order-calls.html) | Python calls sub-functions in a set order | Order known ahead of time: draft, review, revise |
| [Tool calling](https://fzkuji.github.io/OpenProgram/docs/capabilities/agentic-programming/choosing-the-next-step/tool-calling.html) | The model, each turn, by provider-native tool use, until it answers in text | Open-ended work: the model decides which calls and how many |
| [Next-step decision](https://fzkuji.github.io/OpenProgram/docs/capabilities/agentic-programming/choosing-the-next-step/next-step-decision.html) | The model, from a text menu: `decision.make(prompt, options)` or `agent(prompt, choices=...)`. The pick resolves into the next result. | Routing and finite branches; options may be plain values; no provider tool use needed |

## Reference

- [Agent, Context and function API](https://fzkuji.github.io/OpenProgram/docs/reference/api/agent.html): authoring and validation conventions
- [`Runtime.exec()`](https://fzkuji.github.io/OpenProgram/docs/reference/api/runtime.html): parameters and behaviour
- [Function-calling design](https://fzkuji.github.io/OpenProgram/docs/reference/design/function/calling-unification.html): internals, not needed for authoring
- [LLM-as-Code: Agentic Programming for Agent Harness](https://arxiv.org/abs/2606.15874): the paper, accepted at the KDD 2026 AgenticSE workshop
