Getting Started
Install Zil and run your first agent in five minutes.
Prerequisites
- Python 3.11+
pip(orpipx)
1. Install
pip install 'zil-ai[adk]'Verify:
zil --version
# zil, version 0.1.122. 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. Run your agent
# Interactive CLI
zil run
# Or browser-based chat UI
zil web5. 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 web --docker --trace — CLI Reference |
| Package and publish | zil pack → zil push — Packaging |
| Deploy to Cloud Run | zil deploy — CLI Reference |
| Set up tracing | Observability |
| Guardrails reference | Identity — Guardrails |