Skip to content

Add Anvil agent - #417

Open
foundev wants to merge 2 commits into
agentclientprotocol:mainfrom
foundev:add-brokk-agent
Open

Add Anvil agent#417
foundev wants to merge 2 commits into
agentclientprotocol:mainfrom
foundev:add-brokk-agent

Conversation

@foundev

@foundev foundev commented Jul 1, 2026

Copy link
Copy Markdown

Adding a New Agent: Anvil

Registers Anvil, a portable Rust ACP server with model routing, tools, permissions, sandboxing, sessions, and MCP integration.

This PR originally registered the uvx brokk launcher; it has been reworked to register Anvil itself via its npm package, which is the supported one-shot launch path.

What this PR adds, step by step

1. The manifest. The entire entry is two files: anvil/agent.json and anvil/icon.svg. The manifest:

{
  "id": "anvil",
  "name": "Anvil",
  "version": "0.24.4",
  "description": "Portable Rust ACP server with model routing, tools, permissions, sandboxing, sessions, and MCP integration",
  "repository": "https://github.com/BrokkAi/anvil",
  "website": "https://anvil.brokk.ai",
  "authors": ["Brokk AI"],
  "license": "LGPL-3.0-only",
  "distribution": {
    "npx": {
      "package": "@brokkai/anvil@0.24.4"
    }
  }
}

2. What a client does with it. The distribution.npx block tells clients (Zed, JetBrains, …) to launch the agent as:

npx -y @brokkai/anvil@0.24.4

The @brokkai/anvil npm package installs the released native binary for the host platform (macOS, Linux glibc, Windows, Android/Termux). There is deliberately no args array: the binary speaks ACP JSON-RPC over stdio as soon as it starts, no subcommand or flag needed.

3. Proof the launch works. Piping an ACP initialize request into exactly that command (this downloads the published package from npm and runs it; the agent keeps serving after the response, so Ctrl-C to exit):

printf '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":1,"clientCapabilities":{}}}\n' \
  | npx -y @brokkai/anvil@0.24.4 2>/dev/null | head -1

returns (pretty-printed):

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "protocolVersion": 1,
    "agentCapabilities": {
      "loadSession": true,
      "promptCapabilities": { "image": true, "audio": false, "embeddedContext": true },
      "mcpCapabilities": { "http": true, "sse": true, "acp": false },
      "sessionCapabilities": { "list": {}, "delete": {}, "additionalDirectories": {}, "fork": {}, "resume": {}, "close": {} },
      "auth": {}
    },
    "authMethods": [
      {
        "id": "none",
        "name": "No authentication required",
        "description": "Anvil needs no login; model providers are configured per session (/setup) or through environment variables."
      }
    ]
  }
}

4. This repo's schema/build validation, run from this branch:

uv run --with jsonschema .github/workflows/build_registry.py --dry-run
Dry run: validated 40 agents successfully
  registry.json would contain 39 agents (excluded: github-copilot)
  registry-for-jetbrains.json would contain 39 agents (excluded: github-copilot-cli)

5. This repo's ACP auth check. verify_agents.py reads the manifest above, sees the npx distribution, and builds the launch command itself (verify_agents.py, build_agent_command): npx --prefix <sandbox> --yes @brokkai/anvil@0.24.4 — the same invocation as step 2, sandboxed. It then performs the initialize handshake and checks the advertised auth methods. Run with a wiped sandbox so the package is freshly downloaded from npm:

uv run .github/workflows/verify_agents.py --auth-check --agent anvil --auth-timeout 300 --verbose
Verifying 1 agent(s): anvil

[1/1] anvil (npx)
  Testing npx...
    → Auth check: npx --prefix .sandbox/npx/anvil...
    ✓ Success: Auth OK: none(agent)

==================================================
Summary
==================================================
  Passed:  1
  Failed:  0
  Skipped: 0

All tests passed!

(The → Auth check: line is truncated by the verifier's own logging — it prints only the first three tokens of the command; the full command is the one described above.)

Checklist

  • Directory name matches id (anvil/)
  • agent.json validates against the schema
  • icon.svg is a 16x16 monochrome SVG using currentColor (Anvil's own mark)
  • npx distribution package is version-pinned and matches version
  • verify_agents.py --auth-check passes against the published npm package

@foundev
foundev force-pushed the add-brokk-agent branch from ef861b8 to 169cc0d Compare July 1, 2026 09:05
@foundev foundev changed the title Add Brokk agent (uvx brokk acp) Add Brokk Anvil agent (uvx brokk acp) Jul 1, 2026
@foundev foundev changed the title Add Brokk Anvil agent (uvx brokk acp) Add Brokk Anvil agent Jul 1, 2026
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@foundev foundev changed the title Add Brokk Anvil agent Add Anvil agent Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant