view source

Octomind Runtime & Tool Surface

skill

How octomind assembles a session: tap tag resolution, capability auto-activation, skills, gating, sandbox. Use when a tool or skill did or did not appear.

Apache-2.0 Requires: octomind binary. macOS/Linux/Windows.

agents that use this skill

instructions

Overview

This skill explains how a session's tool surface comes to exist: how a tag resolves through taps, which tools are built in, how capabilities become running MCP servers, how auto-activation decides, and how skills, plugins, local tools, and the sandbox fit in.

It covers resolution, not authoring (see the tap-* authoring skills).

Mental model

Every exposed tool costs prompt tokens on every turn, and a wide tool set makes the model pick wrong. So the surface starts small and grows on demand: capabilities load when intent matches, and the least-recently-used one is evicted when the active set is full.

Two layers stack. Static comes from the role's manifest at boot; dynamic is what a capability adds at runtime. Eviction may tear down only the dynamic layer — a server the role statically owns is never killed.

Rules

Tap resolution

A tap is a Git repo or local directory holding agents/<name>/default.toml, agents/<name>/skills/<skill>/, capabilities/<name>/, skills/<skill>/, deps/, workflows/, and optionally plugins/. octomind tap user/repo clones github.com/user/octomind-repo into <data_dir>/taps/user/octomind-repo; octomind tap user/repo <path> links a local directory instead. The built-in tap ([registry].tap, default muvon/tap, at [registry].ref) is loaded after the taps the user added.

Priority: user taps in the order added, then the built-in tap, then the personal tap (<data_dir>/personal-tap, local data where tap(action="persist") saves roles). The first tap providing a tag, skill, capability, or workflow wins. A capability can be pinned explicitly: octomind/<name> for the baseline tap, <org>/<name> for a connected tap.

Running a tap agent tag: fetch the manifest, expand capabilities = [...], resolve {{INPUT:KEY}} (asked once, then kept in <data-dir>/inputs.toml) and {{ENV:KEY}} (environment, else prompted and saved to ./.env), run [deps] require scripts before MCP init, merge into config, start the session. In non-interactive child runs a missing value is an error.

Agent tags

Each agent namespace is a directory agents/<ns>/: the base agent agents/<ns>/default.toml has the tag <ns>, a variant agents/<ns>/<variant>.toml has <ns>:<variant>, and <ns>:default is <ns>. Only a base agent carries # Uses:, with entries <ns>, <ns>:<variant> or *; it reaches its own variants without it. A TAG is looked up as a local [[roles]] entry first, so a local role wins over a tap agent of the same name; otherwise it is read as a tap agent. Plain octomind run starts assistant. Same for octomind acp, octomind server, and /role.

An agent that declares orchestration sends a task with tap(action="run", prompt=…). The child is a copy of the same agent in a fresh session when role is the caller's own name or when the caller reaches no other agent (no # Uses: header, no variants) and sends no role; a copy cannot start further copies. The global assistant declares # Uses: *; a caller that is not a tap agent reaches every installed agent. readonly: true starts a read-only run: only tools whose MCP readOnlyHint is true are offered and executed (no hint counts as mutable), shell runners are not offered, and it cannot delegate.

Built-in tools

ServerToolsGranted by
corerecallcore capability; offered only while compression attention or its governance is enabled
corecode, search_toolsa session with external MCP tools while [mcp] code_mode is on (default); search_tools only when the tool list is too long to send
corecontexta delegated run in the same workspace as the agent that started it; never a role made with tap(action="create")
orchestrationtap, schedule, monitororchestration capability
runtimemcp, skill, capabilityruntime capability
localscripts in .agents/tools/always, per workdir

In this tap only octomind declares runtime.

There is no plan tool: a plugin sets the plan, and /plan only displays it. mcp takes action add, remove, enable, disable, list, persist or unpersist; add takes a stdio or http server; persist writes mcp-<name>.toml with auto_bind. code takes one parameter, script (TypeScript); [mcp] code_mode = false sends every external tool as a plain definition and removes code. schedule takes command (add, list, remove, edit) with a message or a tool_call; it is session-bound, not system cron. monitor takes action start, list or stop; it is never restarted and ends with the session.

Session variants use orchestration:tap. Create one with tap(action="create", name=slug, description=description, system=system, tools=tools). List exact tool names (no wildcards) in tools; pass model only to override the model. The role is <caller's namespace>:<name> (personal:<name> for a local config role). Omitted tools means no tools; named tools must be ones the creator can call, and tools of the orchestration, runtime and local servers, code, search_tools and context cannot be granted. The role has exactly those tools: no capability auto-activation, no dynamic servers. A read-only run, a copy or a variant cannot create, persist or unpersist. Run it with tap(action="run", role=returned_tag, prompt=task). Only after the user explicitly approves saving that variant, call tap(action="persist", role=returned_tag).

