Anvil

Overview

Add capabilities, protocol libraries, platform providers, and operations from your own library.

Choose the extension point that owns the behavior you need. You can build these extensions in a separate repository and install them through normal dependency and workspace configuration.

Add custom behavior first

The Echo example is the shortest complete extension path:

  1. Define a capability contract for test authors.
  2. Define the agent operation and handler that perform the work.
  3. Connect the host adapter and install the handler as a workspace asset.
  4. Package and test the resulting library from a separate consumer.

Operation contracts must exist before the agent-backed adapter can call them. Handler installation uses the same workspace asset workflow as other JARs. For packet behavior, choose a protocol adapter instead.

Add another runtime implementation

These are independent advanced paths, not prerequisites for writing a capability:

Provider artifacts use the same packaging and discovery checks before consumer installation.

Start from a working first test. Use the same Anvil version across your extension's API dependencies and the consumer build. Public capability interfaces keep platform SDKs, packet libraries, and transport types out of the test-facing contract.

If the existing APIs already express the behavior, implement that API for your protocol library. Define a new capability when scenario authors need a new operation. Repository implementation changes belong in Contributing.

On this page