Skip to main content
AgentUse reads configuration from agent files, environment files, global defaults, and project or user-level extension directories.

Quick reference

Agent files

Agent files use the .agentuse extension. They combine YAML frontmatter with Markdown instructions:
Common frontmatter fields include model, tools, schedule, mcpServers, subagents, store, learning, sandbox, approval, channels, timeout, and maxSteps. See Agent Syntax for the full schema. Approval channels are configured separately from approval policy:
See Channels for event semantics and Approval Gates for the approval dashboard and API workflow.

Environment files

AgentUse loads environment variables from the project root. Project roots are detected by walking upward from the starting directory until .agentuse/, .git/, or package.json is found. If none are found, the starting directory is the project root. For agentuse run, .env.local takes priority when present, otherwise .env is used. You can also pass a specific file:
For agentuse serve, -C selects the directory whose agents are served, while the detected project root owns .env.local, .env, .agentuse/store, and session state. Each served project loads its own .env.local or .env in that project’s worker process. Environment variables do not mix across served projects. Use environment files for provider API keys, MCP server credentials, and runtime controls such as MAX_STEPS, LOG_LEVEL, and AGENTUSE_TELEMETRY_DISABLED.
Never commit .env, .env.local, or other secret-bearing environment files.
See Environment Variables for supported variables and examples.

Global serve config

Put long-lived agentuse serve defaults in ~/.agentuse/config.json:
Use AGENTUSE_CONFIG=/path/to/config.json to load a different file. Project paths may start with ~ or ~/. AgentUse runs one serve daemon at a time. Put every project that should accept /run, approval, and notification traffic into serve.projects, or pass repeated -C flags when starting the daemon. CLI flags override config values: AGENTUSE_API_KEY remains env-only and is not read from config. See Webhooks and CLI Commands for serve usage.

Global env defaults

Alongside serve, ~/.agentuse/config.json accepts an env block of environment variable defaults, mirroring the env key in Claude Code’s settings.json. Use it for non-secret defaults you want applied to every run without maintaining a separate ~/.agentuse/.env file:
Values must be strings. The block is applied at startup and never overrides a variable that is already set, so the precedence is:
Per-command flags still win over all of these. For example, --mock-model <model> overrides AGENTUSE_MOCK_MODEL from any source, and --mock is satisfied by a mock model coming from the flag, the shell, ~/.agentuse/.env, or the config env block. Keep secrets (like AGENTUSE_API_KEY and provider API keys) in an environment file rather than config.json, which is plain non-secret configuration.

Plugins

Plugins are TypeScript or JavaScript modules loaded from these directories:
  1. .agentuse/plugins/*.{ts,js}
  2. ~/.agentuse/plugins/*.{ts,js}
Project plugins load before user-global plugins. See Plugins for the plugin API.

Skills

Skills are reusable instruction packs stored as SKILL.md files. AgentUse discovers skills in this order:
  1. .agentuse/skills/
  2. ~/.agentuse/skills/
  3. .claude/skills/
  4. ~/.claude/skills/
Use .agentuse/skills/ for project-specific skills and ~/.agentuse/skills/ for personal skills shared across projects. The .claude/skills/ locations provide compatibility with existing Claude skills. See Skills for authoring and discovery details.

Generated files and data locations

These files are generated by features rather than hand-written as primary configuration: See Learning, Store, Sandbox, and Session Storage for details.