Skip to main content

PROJECT.md — Fleet-Wide Context

Shared across all agents. Loaded into every agent’s system prompt as part of the 48K-char bootstrap injection.
PROJECT.md is read-only at runtime — agents cannot modify it. Update it from the engine dashboard or via the /project REPL command. (The operator agent also has a update_project_context tool that proposes changes for confirmation.)

config/mesh.yaml — Framework Settings

Channels use token-presence activation — there is no enabled: true/false flag. A channel auto-starts when its bot token resolves through the credential vault. Resolution order: OPENLEGION_SYSTEM_<NAME>OPENLEGION_CRED_<NAME> → bare env → mesh.yaml channels.<name>.bot_token. Remove the token to disable the channel.

Agent Definitions

There is no top-level config/agents.yaml shipped with the engine. Agents are defined one of three ways:
  1. Templates in src/templates/*.yaml (the 13 fleet templates).
  2. Dashboard / operator tools at runtime (the operator agent’s create_agent, edit_agent, and apply_template tools, or the engine dashboard’s Team tab).
  3. REPL via /add while openlegion start is running.
Each agent record carries: Container hardening is enforced by the runtime: UID 1000, cap_drop=ALL, no-new-privileges, read-only filesystem, tmpfs=/tmp 100m noexec/nosuid, pids_limit=256. These are not user-tunable.

config/permissions.json — Agent Permissions

Per-agent access control. Default policy: deny. A missing file denies everything. You may include a "default" template that other agents inherit from.

Permission Fields

Control-plane flags (six; defaults are true for the operator, false for workers): can_manage_fleet, can_manage_projects, can_edit_agent_config, can_view_fleet_metrics, can_route_tasks, can_request_user_credentials. Operator ceiling: the operator cannot grant can_spawn=true or can_use_wallet=true to any agent — those flags must be edited directly in permissions.json (or via a setting-level tool that bypasses the operator).

.env — API Keys and Runtime Tunables

Managed automatically by openlegion start and the /addkey REPL command. Can also be edited directly. The file is rewritten atomically with chmod 0o600; keys are validated against ^[A-Za-z_][A-Za-z0-9_]*$ and \r\n is rejected in keys/values to prevent env injection.
OPENLEGION_SYSTEM_* keys are reserved for mesh-tier use (LLM proxy, wallet seed, etc.) and are never accessible to agents. OPENLEGION_CRED_* keys are agent-tier — access is controlled per-agent via the allowed_credentials field in permissions. Agents reference them as opaque $CRED{name} handles in tool arguments; the real value is substituted in the mesh.
OPENLEGION_MAX_AGENTS=0 (default) means “unlimited agents” but falls into the Basic browser-service tier (2GB / 512MB / 1.0 CPU / 1 browser). Set it explicitly to scale browser-service resources: 2-5 → Growth, 6-15 → Pro, >15 → Pro Max.

Other Config Locations

Browser Flags (config/settings.json / env)

53 entries in KNOWN_FLAGS group into: profile / network (BROWSER_OS, _LOCALE, _UA_VERSION, _DEVICE_PROFILE, HTTP/HTTPS proxy fields, egress allowlist), CAPTCHA solver, CAPTCHA timeouts, CAPTCHA solver proxy, CAPTCHA pacing, CAPTCHA cost caps, operator kill switches (BROWSER_DOWNLOADS_DISABLED, BROWSER_NETWORK_INSPECT_DISABLED, BROWSER_COOKIE_IMPORT_DISABLED, CAPTCHA_DISABLED), snapshot / screenshot, behavior recorder, upload staging, session continuity, browser concurrency. The four CAPTCHA-solver credential names (CAPTCHA_SOLVER_KEY, _SECONDARY, CAPTCHA_SOLVER_PROXY_LOGIN, _PASSWORD) are _ENV_ONLY_FLAGS — they are stripped from config/settings.json at load and must be supplied via environment.