Skip to content

Architecture Overview

ACT separates tool logic from how it’s consumed:

graph TD
    Component["component.wasm\n\ntool-provider\ncomponent-info"]
    Host["ACT Host\n(wasmtime)"]
    MCP["MCP\nadapter"]
    HTTP["HTTP\nserver"]
    CLI["CLI\ncall"]

    Component --> Host
    Host --> MCP
    Host --> HTTP
    Host --> CLI

A component exports the tool-provider interface. The host loads the component and exposes its tools through one or more transport adapters.

Every ACT component implements three functions from act:core@0.2.0:

FunctionPurpose
get-metadata-schemaReturns JSON Schema describing metadata the component accepts
list-toolsReturns tool definitions with schemas, descriptions, annotations
call-toolExecutes a tool and returns a stream of events

Component info (name, version, description) is stored in a WASM custom section (act:component), encoded as CBOR. The host reads it at load time without instantiating the component.

There are no sessions. Metadata is passed per-call. This enables multi-tenancy — the same component instance can serve different users simultaneously.

call-tool always returns stream<stream-event>. Even simple results use a single-event stream. This makes the API consistent whether the tool returns instantly or streams data over time.

  • result::err — early errors before streaming starts (tool not found, invalid arguments)
  • stream-event::error — errors during streaming (connection lost, timeout)

Tools carry localized descriptions, JSON Schemas, usage hints, anti-usage hints, and examples. AI agents read this metadata to understand how to use tools correctly.

The host validates arguments against JSON Schema before calling the component. Components can trust that arguments match their declared schema.

Metadata is a list of key-value pairs passed to every call. It carries:

  • User config — API keys, connection strings, preferences
  • Infrastructure context — trace IDs, request IDs, progress tokens
  • Bridge forwardingstd:forward blob for chaining remote components

The host merges operator config (from act-host.toml) with agent-provided metadata. Operators can lock fields so agents can’t override sensitive values.

ACT is not a transport protocol — it’s a component contract. Transport adapters translate external protocols to ACT host calls:

  • MCPtools/listlist-tools, tools/callcall-tool
  • HTTPGET /toolslist-tools, POST /call/{tool}call-tool
  • CLIact call component.wasm tool-name --args '{...}'