-q, --quiet Suppress info messages (only show warnings/errors)-d, --debug Enable verbose debug logging--no-tty Disable TUI output (plain logs for piping/automation)-v, --verbose Show detailed execution information--timeout <seconds> Maximum execution time in seconds (default: 300)-C, --directory <path> Run as if agentuse was started in <path> instead of the current directory--env-file <path> Path to custom .env file-m, --model <model> Override the model specified in the agent file--mock Mock all tool outputs with the LLM instead of executing them (no real side effects). Requires --mock-model.--mock-model <model> Model that generates mock tool outputs (required with --mock; pick a cheap, reachable model)--mock-approval Also mock the await_human approval gate instead of suspending
The --quiet and --debug options cannot be used together.
You can also set NO_TTY=true to force plain logging without spinners.
The -C or --directory option is the starting directory for the command:
# Without -C: runs from current directoryagentuse run agent.agentuse# With -C: starts from the specified directoryagentuse run agent.agentuse -C /path/to/project-or-subdir
AgentUse searches from the current directory upward for .agentuse/, .git/, or package.json. If none are found, the starting directory is the project root.The project root is used for:
Loading .env files
Finding plugins in .agentuse/plugins/
Owning shared stores in .agentuse/store/
Grouping session state
For agentuse serve, -C also defines the served scope: only .agentuse files under that directory are exposed, while state still belongs to the detected project root.This is useful for:
Running agents from different projects
CI/CD environments with complex directory structures
# Override with OpenAI GPT-5agentuse run agent.agentuse --model openai:gpt-5.5agentuse run agent.agentuse --model opencode-go:kimi-k2.7-code# Use Anthropic Claude Haiku for quick testingagentuse run agent.agentuse -m anthropic:claude-haiku-4-5# Use different API key via environment suffixagentuse run agent.agentuse --model openai:gpt-5.5:devagentuse run agent.agentuse --model opencode-go:kimi-k2.7-code:dev# This will use OPENAI_API_KEY_DEV instead of OPENAI_API_KEY# Use specific environment variableagentuse run agent.agentuse --model anthropic:claude-sonnet-5:ANTHROPIC_API_KEY_PERSONAL
When overriding models, provider-specific options (like OpenAI’s reasoningEffort)
will be ignored if you switch to a different provider.
Model overrides propagate to all sub-agents. When you use --model, both the parent
agent and all its sub-agents will use the specified model, regardless of what models
are defined in their individual agent files.
--mock runs an agent with no real tool side effects: each tool call is answered by an
LLM-generated result instead of executing. The agent runs for real; only tool execution is faked.
agentuse run agent.agentuse --mock --mock-model anthropic:claude-haiku-4-5agentuse run agent.agentuse --mock --mock-model openai:gpt-5.4-nano
Use the lowest-end model you can reach for --mock-model. Mocking is not a reasoning task: the model only has to fabricate a plausible result for a tool given its name and arguments. Your agent’s actual reasoning still runs on its own model, untouched. A small, fast model produces fine mock output while keeping cost and rate-limit pressure low, which matters because mock fires one LLM call for every tool result (and they run concurrently when the agent batches tool calls).Good low-end picks, by provider:
Provider
Suggested --mock-model
anthropic
anthropic:claude-haiku-4-5
openai
openai:gpt-5.4-nano
openrouter
openrouter:deepseek/deepseek-v4-flash
Pick one in a provider you’re authenticated for. (Model IDs drift over time; the current low-end tier is the rule, not these exact names.)
A mock model is required. Mock fires an LLM call for every tool result, so it must run on a model you can reach. It is deliberately not defaulted to the agent’s own model: that ran mock onto the agent’s premium, rate-limited token and produced opaque 429s. Provide it per run with --mock-model, or set a global default once via AGENTUSE_MOCK_MODEL in the shell, ~/.agentuse/.env, or the env block of ~/.agentuse/config.json. The flag wins over all of them.
Sub-agents run for real; their leaf tools are mocked.
The approval gate stays real: await_human still suspends so you can verify the agent pauses for approval. Pass --mock-approval to mock it too.
MCP servers still connect at startup for tool discovery, but no tool executes (no mutations). Mock outputs are non-deterministic.
HTTPS Only: Only HTTPS URLs are allowed for security
File Extension: Remote agents must have .agentuse extension
Interactive Confirmation: AgentUse will show a security warning with options:
[p]review - Fetch and display the agent content before running
[y]es - Execute the agent directly
[N]o - Abort execution (default)
Example security prompt:
⚠️ WARNING: You are about to execute an agent from:https://example.com/agent.agentuseOnly continue if you trust the source and have audited the agent.[p]review / [y]es / [N]o:
# Run agent from current directoryagentuse run hello.agentuse# Run agent from subdirectorycd agents/subfolderagentuse run my-agent.agentuse # Finds .env and plugins at project root# Change to different directory first with -Cagentuse run agent.agentuse -C /my/project # Same as: cd /my/project && agentuse run agent.agentuse# Run agent from a different projectagentuse run newsletter/writer.agentuse -C ~/projects/content# Use custom environment fileagentuse run agent.agentuse --env-file .env.production# Run with additional promptagentuse run assistant.agentuse "Help me write an email"# Run with multi-word promptagentuse run code-review.agentuse "focus on security and performance issues"# Run remote agent (requires HTTPS and .agentuse extension)# Shows security warning and requires confirmationagentuse run https://example.com/agent.agentuse# Run remote agent with additional promptagentuse run https://example.com/agent.agentuse "use production settings"# Run with debug outputagentuse run agent.agentuse --debug# Run with additional prompt and verbose outputagentuse run agent.agentuse "be thorough" --verbose# Run with custom timeoutagentuse run agent.agentuse --timeout 600# Run quietly (only warnings/errors)agentuse run agent.agentuse --quiet# Disable TUI output for piping/automationagentuse run agent.agentuse --no-tty# Override model at runtimeagentuse run agent.agentuse --model openai:gpt-5.4-mini# Override model and add promptagentuse run agent.agentuse "be concise" --model anthropic:claude-haiku-4-5# Use development API key with model overrideagentuse run agent.agentuse -m openai:gpt-5.5:dev# Override model for agent with sub-agents (all will use the same model)agentuse run orchestrator.agentuse --model openai:gpt-5.4-mini
agentuse sessions list [options]agentuse sessions show <id> [options]agentuse sessions resume <id> [options]agentuse sessions path [options]
agentuse sessions is a shortcut for agentuse sessions list.Session data is stored globally and partitioned by project. CLI session commands default to the current project; use --all or --all-search when you are not sure which project owns a session.
agentuse sessions listagentuse sessions list --allagentuse sessions list --project ../other-project
List options:
-s, --subagents Include subagent sessions-n, --limit <n> Limit number of sessions to show-j, --json Output as JSON--all Show sessions across all projects--project [path] Show sessions for a project path; defaults to current project
agentuse sessions show 01K...agentuse sessions show 01K... --all-searchagentuse sessions show 01K... --project ../other-project
Show options:
-j, --json Output as JSON-f, --full Show full tool input/output--project [path] Search a project path; defaults to current project--all-search Search all projects if not found in the selected project
For a completed or errored session, AgentUse starts a new run from the original agent file with continuation context:
agentuse sessions resume 01K... --prompt "Continue from here and add tests"
Resume options:
-C, --directory <path> Run as if agentuse was started in <path>--project [path] Search a project path; defaults to current project--all-search Search all projects if not found in the selected project-d, --debug Enable debug logging for resume
Start the AgentUse HTTP daemon to run agents via API. This enables integration with external applications, webhooks, approvals, Slack notifications, or any system that can make HTTP requests.
-p, --port <number> Port to listen on (default: 12233)-H, --host <string> Host to bind to (default: 127.0.0.1)-C, --directory <path> Directory to serve agents from; project state is detected upward--default <id> Default project for POST /api/run when `project` is omitted-d, --debug Enable debug mode--no-auth Disable API key requirement for exposed hosts (dangerous)--no-log-file Disable writing serve logs to a file
AgentUse runs one serve daemon at a time. Repeat -C on that daemon to serve multiple scopes/projects:
agentuse serve -C ./projA -C ./projB
Project ids default to the -C directory basename. Duplicate ids fail startup. Each scope detects its project root independently, and each project loads its own .env / .env.local in its worker process.Use the request project field to choose a project. In multi-project mode, omitting it returns 400 PROJECT_REQUIRED unless --default <id> is set.Starting a second daemon fails with the PID, address, projects, and log path of the daemon that is already running. This keeps approval links, Slack replies, session resumes, and API traffic routed through one owner.
All JSON endpoints are served under the /api/* prefix; the un-prefixed root
paths (/, /agents, /sessions, /schedules, /stores, /approvals) serve
HTML dashboard pages. GET / is the dashboard home: it links to those pages and
lists the served projects with their agent and schedule counts. The per-session
page /sessions/:id and its action
subroutes (/decision, /continue, /status) carry their own capability auth
(session token / API key / local). POST /run, POST /resume/:id, and the
POST /approvals/:id/... action endpoints remain reachable at their original
paths for backward compatibility, and GET /approvals/:id redirects to
/sessions/:id (prefer the /api/* and /sessions paths; the legacy aliases
will be removed later).
Lists the agents loaded by the daemon as JSON. path is relative to the project
root, exactly as accepted by POST /api/run. Agents that fail to parse are
reported in errors rather than failing the request. The browsable HTML page is
at /agents.
Returns the capability summary and raw .agentuse source for one loaded agent.
The endpoint is operator-gated like the rest of /api/*, and path must match
an agent already loaded by the project.
Lists the scheduled agents currently registered with the running daemon as JSON,
sorted by next run (soonest first, disabled last). The browsable HTML page is at
/schedules.
nextRun and lastRun are ISO timestamps (or null). lastResult is included
once a scheduled run has completed, and carries the run’s sessionId so the
dashboard can deep-link to its log.
Lists every run (top-level sessions only) as JSON, newest first. Filters:
?agent=<id>, ?trigger=scheduled|manual|slack|api, ?days=<n|all> (default
~7 days). The browsable HTML page is at /sessions.
# Start server with defaults (127.0.0.1:12233)agentuse serve# Start on custom portagentuse serve --port 8080# Bind to all interfaces (for external access)agentuse serve --host 0.0.0.0 --port 3000# Set the public URL used in approval review linksagentuse serve --public-url https://agentuse.mycompany.com# Provide Slack credentials for agents that enable Slack channelsSLACK_BOT_TOKEN=xoxb-... SLACK_APPROVAL_CHANNEL=C0123456789 agentuse serve# Serve agents from a project or subdirectoryagentuse serve -C /path/to/project-or-subdir# Host multiple projects from one processagentuse serve -C ./projA -C ./projB# Default POST /api/run to projA when `project` is omittedagentuse serve -C ./projA -C ./projB --default projA# Start with debug loggingagentuse serve --debug
API Usage Examples:
# Run an agent (JSON response)curl -X POST http://127.0.0.1:12233/api/run \ -H "Content-Type: application/json" \ -d '{"agent": "agents/assistant.agentuse"}'# Run with additional promptcurl -X POST http://127.0.0.1:12233/api/run \ -H "Content-Type: application/json" \ -d '{"agent": "agents/writer.agentuse", "prompt": "Write about AI"}'# Override modelcurl -X POST http://127.0.0.1:12233/api/run \ -H "Content-Type: application/json" \ -d '{"agent": "agents/helper.agentuse", "model": "openai:gpt-5.4-mini"}'# Streaming responsecurl -N -X POST http://127.0.0.1:12233/api/run \ -H "Content-Type: application/json" \ -H "Accept: application/x-ndjson" \ -d '{"agent": "agents/analyzer.agentuse"}'# Multi-project: pick which project runs the agentcurl -X POST http://127.0.0.1:12233/api/run \ -H "Content-Type: application/json" \ -d '{"project": "projA", "agent": "assistant.agentuse"}'# Discovery: list served projectscurl http://127.0.0.1:12233/
Shows PID, port, project summary, total agent/schedule counts, and uptime. Multi-project daemons show the first project id plus +N additional projects.
Use --json for scripting. Stale entries are automatically cleaned up.While serve ps shows counts across daemons, use serve agents and serve schedules to inspect what a single running daemon actually loaded.
List the agents loaded by the running daemon (queries its live GET /api/agents endpoint).
agentuse serve agents [pid] [--json]
AGENT NAME MODEL SCHEDULE────────────────────────────────────────────────────────────────────adhoc.agentuse Adhoc Helper anthropic:claude-haiku-4-5 —daily.agentuse Daily Digest anthropic:claude-sonnet-5 0 9 * * *
Omit pid when only one daemon is running. Agents that failed to parse are listed after the table. Use --json for the raw payload. When the daemon requires an API key, set AGENTUSE_API_KEY so the command can authenticate.
Amazon Bedrock authenticates via standard AWS environment variables (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION, optional AWS_SESSION_TOKEN) or AWS_BEARER_TOKEN_BEDROCK. There is no provider login bedrock command.
List and retrieve AgentUse builtin skills that ship with the installed CLI version. Use the installed subcommand to inspect project and user-installed skills.
-v, --verbose Show skill file paths and tool requirements when listing-j, --json Output machine-readable JSON--full Include supporting files when using get--all Output every skill for the selected source when using get
Builtin skills are stored in the AgentUse package skill-data/ directory and match the installed CLI version. This mirrors the agent-browser skills model: agents can fetch current official instructions without reading a user’s entire local skill library.
For local development, install from this checkout:
npx skills add .
This installs the thin agentuse skill from skills/agentuse/SKILL.md. The stub points assistants at agentuse skills get core, so the real workflow guidance stays version-aligned with the installed AgentUse CLI.
Found 3 builtin skill(s):agentuse builtins core Core AgentUse usage guide... creator Create, improve, and review AgentUse agent files... runner Run and manage AgentUse agents from the CLI...
Installed skills:
Found 2 installed skill(s):.agentuse/skills code-review Review code for quality, security, and maintainability...
With verbose mode (-v):
Found 2 installed skill(s):.agentuse/skills code-review Review code for quality, security, and maintainability... /path/to/project/.agentuse/skills/code-review/SKILL.md tools: Read, Bash(git:*)
For detailed information on creating and using skills, see the Skills Guide.
# Static inspectionagentuse doctor agents/research.agentuse# Diagnose actual blocked commands from the last runagentuse doctor agents/research.agentuse --last-run
Use --last-run after an agent fails or behaves unexpectedly. It uses real tool errors and is more accurate than static skill-doc extraction.
Found 3 agent(s):agents/ assistant General-purpose AI assistant code-reviewer Reviews code for quality and security researcher Researches topics and summarizes findings
--force Overwrite existing skills/agents without prompting--all Install all skills and agents without prompting--list List available skills and agents without installing-s, --skill <name> Install specific skill(s) by name (repeatable)-a, --agent <path> Install specific agent(s) by path (repeatable)
agentuse run <file> [prompt...] # Run an agent with optional promptagentuse serve [options] # Start the HTTP daemon to run agents via APIagentuse serve ps [--json] # Show the running serve daemonagentuse provider login [provider] # Authenticate with a provideragentuse provider add <name> --url <url> # Add custom provider (Ollama, LM Studio, etc.)agentuse provider logout [provider] # Remove stored credentialsagentuse provider remove <name> # Remove a custom provideragentuse provider list # Show all providers and credentialsagentuse provider help # Show detailed auth helpagentuse skills [subcommand] [options] # List/get builtin or installed skillsagentuse doctor <file> [--last-run] # Diagnose agent skill capability configagentuse agents [options] # Discover and list project agentsagentuse add <source> [options] # Add skills/agents from GitHub or local pathagentuse --version # Show versionagentuse --help # Show help
The agentuse auth command still works as a backward-compatible alias for agentuse provider.
# Pipe input to agentecho "Translate this to Spanish" | agentuse run translator.agentuse# Pipe agent outputagentuse run generator.agentuse | tee output.txt# Chain agentsagentuse run analyzer.agentuse < data.txt | agentuse run summarizer.agentuse
If you see authentication errors, AgentUse will show specific guidance:
[ERROR] No API key found for anthropicTo authenticate, run: agentuse provider loginOr set your API key: export ANTHROPIC_API_KEY='your-key-here'For more options: agentuse provider --help
Timeout issues
Increase timeout for long-running agents:
agentuse run agent.agentuse --timeout 600# or via environmentMAX_STEPS=2000 agentuse run agent.agentuse