- Follow the initial instructions to Get Started with Autonomy.
- Then continue on to the following steps:
Step 1: Create a new directory
Create a new directory for your app.All subsequent commands should be run from inside this
hello directory.Step 2: Create autonomy.yaml
Create a file named autonomy.yaml in the hello directory with the following content:
autonomy.yaml
name: hello- The zone’s name (must be≤ 10characters, using onlya to zand0 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- Createmaincontainer using the image defined inimages/main.
Step 3: Create the image directory
Create the directory structure for your container images:Step 4: Create a Dockerfile for the main image:
Createimages/main/Dockerfile with the following content:
images/main/Dockerfile
- The base image is pre-installed with Python and the Autonomy Framework.
- Copy all files from
images/main/into the container. - Run
main.pywhen the container starts.
Step 5: Create the application code:
Createimages/main/main.py with the following content:
images/main/main.py
- Imports modules from the Autonomy Framework -
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. It also starts an http server on port 8000 with a set of built-in APIs to interact with your agent.
get_current_time_utc- get current time in utc.get_current_time- get current time in any timezone.
Step 6: Create a web interface
Createimages/main/index.html with the following content:
images/main/index.html
- Display an input text area where users type messages.
- Call the agent’s streaming API at
/agents/henry?stream=true. - Show responses using a typewriter effect character by character.
- Handle streaming JSON responses from the agent.
index.html
at the root of the pods URL.
The complete code structure now looks like:
Step 7: Enroll with your cluster
Connect your workstation to your cluster in Autonomy Computer:- Display a code.
- Open your browser for authentication.
- Complete enrollment once you sign in.
Step 8: Deploy your app
Deploy your zone to the Autonomy Computer:- Build the container image.
- Push the image to your cluster.
- Deploy the zone with its pods and containers.
Step 9: Your zone’s URL
Your zone’s URL follows this pattern:a25bff50 and zone is hello, your URL is:
Step 10: Test the Agent API
Test that your agent is responding to API calls: Non-streaming request:Replace
${CLUSTER} and ${ZONE} with your actual cluster and zone names.Step 11: Open your app in a browser
Open your web interface:- “What are the key elements of a contract?”
- “What is consideration in contract law?”
- “Explain breach of contract”
Step 12: View logs (optional)
To view logs from your deployed zone, create a private encrypted portal to the logs server in your zone.http://127.0.0.1:32101. Open it in the browser to see streaming
logs for all container in the zone.
Common Issues and Solutions
Zone name too long or has invalid chars
Zone name too long or has invalid chars
Zone names must be 10 characters or less, using only
a to z and 0 to 9. Edit autonomy.yaml and change the name field to something shorter.Docker not running
Docker not running
Start Docker Desktop or your Docker daemon. Verify with
docker ps.Autonomy Command not found
Autonomy Command not found
Run
source "$HOME/.autonomy/env" to add the command to your PATH.Connection refused when testing
Connection refused when testing
Wait a couple of minutes after deployment.
Agent not responding
Agent not responding
Check the logs using the portal method shown in Step 12. Look for errors in the pod startup or agent initialization.
Web interface shows blank page
Web interface shows blank page
Verify that
index.html is in images/main/ and was included in the container build. Redeploy with autonomy zone deploy.Update Your App
To make changes to your app:- Edit your files (e.g., change the agent instructions in
main.py). - Redeploy with
autonomy zone deploy. - Wait a couple of minutes for the new version to be ready.
- Test your changes.

