Skip to main content
OpenLegion ships a set of @skill-decorated built-in tools organized into modules under engine/src/agent/builtins/. Worker agents see a curated subset based on their permissions.json ACL; the operator agent sees additional control-plane tools. Agents can also create custom skills at runtime (AST-validated) and use MCP tool servers. Every tool call has a default OPENLEGION_TOOL_TIMEOUT of 300s.

Execution

ToolPurpose
run_commandShell command execution, scoped to /data, 300s ceiling

File Operations

All file operations are scoped to /data with 4-stage path-traversal protection. Limits: _MAX_READ=500_000 bytes, _MAX_LIST_ENTRIES=500. Direct writes to workspace files (SOUL/INSTRUCTIONS/USER/MEMORY/HEARTBEAT/AGENTS/INTERFACE) are blocked at this layer — use update_workspace instead.
ToolPurpose
read_fileRead file contents from /data
write_fileWrite / append file in /data
list_filesList / glob files in /data

HTTP

ToolPurpose
http_requestHTTP GET / POST / PUT / DELETE / PATCH with $CRED{name} substitution
SSRF protection is enforced at the mesh: DNS pinning, RFC1918 / loopback / link-local / CGNAT / 6to4 / Teredo / IPv4-mapped-IPv6 blocking, fail-closed on DNS error, max 5 redirects (re-validated at each hop), cross-origin auth strip.

Browser Automation

Camoufox (stealth Firefox fork) per agent, lazy-spawned on X displays :100..:163 (64 slots) paired with KasmVNC ports 6100..6163. The browser-service container is shared (FastAPI :8500); the Camoufox instance is per-agent. All browser actions are parallel_safe=False per agent_id.
ToolPurpose
browser_navigateOpen URL, extract page text
browser_warmupPre-spawn the browser for an agent without navigating
browser_get_elementsA11y-tree snapshot (200-element cap, iframe nesting cap 3) with element refs (e1, e2, …)
browser_screenshotCapture page screenshot (WebP by default)
browser_clickClick element by ref or CSS selector
browser_click_xyClick absolute (x, y) coordinates
browser_typeFill input by ref or CSS selector
browser_hoverHover over element by ref or CSS selector
browser_scrollScroll page or scroll element into view
browser_wait_forWait for element, navigation, or network idle
browser_find_textLocate visible text on page
browser_fill_formFill a form (max 50 fields per call)
browser_press_keyPress keyboard key (Enter, Escape, Tab, …)
browser_open_tabOpen a new tab
browser_switch_tabSwitch between open tabs
browser_go_backNavigate back in history
browser_go_forwardNavigate forward in history
browser_resetForce-close browser and reconnect fresh
browser_inspect_requestsInspect network requests (200-entry buffer)
browser_upload_fileUpload (max 5 files, 50 MB each; 60s stage TTL)
browser_downloadDownload a file
browser_detect_captchaDetect captcha presence and kind
browser_solve_captchaAuto-solve via 2captcha / capsolver (reCAPTCHA v2/v3/enterprise, hCaptcha, Cloudflare Turnstile + interstitial, PerimeterX press-hold, DataDome, JS-challenges)
browser_request_captcha_helpRoute a captcha to the human operator (behavioral kinds)
browser_request_browser_loginRoute a login challenge to the human operator
Costs for CAPTCHA solving are tracked in millicents (1/100,000 USD) with per-agent + per-tenant monthly caps and a fleet-wide CAPTCHA_DISABLED kill switch. Solver-provider circuit breaker: 3 failures / 5 min → open 10 min. Session persistence is opt-in (BROWSER_SESSION_PERSISTENCE_ENABLED, default FALSE; snapshot interval 60-3600s, default 300s). Device profiles: desktop-windows (default), desktop-macos, mobile-ios, mobile-android. Mobile profiles spoof UA strings only — the underlying Camoufox / Firefox engine and TLS/JA3 fingerprints remain desktop. Fingerprint burn detection uses a rolling window of 10; ≥50% rejection sets fingerprint_burn=True. There is no auto-rotation — the operator must rotate the profile and reset.

Memory

ToolPurpose
memory_searchHybrid search across workspace files and the structured memory DB (BM25 + vector with (0.7*vector + 0.3*keyword) * decay_score)
memory_saveSave a fact to workspace and structured memory DB
Vector search uses text-embedding-3-small (OpenAI, 1536 dims). Non-OpenAI providers default to "none" and degrade to keyword-only; after 3 consecutive embedding failures the store silently disables vectors for the process lifetime. See the Memory System for full details on the 5-layer architecture.
ToolPurpose
web_searchSearch via DuckDuckGo HTML, no API key required (1-10 results)

Image Generation

ToolPurpose
generate_imageGenerate a PNG via Gemini (default) or OpenAI DALL-E 3; written to /data/workspace/artifacts/

Fleet Awareness

ToolPurpose
notify_userSend a notification to the user via the active channel
list_agentsDiscover other agents in the fleet
get_agent_profileGet role / status / capabilities of another agent
read_agent_historyRead another agent’s conversation logs (subject to ACL)

Workspace

ToolPurpose
update_workspaceUpdate identity / state files (SOUL.md, INSTRUCTIONS.md, USER.md, MEMORY.md, INTERFACE.md, AGENTS.md, HEARTBEAT.md)
Workspace caps (returned 413 on overflow): SOUL 4K, INSTRUCTIONS 12K, USER 4K, MEMORY 16K, INTERFACE 4K, AGENTS 12K, HEARTBEAT uncapped. PROJECT.md and SYSTEM.md are bootstrap-only and read-only at runtime.

