Getting Started
Install Zil and run your first agent in five minutes.
Prerequisites
- Python 3.11+
- uv (
curl -LsSf https://astral.sh/uv/install.sh | sh)
1. Install
uv pip install 'zil-ai[adk]'Verify:
zil --version
# zil, version 0.1.212. Create a project
zil init my-agentThe CLI prompts for your LLM provider (Gemini, Anthropic, OpenAI, or Vertex AI), then scaffolds the project, creates a virtual environment, and installs dependencies.
Use --non-interactive to accept all defaults:
zil init my-agent --non-interactive3. Configure your API key
cd my-agent
source .venv/bin/activate
cp my_agent/.env.example my_agent/.envEdit my_agent/.env and add your API key. The default provider is Gemini — get a key at aistudio.google.com/apikey .
For other providers, see Adapters — LLM.
4. Start the agent server
zil serveThis starts a FastAPI server with REST endpoints, SSE streaming, and A2A protocol support.
Open http://localhost:8000/health to verify it’s running, then send messages via the sessions API.
5. What to edit
| File | Purpose |
|---|---|
identity/persona.md | Who the agent is |
identity/instructions.md | How the agent behaves |
identity/guardrails.yaml | Hard rules and boundaries |
adapters/llm.yaml | LLM provider and model |
my_agent/agent.py | Tools and logic |
The generated agent.py uses one function to wire everything:
import zil
root_agent = zil.create_agent(
tools=[], # add your tool functions here
)See SDK Reference for all create_agent() options.
What’s next
| Goal | Command / Page |
|---|---|
| Validate your project | zil validate — CLI Reference |
| Security audit | zil audit — CLI Reference |
| Write and run evals | zil eval — Evaluation |
| Test in Docker | zil serve --docker --trace — CLI Reference |
| Package and publish | zil pack → zil push — Packaging |
| Deploy to Cloud Run | zil deploy — CLI Reference |
| Choose a framework | zil init --framework openhands — Frameworks |
| Multi-agent projects | zil init --agents vta,vtd — Multi-Agent & HITL |
| Add skills | zil init --skills fd-submit-changes — Skills |
| Runtime dependencies | spec.runtime.dependencies — Runtime Dependencies |
| Set up tracing | Observability |
| Guardrails reference | Identity — Guardrails |