Skip to main content

Actions & Adapters

Tools for managing HAL actions and adapters — the core building blocks of the HAL Expression System. Actions are executable batches of write functions for on-chain transactions. Adapters are reusable functions (write, read, or code) that can be imported into actions or other adapters.

Search Actions & Adapters

Search existing actions and adapters before creating new ones — existing adapters can be imported directly into new actions.

Parameters

Example Queries


Get Action or Adapter

Retrieve a specific action or adapter by ID, including its full HAL expression.

Parameters


Create Action

Create a new action from a HAL expression. Actions have batched steps — each batch contains write-function calls.
Before creating an action, read the HAL documentation using the Documentation tool with document IDs hal://spec/syntax, hal://spec/modules/herd, and hal://spec/examples. Search for existing adapters first with the search tool above.

Parameters


Create Adapter

Create a new adapter from a HAL expression. Adapters encapsulate reusable logic (queries and writes) for import into actions.

Parameters

Start with logic in actions — extract to adapters when you see the same pattern repeated across multiple actions.

Update Action

Update an existing action’s name, description, expression, or publish status.

Parameters

Expression updates use JSON Patch operations: add, remove, replace, move, copy, test. Paths use JSON Pointer syntax (e.g., /0, /1/2, /1/2/1).

Update Adapter

Update an existing adapter’s name, description, expression, or publish status. Same parameters and patch format as Update Action.

Parameters


Delete Action or Adapter

Delete an action or adapter by ID.

Parameters

Deletion fails if the action/adapter is auto-synced to a code block (delete the code block instead) or if other actions/adapters import it.

Workflow

  1. Search for existing adapters that do what you need
  2. Read HAL documentation if creating new expressions
  3. Create adapters for reusable logic, actions for transactions
  4. Simulate with Evaluation tools before publishing
  5. Publish once tested

Next Steps

HAL Reference

Full HAL language documentation

Evaluation

Simulate before publishing