Skip to content

Portable agents

Custom agents let you carve out focused roles—a read-only code reviewer, a test writer, a docs editor, or a researcher—with their own prompt and tool access.

The tricky part is that every AI client names its tools differently. Reading a file is Read in Claude Code, read in Copilot, and view_file in Antigravity. Models and reasoning effort differ across clients too.

OpenLune solves this by separating portable intent (the prompt, capabilities, skills, and MCP servers) from client-specific tuning (models, effort, and native tools).

Every agent needs a description (shown to the main agent and user when deciding whether to delegate to it) and an instructions Markdown file:

version: "0.1"
agents:
reviewer:
description: Review changes for correctness and maintainability.
instructions: agents/reviewer.md
capabilities: [files.read, files.find, files.search]

By default, the agent’s display name in the client matches its resource ID (reviewer). If you want a different native name—for instance, with spaces or capitalization—set name:

agents:
reviewer:
name: Code Reviewer
description: Review changes for correctness and maintainability.
instructions: agents/reviewer.md

Capabilities: omitted vs. empty vs. explicit

Section titled “Capabilities: omitted vs. empty vs. explicit”

OpenLune maps eight portable capabilities to each client’s native tools:

Capability What it allows
files.read Read file contents
files.find List directories and find files by name or glob
files.search Search text across files
files.write Create and edit files
web.fetch Fetch a URL
web.search Search the web
shell.exec Run shell commands
agents.delegate Spawn or delegate to subagents

How you set capabilities matters—OpenLune deliberately preserves the difference between omitting the field and setting it to []:

  • Omitted (capabilities not set): The agent inherits the parent session’s default tools.
  • Explicit list (capabilities: [files.read, files.search]): OpenLune maps those capabilities to the smallest matching set of native tools.
  • Empty list (capabilities: []): The agent gets no built-in tools (unless you add nativeTools, skills, or MCP servers).

Clients differ in how finely they slice tools:

  • Combined native tools: In Copilot, search covers both files.find and files.search, and web covers both web.fetch and web.search. If you request only files.search, OpenLune grants search and reports a deviation telling you files.find came along with it.
  • Inherited-only clients: Codex and Grok Build subagents always inherit every tool from the parent session. If you declare capabilities or nativeTools, OpenLune still generates the agent and reports a deviation explaining that the client cannot restrict its tools.

You’ll always see these differences during openlune plan and be asked to accept them during openlune apply. See Supported clients for the exact tool mapping per client.

Under clients.<client-id>, you can override model, effort, capabilities, or add nativeTools for a specific client without affecting the others:

agents:
reviewer:
description: Review changes for correctness and maintainability.
instructions: agents/reviewer.md
capabilities: [files.read, files.find, files.search]
clients:
claude-code:
model: sonnet
effort: high
copilot:
model: claude-sonnet-4.6
effort: high
codex:
model: gpt-5.4
effort: medium
grok-build:
model: claude-4.6-sonnet
effort: high
antigravity:
model: pro

A few client rules to keep in mind:

  • Models and effort are passed through so you can use whatever model IDs your client supports—with two native constraints:
    • Claude Code validates effort against low, medium, high, xhigh, or max.
    • Antigravity validates model against its four tiers (inherit, flash_lite, flash, pro) and has no effort setting (setting effort there is reported as a deviation).
    • Grok Build encodes effort inside the model selector (model[effort=value]), so setting effort on Grok Build requires an explicit model other than inherit.
  • Overriding capabilities per client completely replaces the agent’s top-level capabilities for that client.

Sometimes you want a tool that only exists in one client—or a client-specific selector like Claude Code’s Bash(git diff *). Add it under clients.<id>.nativeTools:

agents:
researcher:
description: Research documentation and issues on the web.
instructions: agents/researcher.md
capabilities: []
clients:
copilot:
nativeTools: [web]
claude-code:
nativeTools: [WebFetch, WebSearch]

Two rules keep nativeTools predictable:

  1. nativeTools requires explicit capabilities. If the agent omits capabilities (inheriting everything), OpenLune rejects non-empty nativeTools because clients cannot express “all defaults plus one more.” Set capabilities: [] if you want native tools only, or list the portable capabilities you want alongside them.
  2. Don’t grant MCP servers via nativeTools. Use the agent’s mcp field instead—OpenLune rejects raw MCP tool names in nativeTools (like mcp__* in Claude Code or server/* in Copilot).

You can connect an agent to resources declared elsewhere in the same manifest:

agents:
reviewer:
description: Review changes for correctness and maintainability.
instructions: agents/reviewer.md
capabilities: [files.read, files.find, files.search]
skills: [repository-notes]
mcp: [codegraph]

Both skills and mcp reference the resource IDs (the map keys under skills: and mcp: in manifest.yaml), not native display names.

Just like capabilities, omitted vs. empty has a clear meaning:

Setting Meaning
Omitted Leave skill or MCP access to the client’s default behavior
[] (empty list) Request no skills / no MCP servers for this agent
[id1, id2] Grant access to those declared skills / MCP servers

Because clients handle skill and MCP scoping differently, OpenLune translates as closely as each client allows and surfaces a deviation whenever the client is broader than requested:

  • Skills: No client currently restricts an agent to only a subset of skills—listing skills ensures the agent has the tool needed to invoke skills (such as Skill in Claude Code, or view_file in Antigravity, which reports a deviation because it also grants files.read). Setting skills: [] withholds skills in Claude Code, and reports a deviation in Copilot, Grok Build, and Codex where skills remain available.
  • MCP servers: With an explicit capabilities list, Claude Code and Copilot grant access only to the listed servers. Antigravity’s inheritMcp switch is all-or-nothing (so listing servers grants every session server and reports a deviation). In Grok Build, Codex, or any agent that omits capabilities, MCP servers are inherited from the parent session.