Introspection

ToolPurpose
get_system_statusQuery own runtime state: permissions, budget, fleet, cron, health (5-min cache)

Shared State (Blackboard)

All blackboard operations are subject to per-agent blackboard_read / blackboard_write glob patterns. Writes are CAS-based via write_if_version.
ToolPurpose
read_blackboardRead a blackboard key
write_blackboardWrite to a blackboard key (atomic CAS)
list_blackboardBrowse blackboard entries by prefix
watch_blackboardWatch for blackboard key changes (pattern-based)
publish_eventPublish event to mesh pub/sub
subscribe_eventSubscribe to mesh pub/sub events at runtime
claim_taskClaim a task from the agent’s lane queue (CAS)
save_artifactSave a deliverable file and register it on the blackboard

Coordination

ToolPurpose
hand_offHand a task off to another agent with structured payload (TTL 86400s)
check_inboxCheck pending handoffs / messages
update_statusUpdate own task status
complete_taskMark a claimed task complete
Coordination uses the durable V2 task ledger when OPENLEGION_ORCHESTRATION_TASKS_V2=1 (default ON); V1 falls back to blackboard tasks/{agent}/{handoff_id} records.

Scheduling

ToolPurpose
set_cronSchedule a recurring job
list_cronList scheduled jobs
remove_cronRemove a scheduled job
5-field cron (minute granularity) or every N[s/m/h/d] interval syntax. No 6-field / seconds support. Three modes: message-mode (LLM dispatch), tool-mode (tool_name / tool_params direct invoke — no LLM), and heartbeat-mode (heartbeat=true). Heartbeats default to every 15m (the operator’s is force-locked to every 15m) and have a skip-LLM optimization that activates only when (not manual) + (HEARTBEAT.md is default) + (no recent activity) + (no probes triggered). See Triggering & Automation for details.

Skills Management

ToolPurpose
create_skillWrite a new Python skill at runtime (AST-validated against 23 forbidden imports, 16 forbidden calls, 11 forbidden attrs; _MAX_SKILL_SIZE=10_000 chars)
reload_skillsHot-reload all skills
spawn_fleet_agentOperator-only. Spawn a new ephemeral fleet agent via the mesh. The operator cannot grant can_spawn=true to other agents.

Subagent Spawning

ToolPurpose
spawn_subagentSpawn a lightweight in-process subagent (no container overhead)
list_subagentsList active subagents
wait_for_subagentWait for a subagent to complete and return its result
Subagents have MAX_DEPTH=2, MAX_CONCURRENT=3 per parent, default TTL 300s (max 600s), DEFAULT_MAX_ITERATIONS=10. Subagents cannot recurse, cannot create skills, and cannot use the browser concurrently (browser module is parallel-unsafe per agent).

Credential Vault

ToolPurpose
vault_generate_secretGenerate a secure random secret; returns a $CRED{name} handle only
vault_listList available credentials in the vault
request_credentialRequest the user provide a credential interactively (the only path for runtime credential capture)
Agents never see raw secret values — only opaque $CRED{name} handles that the mesh substitutes at call time. System-tier credentials (OPENLEGION_SYSTEM_*) are always blocked from agents regardless of allowed_credentials.

Wallet

EVM chains (evm:ethereum, evm:base, evm:arbitrum, evm:polygon, evm:sepolia) and Solana (solana:mainnet, solana:devnet). Per-agent EVM keys derive via BIP-44 (m/44'/60'/{agent_index}'/0/0); per-agent Solana keys via HMAC-SHA512 over a PBKDF2 of the master seed. Private keys never leave the mesh process. The master seed is returned once at POST /api/wallet/init with Cache-Control: no-store; GET /api/wallet/seed returns HTTP 410 Gone afterward.
ToolPurpose
wallet_get_addressGet the agent’s wallet address for a chain
wallet_get_balanceGet native / token balance
wallet_read_contractRead from a smart contract
wallet_transferTransfer native or token (rate-limited, capped)
wallet_executeSign and submit a protocol transaction
Defaults: LIMIT_PER_TX_USD=10, LIMIT_DAILY_USD=100, RATE_LIMIT_PER_HOUR=10. Agents need can_use_wallet=trueand the operator cannot grant this flag; it must be edited directly in permissions.json.

Operator-Only Tools

The operator agent has additional control-plane tools for fleet management. These are not available to worker agents.
ToolPurpose
inspect_agentsInspect agents’ configs / state
inspect_projectsInspect project metadata
manage_project / create_projectProject lifecycle
add_agents_to_project / remove_agents_from_projectProject membership
update_project_context / set_project_goalProject content
manage_agent / create_agentAgent lifecycle
edit_agentEdit agent config (soft fields = 5-min Undo TTL; hard fields = 30-min, require confirm_edit)
propose_edit / confirm_editLegacy two-step edit flow
manage_taskManage durable tasks
save_observationsPersist operator observations
undo_changeRevert a recent soft edit
list_pending / cancel_pending_actionPending-action queue
archive_audit_beforeArchive audit log entries
list_agent_queueInspect another agent’s lane queue
get_team_outputs / summarize_project_progressTeam reporting
apply_templateApply a fleet template (per-slot, not atomic — mid-loop failures leave earlier-created agents)
list_templatesList available templates
Hard / soft edit fields. SOFT (5-min Undo): instructions, soul, heartbeat, heartbeat_schedule, interface, role. HARD (30-min confirmation): model, permissions, budget, thinking.