Agent Execution Guide
Start, monitor, and stop AI agents from the terminal
What are Agents?#
Agents are long-running task executors hosted by the Lattice daemon, the local background service installed alongside ada. You give an agent a task description, and it works on that task in the daemon while you keep using your terminal.
Two command groups manage this work:
ada agentsstarts, lists, and stops agents.ada tasksqueues tasks on the local daemon and tracks them across local and cloud backends.
Prerequisites#
The Lattice daemon starts on demand the first time a command needs it. To keep it running as a background service instead, run:
ada setup repair
This registers lattice-daemon with the operating system's service manager (launchd or systemd) and starts it. If ada is not installed yet, follow the installation guide.
Starting an Agent#
# Start an agent on a task
ada agents start "Generate unit tests for src/user-service.ts"
# Wait until the agent has started before returning
ada agents start "Audit src/ for security vulnerabilities" --wait
# Start an agent in a specific workspace
ada agents start "Document the public API in src/api" --workspace <workspace-id>
Run ada agents with no subcommand to open the interactive agent dashboard.
Listing Running Agents#
# List all running agents
ada agents list
# JSON output for scripting
ada agents list --format json
# Only agents in one workspace
ada agents list --workspace <workspace-id>
--format accepts table (default), json, csv, and list.
Checking Status#
# Daemon status
ada agents status
# One agent's status
ada agents status <agent-id>
# Daemon, agent, recovery, tool, and reachability health
ada status
ada status --wide
Stopping an Agent#
# Stop an agent (asks for confirmation)
ada agents stop <agent-id>
# Stop without a confirmation prompt
ada agents stop <agent-id> --yes
# Force kill the agent
ada agents stop <agent-id> --force
Working with Tasks#
Use ada tasks to queue work on the local daemon and follow it through to completion:
# Queue a task
ada tasks submit "Update README.md to match the current CLI flags"
# Queue a subtask of an existing task
ada tasks submit "Add examples to the usage section" --parent <task-id>
# List tasks, optionally filtered by status or workspace
ada tasks list
ada tasks list --status running
# Show one task
ada tasks get <task-id>
# Follow a task until it reaches a terminal state
ada tasks monitor <task-id> --follow
# Show a task and its subtasks
ada tasks tree <task-id>
# Pause, resume, or cancel the agent executing a task
ada tasks pause <task-id>
ada tasks resume <task-id>
ada tasks cancel <task-id>
# Show the task queue
ada tasks queue-status
For tasks routed to a cloud agent, pass --agent-id <agent-id> to ada tasks get, ada tasks monitor, and ada tasks cancel.
Workflow: Monitor Your Agents#
-
Check daemon health:
ada status -
Start an agent:
ada agents start "Refactor src/auth to use the shared error types" --wait -
Check running agents:
ada agents list -
Stop the agent when it is no longer needed:
ada agents stop <agent-id>
Troubleshooting#
No Agents Listed#
Problem: ada agents list shows no agents.
Cause: The daemon is running, but no agents have been started.
Solution: Start one with ada agents start "<task description>".
Daemon Not Running#
Problem: Agent commands fail to connect to the daemon.
Solution:
# Show setup status and recommended next steps
ada setup status
# Install and start the daemon as an OS service
ada setup repair
# Check the service from the Lattice control CLI
lattice-ctl service status
Connection Issues#
Problem: The daemon is running but not responding.
Solution:
# Check whether the daemon answers
lattice-ctl ping
# Restart the service
lattice-ctl service restart
# Run local diagnostics
ada doctor
Next Steps#
- Interactive Chat: work with Ada conversationally
- MCP Integration: connect external tools
- Workspace Management: organize agents and tasks