Skip to main content

Overview

Deploy your agents with ziet deploy. Your code goes live with API endpoints, CLI access, and dashboard UI.
ziet deploy
That’s it. Your agent is live at https://api.ziet.ai/agents/{agent_id}/run

Quick Deploy

1

Write your agent

# agent.py
from ziet import Agent, Action, memory

@Action(
    id="process_data",
    name="Process Data",
    description="Process input data"
)
def process_data(data: str) -> None:
    result = data.upper()
    memory.add(key="result", value=result)

@Agent(
    id="my_agent",
    name="MyAgent",
    instructions="Process data using the process_data action",
    actions=["process_data"]
)
class MyAgent:
    pass
2

Deploy

ziet deploy
Output:
🚀 Deploying to Ziet...

✓ Analyzing code...
✓ Building agent...
✓ Deploying my_agent...

✅ Deployed successfully!

Agent: my_agent
Endpoint: https://api.ziet.ai/agents/my_agent/run
Dashboard: https://dashboard.ziet.ai/agents/my_agent
3

Test it

ziet run my_agent --data "hello"

Deploy Commands

Deploy All Agents

Deploy all agents in your project:
ziet deploy

Deploy Specific Agent

Deploy only one agent:
ziet deploy my_agent

Deploy to Environment

Specify production or development:
ziet deploy --env production
ziet deploy --env development

Deploy Options

# Dry run (validate without deploying)
ziet deploy --dry-run

# Force redeploy (bypass cache)
ziet deploy --force

# Verbose output
ziet deploy --verbose

Project Structure

Recommended layout:
my-agent/
├── agent.py              # Agent definition
├── actions/              # Action functions (optional)
│   ├── __init__.py
│   ├── search.py
│   └── process.py
├── requirements.txt      # Python dependencies
└── .env                  # Local env vars (git-ignored)
Keep it simple - all you need is your Python file and requirements.txt.

Configuration (Optional)

requirements.txt

List your Python dependencies:
requests==2.31.0
openai==1.3.0
stripe==7.0.0
Ziet automatically installs these when deploying.

Environment Variables

Set secrets in the dashboard:
  • Dashboard
  • CLI
  1. Go to SettingsEnvironment Variables
  2. Click Add Variable
  3. Enter key and value
  4. Click Save
  5. Deploy (variables are automatically available)
Access in code:
import os

api_key = os.getenv("OPENAI_API_KEY")

Environments

Development vs Production

Test in development before going to production:
# Deploy to development
ziet deploy --env development

# Test it
ziet run my_agent --env development --data "test"

# Deploy to production
ziet deploy --env production

Versioning

Automatic Versioning

Each deployment creates a new version:
ziet deploy

# Output: Deployed my_agent@v23

Rollback

Roll back to a previous version:
# List versions
ziet versions my_agent

# Rollback
ziet rollback my_agent --version v22

Best Practices

Never hardcode API keys:
# ✅ Good
api_key = os.getenv("API_KEY")

# ❌ Bad
api_key = "sk-12345..."
# Test locally
ziet run --local --agent my_agent

# Then deploy
ziet deploy
# Test in dev
ziet deploy --env development

# Promote to production
ziet deploy --env production
Only include what you need in requirements.txt:
# Only list packages you actually import
openai==1.3.0
stripe==7.0.0

Troubleshooting

Solutions:
# Check for syntax errors
python agent.py

# Validate deployment
ziet deploy --dry-run

# Check logs
ziet deploy --verbose
Solution: Add to requirements.txt
# requirements.txt
requests==2.31.0
openai==1.3.0
Then redeploy:
ziet deploy --force
Solutions:
  1. Check dashboard: SettingsEnvironment Variables
  2. Verify exact name:
key = os.getenv("API_KEY")  # Must match dashboard
  1. Redeploy:
ziet deploy --force

Next Steps