Skip to content

Daily Usage

This guide covers the commands and workflows you’ll use every day once AgentZero is set up. For initial setup, see the Quick Start. For production hardening, see Production Setup. For the full command reference, see CLI Commands.


Terminal window
agentzero status # quick summary
agentzero daemon status # if running as a daemon
agentzero doctor models # verify provider connectivity

Start the gateway (if not running as a service)

Section titled “Start the gateway (if not running as a service)”
Terminal window
# Foreground (development)
agentzero gateway
# Background daemon (production)
agentzero daemon start

If you installed AgentZero as a system service, it starts automatically on boot — skip this step.


Terminal window
agentzero agent -m "List all TODO comments in the Rust files"
Terminal window
agentzero agent -m "Summarize the README" --stream
Terminal window
agentzero agent -m "Quick question" --model gpt-4o-mini
agentzero agent -m "Complex analysis" --model anthropic/claude-sonnet-4-6
Terminal window
agentzero agent -m "hello" --profile work-anthropic

If the gateway is running, you can also interact via HTTP:

Terminal window
# Simple chat
curl -X POST https://agent.example.com/api/chat \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"message": "What files changed today?"}'
# OpenAI-compatible endpoint (works with any OpenAI client library)
curl -X POST https://agent.example.com/v1/chat/completions \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"model": "default", "messages": [{"role": "user", "content": "hello"}]}'

Terminal window
agentzero memory list # last 50 entries
agentzero memory list --limit 10 # last 10
agentzero memory list --offset 50 --limit 25 # paginate
Terminal window
agentzero memory get # most recent
agentzero memory get --key "project" # by prefix match
Terminal window
agentzero memory stats
Terminal window
agentzero conversation list # list all conversations
agentzero conversation fork # fork current conversation into a new branch
agentzero conversation fork --name "explore" # fork with a custom name
agentzero conversation switch <id> # switch to a different conversation

Forking is useful when you want to explore an alternative direction without losing the current thread.

Terminal window
agentzero memory clear --key "old-session" --yes # by prefix
agentzero memory clear --yes # everything (careful!)

Terminal window
agentzero config show # secrets masked
agentzero config show --raw # secrets visible
agentzero config get provider.model
Terminal window
agentzero config set provider.model "anthropic/claude-sonnet-4-6"
agentzero config set agent.max_tool_iterations 25
agentzero config set agent.parallel_tools true

Changes take effect on the next agent invocation. The daemon picks up config changes automatically.


Terminal window
# Interactive (prompts for the key)
agentzero auth setup-token --provider openrouter
# Non-interactive
agentzero auth setup-token --provider anthropic --token sk-ant-...
Terminal window
agentzero auth list # all profiles
agentzero auth status # active profile
agentzero auth use --provider anthropic --profile work # switch
agentzero auth logout --provider openrouter # remove

OAuth login (for providers that support it)

Section titled “OAuth login (for providers that support it)”
Terminal window
agentzero auth login --provider openai-codex # opens browser
agentzero auth login --provider anthropic # opens browser (claude.ai)
agentzero auth refresh --provider openai-codex # refresh expired token
agentzero auth refresh --provider anthropic # refresh expired token

Terminal window
agentzero providers
Terminal window
agentzero models list
agentzero models list --provider anthropic
agentzero models refresh --force # update the cache
Terminal window
agentzero models set gpt-4o
Terminal window
agentzero local discover # scan for Ollama, LM Studio, etc.
agentzero local health ollama # check specific provider
agentzero models pull llama3.1:8b # pull a model (Ollama)

Terminal window
agentzero tools list # all registered tools
agentzero tools info read_file # details on a specific tool
agentzero tools schema shell # JSON schema for tool input

Tools are enabled/disabled via config. Key toggles:

ToolConfig to enable
write_file, file_editsecurity.write_file.enabled = true
git_operationssecurity.enable_git = true
web_searchweb_search.enabled = true
browserbrowser.enabled = true
mcp__{server}__{tool}security.mcp.enabled = true + mcp.json

Terminal window
# Standard cron format
agentzero cron add --id daily-report \
--schedule "0 9 * * *" \
--command "agentzero agent -m 'Generate daily summary'"
# Every N interval
agentzero cron add-every --id hourly-check \
--schedule "1h" \
--command "agentzero agent -m 'Check system status'"
# One-time future task
agentzero cron once --id reminder \
--schedule "2026-03-05T14:00:00" \
--command "agentzero agent -m 'Meeting reminder'"
Terminal window
agentzero cron list
agentzero cron pause --id daily-report
agentzero cron resume --id daily-report
agentzero cron update --id daily-report --schedule "0 10 * * *"
agentzero cron remove --id daily-report

Terminal window
curl -s http://127.0.0.1:42617/health # {"status":"ok"}
curl -s http://127.0.0.1:42617/metrics # Prometheus format
Terminal window
agentzero daemon status
agentzero daemon status --json # PID, uptime, port, host
Terminal window
agentzero doctor traces # last 20 events
agentzero doctor traces --limit 5 # last 5
agentzero doctor traces --event "tool_call" # filter by type
agentzero doctor traces --contains "error" # search text
Terminal window
agentzero cost status # spending summary
agentzero cost status --json # for dashboards
agentzero cost reset # reset counters

Daemon logs are at {data_dir}/daemon.log (auto-rotated at 10 MB, 5 files kept):

Terminal window
tail -f ~/.agentzero/daemon.log

Terminal window
agentzero estop # full stop (kill-all)
agentzero estop --level network-kill # cut network only
agentzero estop --level tool-freeze --tool shell --tool write_file # freeze specific tools
Terminal window
agentzero estop status
agentzero estop resume # resume everything
agentzero estop resume --network # resume network only
agentzero estop resume --otp 123456 # if OTP required

Terminal window
agentzero channel add telegram # interactive setup
agentzero channel list # show configured channels
agentzero channel doctor # run diagnostics
Terminal window
agentzero channel start # launch all configured channels
Terminal window
agentzero channel remove telegram

Terminal window
agentzero update check # check for new versions
agentzero update apply # install latest
agentzero update apply --version 0.3.0 # install specific version
agentzero update rollback # roll back if something breaks

Terminal window
agentzero -v agent -m "test" # errors only
agentzero -vv agent -m "test" # info
agentzero -vvv agent -m "test" # debug
agentzero -vvvv agent -m "test" # trace (very verbose)

Every command supports --json:

Terminal window
agentzero daemon status --json
agentzero memory list --json
agentzero auth list --json
agentzero cost status --json
Terminal window
agentzero doctor models # probe all providers
agentzero doctor traces --limit 10 # recent runtime events
agentzero channel doctor # channel connectivity
Terminal window
# Add to your shell profile for tab completion
agentzero completions --shell zsh >> ~/.zshrc
agentzero completions --shell bash >> ~/.bashrc
agentzero completions --shell fish >> ~/.config/fish/config.fish

What you want to doCommand
Send a messageagentzero agent -m "..."
Stream responseagentzero agent -m "..." --stream
Check healthagentzero status
Start the serveragentzero daemon start
Stop the serveragentzero daemon stop
View configagentzero config show
Change a settingagentzero config set key value
List toolsagentzero tools list
View memoryagentzero memory list
Clear memoryagentzero memory clear --yes
Switch modelagentzero models set model-name
Add auth tokenagentzero auth setup-token --provider name
Schedule a taskagentzero cron add --id name --schedule "..." --command "..."
Emergency stopagentzero estop
Check costsagentzero cost status
View tracesagentzero doctor traces
Update AgentZeroagentzero update apply