Other tap actions: unpersist (delete a role saved by persist; own namespace only), run (background child: prompt, optional workdir, readonly and role (the caller's own name starts a copy). Without role the prompt is compared with the # Title: and # Description: of the agents the caller may reach (its # Uses: header, or every installed agent for a caller that is not a tap agent); the closest starts when its cosine is at least 0.66 and 0.05 above the second. With the Besydr plugin connected, its decision model picks among the 16 best-ranked agents or none, and its pick wins; without an answer the cosine decision stands. With no match run starts nothing and lists the 5 closest agents; call it again with role set to one of them. The result is {id, role, title, workdir, context, message}; pass session=<id> to continue a run, otherwise the child starts with zero context), list, stop, send, capability (push an intent through the auto-activation path), and workflow (list, show, or run a tap workflow). Results arrive in a later turn.

Capability anatomy

config.toml carries a required non-empty triggers = [...] and optional domains = [...]; missing either file or triggers means the capability fails to resolve. <provider>.toml carries [deps], [roles.mcp], and [[mcp.servers]]; the provider comes from the [capabilities] config map, else default. Its # Title: and # Description: header feed list and discover.

The capability tool (on runtime): list, discover (top 5 by embedding similarity, scores above 0.2; no keyword fallback, so it errors while the embedding model downloads), enable, disable. A capability with no servers but non-empty [deps] is a toolchain capability: running the installers is the activation. The global [mcp] allowed_tools list caps every role and every runtime activation: a capability left with no tool fails with activated no tools under the global mcp.allowed_tools allowlist, and mcp(action="enable") on an excluded server fails likewise; code, search_tools, context and local tools are exempt.

Auto-activation

Runs before every API request when auto_capabilities = true, on fresh user messages only. Steps: skip system-managed text; strip XML blocks so pasted content cannot drive matches; bail if fewer than 8 non-whitespace characters remain; drop already-active, out-of-domain, and env-unready capabilities (any {{ENV:KEY}} in a server's env or headers that is unset); embed the intent once; score each capability as the mean of its top-3 trigger cosines. The best one wins at 0.68 or more and 0.05 above the runner-up.

The embedding model is muvon/octomind-embed (int8 ONNX). The margin gate makes two near-tied capabilities abstain rather than flip a coin. With the Besydr plugin connected, its decision model can veto a weak cosine winner or promote a pick when cosine abstained. Silent no-ops: toggle off, not a fresh user message, intent too short, model still downloading, nothing eligible, or no score clearing the gate.

Domain gating

The session domain is the namespace of the active agent's tag (<ns> for <ns>:<variant>). An empty domains list means universal; a non-empty one restricts the capability. The gate applies to list, discover, auto-activation, enable, and OCTOMIND_CAPABILITIES, with no bypass; with no domain set, only universal capabilities survive.

LRU eviction

At most four runtime-activated capabilities per session; activating a fifth disables the least-recently-used one first. Recency means successful tool use, not activation order, and there is no time decay. Manifest capabilities are static and never counted. A server is killed only when the role does not own it statically and no other active capability uses it.

Skills

Discovery order, first name wins: tap skills/ directories and each agent's skills/ directory, <workdir>/.agents/skills/, ~/.agents/skills/, Agent Plugin skill directories, then generated skills from learning evolution.

Three activation methods: OCTOMIND_SKILLS preloads at session start; declarative rules: auto-activate on fresh user messages when [skills] auto_activation is on and the skill is bound to the session domain: owned by that agent by location, or listing it in domains: (or *); manual /skill <name> (toggles by exact name; /skill, /skill <page> and /skill <glob> list and filter) or skill(action="use"). With the Besydr plugin connected, Besydr's decision model may pick a skill from the domain pool when every rule abstained.

A connected MCP server that advertises skills also serves them: skill(action="list") shows them as server:skill://… references and use loads one only after the user approves a prompt, so an unattended run cannot load one. Supporting files need use plus resource and the returned manifest. They are never auto-activated.

The parser reads name, description, compatibility, license, allowed-tools, capabilities, domains, and rules; other keys are ignored, and a skill missing name or description is skipped. On activation, files under scripts/, references/, and assets/ are listed with absolute paths and declared capabilities are enabled.

Agent Plugins

Directories with a plugin.json are scanned from tap plugins/, <workdir>/.agents/plugins/, and ~/.config/agents/plugins/. Their skills/<name>/SKILL.md join skill discovery and their mcp.json declares MCP servers; a bad manifest rejects the plugin, a bad skill or server skips only itself.

Local tools

An executable script at <workdir>/.agents/tools/<name> becomes a tool on the local server, rediscovered every turn and role-agnostic. The filename is the tool name ([A-Za-z0-9_-]+). The leading comment block (#, //, or --, first 80 lines) declares @description and repeatable @param NAME TYPE DESC; prefix the name with * for required. Params arrive as JSON on stdin and as OCTOMIND_PARAM_<NAME> env vars; stdout is the result, non-zero exit an error, timeout 300 s.

Sandbox

sandbox = true or --sandbox restricts filesystem writes to the launch directory at OS level — Landlock on Linux 5.13+, Seatbelt on macOS — including child processes, shell, and MCP servers.

Examples

Example 1: "the tool never showed up"

Work the chain in order: is the capability in the role's capabilities list or expected to auto-activate; does its config.toml have triggers; is the session domain in its domains; are its {{ENV:}} keys set; does the global [mcp] allowed_tools list exclude its server; did the intent clear 0.68 with a 0.05 margin; was it evicted by the four-capability cap.

Checklist

  • Symptom traced to a stage: tap resolution, placeholders, capability activation, domain or env gate, or eviction?
  • Capability has non-empty triggers, and its domains match the session domain or are empty?
  • Skill auto-activation has rules: and is bound to the agent, by location or a matching domains: entry?
  • Local tool executable, extensionless, and carrying an @description header?

Composition / References

  • Pairs with octomind-config for [capabilities], [taps], [skills], and [registry].
  • Pairs with octomind-cli for octomind tap, /skill, /mcp, and OCTOMIND_* variables.
  • Octomind docs: doc/usage/16-token-efficiency.md, doc/usage/15-skills.md, doc/usage/17-local-tools.md, doc/integration/04-tap-system.md, doc/usage/07-mcp-tools.md; the same pages are served at https://octomind.run/docs/.