Documentation — Build features and crates
Reference · Runtime

Build features and crates

agentd decides most of its capability at compile time: each cargo feature adds a protocol, a credential mechanism or an operator surface, and a build without it refuses the configuration that needs it. This page lists every feature, what the release binaries carry, which configuration needs which feature, and the crates the workspace publishes. It is for operators choosing a binary and for integrators building from source.

What the release binaries carry

Every release ships static Linux binaries for x86_64 and aarch64 (musl, static-PIE on x86_64), a SHA256SUMS file, and a multi-arch OCI image, ghcr.io/agentd-dev/agentd, signed with cosign (keyless) and carrying an SPDX SBOM attestation. The image is FROM scratch plus the binary, run as uid 65532. Each archive and the image carry LICENSE and NOTICE beside the binary (in the image, under /usr/share/doc/agentd/).

All of them are built with the default feature tls plus this list, taken from .github/workflows/release.yml:

a2a,metrics,cron,otel,hot-reload,config-watch,aauth,oauth,cel,sign,oci,decrypt,mcp-events,mock-models,companies,xaa,x402

companies, xaa and x402 joined the list in v1.21.0; the releases before it are built with the list without them.

mock-models is the built-in mock model endpoint: mock:final and mock:file:<playbook.json> answer from a script instead of a provider, so you can try an agent or a workflow in the released agentd with no provider account.

Three features in the list do nothing until a configuration asks for them. Each tracks a draft or a young protocol, so its guide calls it a preview:

  • companies, agentd acting at Companies for one person under the Personal Agent Protocol draft (Act at companies for a person, RFC 0047). It acts only for a companies entry or a security.companies section. The draft changes without a version signal, so agentd is pinned to one revision of it and says so at load on every configuration that declares a Company.
  • xaa, agentd acting for one enrolled person at MCP servers through their enterprise IdP — ID-JAG and Enterprise-Managed Authorization (Enterprise-managed authorization, RFC 0044). It does nothing without identity.providers or a server of grant: id_jag or grant: token_exchange, and such a server needs security.experimental.id_jag: true too, because ID-JAG is an IETF draft and the MCP extension is young.
  • x402, agentd paying with x402 — for HTTP resources, MCP tool calls and A2A peers' tasks — within a spend policy (Pay for things with x402, RFC 0049). It pays only within the spend policy an operator declares in security.payments (ADR 0003).

Given a configuration that uses none of them, a release binary serves the same agent card, logs the same lines, asks its store the same and writes the same files as a binary built without them.

Two features are never in a release binary:

  • exec, the local command runner. agentd's default posture is that it runs no local code; you opt in at build time and again at run time.
  • internal-mocks, the test scaffolding: the mock MCP servers and crash points the test suites drive, and, with oauth (and the default tls), the fake Company that agentd-conformance holds to the Personal Agent Protocol draft, with xaa, the mock IdP, authorization server and EMA MCP server its ema family drives, and, with x402, the mock x402 resource server of its payments family. It includes mock-models. Debug builds carry it automatically, so cargo run and the test suites need no flag.

Features

