# What the agent's program is

> Understand what an agent is made of, a folder of typed files that declare facts, rules and capabilities, and how Apollo-1 uses them on every turn.

- Source: https://www.aui.io/help/agent-program/what-is-the-agent-program
- Section: The agent's program
- Last updated: November 23, 2026

An agent built on Apollo-1 is its program: a folder of typed YAML files that states what the agent can know, what it may do, what it must never do and what it says. Everything you change with the Agent Builder or the CLI is a change to this program, so knowing what is in it helps you ask for the right change and read why the agent did what it did. You do not need to write YAML yourself: the builder writes the program from plain-language requests.

![The Playground in dark mode with the ACME Air Rebooking Agent on the commit tagged v0.2. The Agent Builder pane shows the Program files view, read only: the Source tree has build/ and src/, with src/ open to capabilities/, policies/, connections.yaml, derivations.yaml, program.yaml, sources.yaml and vocabulary.yaml. program.yaml is open beside it, showing the agent's id, caller, context and voice settings.](https://www.aui.io/assets/help/agent-program/what-is-the-agent-program/program-files.png)

*The program of the ACME Air Rebooking Agent, as the Program files view shows it.*

## Declarations, not workflows

The program is not a flow chart and not a prompt. It does not say "first ask for the booking code, then look up the trip, then offer a refund". Instead it declares the pieces your business is made of, each on its own:

- the facts the agent can hold, such as a booking code, a fare class or a cancellation fee
- the jobs it can do, such as looking up a trip or canceling a flight, and what each job needs first
- the rules that must hold before a job goes ahead, and the words to use when one does not
- where facts come from, such as your booking system or a policy document

At run time Apollo-1 reasons over all of these together and works out the path for the conversation in front of it. A caller who gives the booking code in the first message does not walk the same steps as one who needs help finding it, and a caller who raises a second question halfway through does not fall off a path, because none was drawn. So one rule covers every conversation it applies to: if ACME Air adds a $15 convenience fee for cancellations made through chat, that is one rule, whether the caller asks about the fee first or last.

## How the program runs

The program is compiled, and Apollo-1 reasons over it on every turn: it reads the message into facts the program declares, gathers what the matching job needs (from what it already knows, from your systems, from worked-out values, or by asking the caller), checks the rules, acts only when they hold, and replies. Every turn leaves a full record of these decisions, which the [Reasoning pane](https://www.aui.io/help/understanding-decisions/the-reasoning-pane) shows. Because behavior lives in the program, changing the program changes the agent, with no retraining.

## What is in the folder

The program files live under `src/`. Each concern has its own file:

| File or folder | What it declares |
|---|---|
| `program.yaml` | Who the agent is: its identity, voice, welcome message and which details your system sends at the start of a conversation. The only required file. |
| `vocabulary.yaml` | The facts the agent can know and the records it can hold, such as a trip or a booking. |
| `capabilities/` | One folder per job the agent can do, such as changing a flight. |
| `policies/` | The rules that must hold before a job goes ahead, and rules about what a reply must or must never say. |
| `derivations.yaml` | Values worked out from other values, such as a fee or an eligibility check. |
| `sources.yaml` | Where facts come from and what changes the world: every read and every write. |
| `connections.yaml` | How the agent reaches your systems: endpoints, sign-in and knowledge hubs. Secret values stay in the vault. |

The Playground calls the systems your agent reaches its [integrations](https://www.aui.io/help/integrations/integrations-overview). In the program files, the same things are described by `sources.yaml` and `connections.yaml`.

Next to `src/` there is a `build/` folder. It holds what the builder uses to plan and check the agent, not what customers talk to: the spec (what the agent is for, its test callers and one card per capability), the scripted cases a regression replays, and a log of decisions. The [Agent panel](https://www.aui.io/help/agent-program/the-agent-panel) shows the spec in readable form.

## Who writes it, and how changes are kept

- **The Agent Builder** edits the program from your plain-language requests and validates it. Its edits stay as unsaved changes until you push. See [Unsaved changes and Push](https://www.aui.io/help/building/unsaved-changes-and-push).
- **The Apollo CLI** lets developers and coding agents edit the same files in their own editor. See [Work on the same agent from the CLI](https://www.aui.io/help/agent-program/work-from-the-cli).

The whole program is saved together. Each push adds a commit to the branch you are on, and customers get the one commit someone has made live. See [Branches and commits](https://www.aui.io/help/branches/branches-and-commits).

## Learn more

The developer documentation describes each file in detail, starting from [The agent program](https://docs.aui.io/overview/agent-program), with pages on [vocabulary](https://docs.aui.io/overview/vocabulary), [capabilities and policies](https://docs.aui.io/overview/capabilities-and-policies) and [derivations](https://docs.aui.io/overview/derivations).
