File Structure:
autonomy.yaml
This configuration file defines a zone in your cluster in the Autonomy Computer. Think of a zone as your app’s dedicated infrastructure. The Autonomy Computer provisions everything needed to run it.autonomy.yaml
name: hello- The zone’s name (must be≤ 10characters, using onlya to zor0 to 9).pods- List of pods to create in this zone (a pod is a group of containers that run together).public: true- Serve the HTTP server on port 8000 of this pod on a public address over HTTPS.containers- List of containers in themain-pod.image: main- Create themaincontainer using the image defined inimages/main.
Environment variables and secrets
You can set environment variables in your containers:autonomy.yaml
secrets.yaml for sensitive values:
secrets.yaml
Multiple containers
Add multiple containers to a pod for tools agents need:autonomy.yaml
- Share the same network namespace.
- Can communicate via
localhost.
- MCP servers (Model Context Protocol tools).
- Python functions, simple binaries, or any TCP service your agents need.
- Creating private links to enterprise data sources.
Multiple pods
Split your application across pods:autonomy.yaml
clones to run multiple copies of a pod for parallel processing.
Dockerfile
Autonomy provides two base images (both include the Autonomy Framework pre-installed):- Development variant (
ghcr.io/build-trust/autonomy-python-dev) - Containspip,uv, andapkpackage managers plusbash,ash, andshshells. - Minimal variant (
ghcr.io/build-trust/autonomy-python) - Removes shells and package managers for additional security and reduced size.
images/main/Dockerfile
Python dependencies
Use multi-stage builds to install packages usingpip and requirements.txt:
images/main/Dockerfile
requirements.txt:
images/main/requirements.txt
uv with pyproject.toml:
images/main/Dockerfile
pyproject.toml:
images/main/pyproject.toml
System dependencies
For system packages likeffmpeg, use the development image as your base:
images/main/Dockerfile
When you need system shared libraries, use
ghcr.io/build-trust/autonomy-python-dev as your base image.main.py
The entrypoint to your application:One module
For a simple application with a single file:images/main/main.py
- Imports modules from the Autonomy Framework
which provides
Agent,Model, andNode. - Defines an async main function that:
- Starts an agent named “henry”.
- Gives it instructions to act as a legal assistant.
- Configures it to use Claude Sonnet 4 model.
- Starts an Autonomy Node - This creates the actor runtime that hosts your agent and
invokes the main function. It also starts an HTTP server on port
8000with a set of built-in APIs to interact with your agent.
Multiple modules
For larger applications, organize code into multiple modules:images/main/main.py
- Separate concerns.
- Reuse code.
- Test components independently.
- Keep you code easy to manage as your application grows.