FeatureDefaultReleaseAdds cratesEnables
tlsyesyesrustls (with the ring provider), webpki-rootsDirect https:// to models, MCP servers and peers; an https:// listener; mTLS client identities; security.tls_ca. The bundled roots mean a scratch image trusts public CAs with no system bundle.
a2anoyesthe A2A project's official Rust SDK (a2a-lf, a2a-pb, a2a-server-lf, a2a-client-lf), reqwest, tokio, axum, hyper, hyper-util, tokio-rustls, tower, chrono, async-trait, tokio-stream, futures-utilThe A2A listener and everything served on it, outbound A2A peers, and the webhook listener. Implies tls.
cronnoyesnoneFive-field UTC cron expressions on schedule start nodes.
oauthnoyesnone new (reuses ring)OAuth 2.1 credentials (device, authorization code with PKCE, client credentials, refresh, RFC 8414 and OIDC discovery, private_key_jwt) for models, MCP servers and peers; security.client, agentd's Client ID Metadata Document, and agentd --print-client-metadata; agentd --login, and RFC 7009 revocation on agentd --logout.
metricsnoyesnone/metrics (Prometheus text), /healthz and /readyz on observability.metrics_addr.
otelnoyesnoneOTLP over HTTP/JSON: run traces with GenAI attributes, and log export.
hot-reloadnoyesnoneReload on SIGHUP: validate, stage, apply whole or refuse.
config-watchnoyesnoneAn inotify watch that triggers the same reload (lifecycle.watch_config). Implies hot-reload.
celnoyescel-interpreter and its dependencies (22 crates)CEL expressions: workflow when, until and filter, computed values, goal.check.condition, security.policies[].match.args, template expressions beyond bare paths.
aauthnoyesnone new (reuses ring)An Ed25519 agent identity that signs outbound MCP requests (RFC 9421). Implies tls.
signnoyesnone newSignature verification for instruction documents (agent.instruction.trust). Implies aauth.
ocinoyesnone new (reuses ring)oci:// instruction sources, including cosign verification. Implies tls.
decryptnoyesnoneEncrypted instruction envelopes: age v1 and JWE compact. Implies sign.
mcp-eventsnoyesnoneMCP Events: bindings, grants, wait subscriptions, the events.* tools and instruction updates by event. The extension is Beta (SEP-3415).
execnonononeThe guarded local exec tool, also gated by security.exec.enabled.
companiesnoyesnone new (reuses ring)companies entries and security.companies: a Session at each declared Company, its MCP tools held by the supervisor under the strict privacy profile, the User's cross-Company gate, Device and Direct Sign-In at the User's own gate with each Account Token kept sealed — up to eight accounts at a Company, each by a label and in a Session of its own — conversations with a Company's agent (followed by readers into the stream company.<name>) and calls of its OpenAPI APIs, each allowed operation a tool of its own, operations confirmed only with the User's approval or a standing permission (client.extensions: [operations]), Direct Conversations the User joins at their own gate, company.status, company.sign_in, company.sign_out, company.converse, company.read, company.handoff, company.close, company.api, company.api.describe, company.operation.get, company.operation.confirm, company.operation.cancel, company.direct, the http step's auth: {kind: company}, agentd --print-company-client, agentd --login/--logout company:<name>[/<label>] (with a2a). Implies oauth and tls.
xaanoyesnone new (reuses ring)identity.providers, identity.delegation, security.experimental.id_jag, grant: id_jag on an MCP server, and a2a.principals[] match.uid and idp_subject: the ID-JAG exchange at the person's IdP and its redemption at the server's authorization server, every check an ID-JAG is held to, the sealed grant vault, renewal, step-up and revocation, the person's consent gates, agentd --login idp:<name>, --delegation-list, --delegation-approve, --delegation-deny, --delegation-revoke, --delegation-forget, --delegation-audit (with a2a) and --delegation-lint. Implies oauth.
x402noyesk256, sha3 and 28 crates of theirs (RustCrypto)security.payments and the payment of the http, mcp.tool, a2a.send and a2a.delegate steps: x402 v2 as a paying client over HTTP, MCP and A2A (the a2a-x402 extension), the exact scheme on EVM chains with an EIP-3009 authorization (secp256k1 with RFC 6979, Keccak-256) and on Solana with an SPL transfer (Ed25519 with ring), signed by the supervisor alone, the spend policy's caps and allow-lists, the approver's gate (with a2a), the ledger, wallet keys sealed in files or held by the external signer, and agentd --print-wallet-address. Implies oauth.
mock-modelsnoyesnoneThe mock model endpoint: mock:final and mock:file:<playbook.json>, scripted chat and decision answers.
internal-mocksnonononeTest scaffolding: the mock MCP servers, crash points and, with oauth (and the default tls), the fake Company. Implies mock-models.

Of the twenty features, sixteen add no crate of their own: they gate code written in this repository, or reuse ring, which every build already links. Beyond the default tls, the dependency cost of the release set comes from a2a, cel and x402, whose 30 crates are k256, sha3 and the RustCrypto crates under them; see Crate counts.

Configuration that needs a feature

A release binary carries everything in this table except exec. In a build from source, the right-hand column is what you see when the feature is missing.

ConfigurationFeatureWithout the feature
an https:// endpoint, listener or peer; security.tls_catlsan https:// model endpoint passes validation and fails at the dial as unsupported; an https:// OTLP collector is refused at load: an https:// observability.otel.endpoint needs the tls build feature, …
a2a.listen, a2a.peers, webhooks.listen, and so every webhook node and A2A starta2arefused at load: a2a.listen needs the a2a build feature, which this binary was built without — …
a schedule start with cron:cronrefused at load: cron schedules require the 'cron' build feature
any CEL expressioncelrefused at load: … uses an expression, which needs the 'cel' build feature (bare paths work without it)
any auth on a model connection; any auth or oauth block on an MCP server; security.client; agentd --login, --print-client-metadataoauthrefused at load: mcp.servers[].auth needs the oauth build feature, which this binary was built without — …
observability.metrics_addrmetricsrefused at load: observability.metrics_addr needs the metrics build feature, …
observability.otel.endpoint, observability.otel.logs: trueotelrefused at load: observability.otel needs the otel build feature, …
SIGHUP reloadhot-reloadSIGHUP keeps its default action and ends the process
lifecycle.watch_config: trueconfig-watchrefused at load: lifecycle.watch_config needs the config-watch build feature, …
security.aauth, mcp.servers[].aauth: trueaauthrefused at load: security.aauth needs the aauth build feature, …
agent.instruction.trustsigna pinned instruction refuses startup: … this build cannot verify signatures — rebuild with --features sign
an oci instruction, prompt or template sourceocirefused at load: … an oci:// source requires building with --features oci
agent.instruction.decrypt, or any encrypted envelopedecryptthe envelope is recognised and refused; ciphertext never reaches the model
mcp.servers[].events, event_grants, agent.instruction.mcp.events, wait {on: event, subscribe:}mcp-eventsrefused at load: mcp.servers[0]: MCP Events bindings and grants require building with --features mcp-events
security.exec.enabled: trueexecrefused at load: security.exec.enabled needs the exec build feature, …
a companies entry, security.companies, agentd --print-company-clientcompaniesrefused at load: companies needs the `companies` feature (build with --features companies)
identity.providers, identity.delegation, security.experimental.id_jag, grant: id_jag, a2a.principals[] match.uid or idp_subjectxaarefused at load: identity.providers, identity.delegation, security.experimental.id_jag, `grant: id_jag` and a2a.principals idp_subject/uid need the `xaa` feature (build with --features xaa)
security.payments, a step's payment, agentd --print-wallet-addressx402refused at load: security.payments needs the `x402` feature (build with --features x402)
mock: endpointsmock-models (or a debug build)refused at load: mock: intelligence needs a build with --features mock-models

Every path and its feature is in the Configuration reference.

Building from source

The release build is agentd-cli with the release feature list. With a Rust toolchain of at least 1.96 (edition 2024):

cargo build --release --locked -p agentd-cli --features "a2a,metrics,cron,otel,hot-reload,config-watch,aauth,oauth,cel,sign,oci,decrypt,mcp-events,mock-models,companies,xaa,x402"

Add exec for the local command runner, or internal-mocks to keep the test scaffolding in a release-profile build. Leave out companies, xaa or x402 for a binary that cannot act at Companies, act for enrolled people or pay, whatever its configuration says; leaving out x402 also drops its 30 crates. --no-default-features drops tls; such a binary reaches https:// only through a TLS-terminating sidecar.

The release profile is opt-level = "z", lto = true, codegen-units = 1, strip = true and panic = "abort". The build needs a C compiler, because ring, the TLS crypto provider, compiles C. It needs no CMake: CI fails the build if the aws-lc provider enters the dependency tree.

Build your own agentd covers choosing the features a configuration and its workflows need, building them in the builder image with an allow-list and cargo deny, the other ways to build, and checking what a build carries.

Crates

The workspace publishes four crates to crates.io. A fifth, the conformance suite, is not published and links none of the others: it drives the binary from outside.

CrateLibrary nameVersion (v1.30.0)LicenceOwns
agentd-netnet3.1.0AGPL-3.0-onlyA blocking HTTP/1.1 and SSE client over any Read + Write, unix and TLS connects, the SSRF guard, X.509 field extraction.
agentd-mcpmcp5.1.0AGPL-3.0-onlyA blocking MCP client over the official rmcp SDK, on agentd's own credentialed Streamable-HTTP socket, plus a raw HTTP listener.
agentd-coreagentd1.30.0AGPL-3.0-onlyThe engine: supervisor, agent loop, workflows, tool registry, configuration, durable state, A2A server.
agentd-clibinary agentd1.30.0AGPL-3.0-onlyThe binary: argument handling, exit codes, and the tui and ui launchers.
agentd-conformanceagentd_conformance1.8.0AGPL-3.0-onlyA black-box conformance suite. Not published.

Each crate's features map onto agentd-core's: agentd-cli's a2a turns on agentd-core/a2a, and so on. agentd-mcp and agentd-net have one feature each, tls.

The package and library names differ on purpose. agentd on crates.io belongs to an unrelated project, so the engine is published as agentd-core with [lib] name = "agentd", and code still writes use agentd::…. Instruction documents are read with the instruction.md project's own Rust SDK, instruction-md (MIT OR Apache-2.0): the format belongs to instruction.md, not to agentd.

Embedding the engine in your own Rust program is Embed agentd in Rust.

Crate counts

The number of distinct crates in the shipped dependency graph, counted as unique package names from cargo tree -p agentd-cli -e normal --prefix none (build and dev dependencies excluded):

BuildCratesNot from this repository
--no-default-features8278
default (tls)8985
default + cel111107
default + a2a146142
default + x402119115
the release feature set193189

The right-hand column leaves out the four workspace crates the command lists. a2a and cel overlap in five crates and x402 overlaps neither; the other fourteen release features add none. Measured with cargo 1.98.0 against the committed Cargo.lock of the v1.21.0 release, in which companies, xaa and x402 joined the release set (163 crates before). The same count holds for the x86_64-unknown-linux-musl target that ships.

Footprint

The binary size, download size, start-up time and idle memory of the release binaries are measured in one place, Engineering choices: the numbers. Each MCP connection and the A2A listener add threads of their own; the Architecture page explains where they come from.

Next steps