ka2a documentation

Configuration reference

This guide describes ka2a at revision a34b8bc9d319502002f104d28f90d18c325a5d26. Source: docs/configuration-reference.md. Source links require repository access. The App examples on the product page use reviewed revision a7c8ac4a85f5.

Contents

This reference lists every flag of the ka2a command and every field of ka2a.Config. The test TestConfigurationReferenceMatchesTheFlagsAndConfig (internal/cli, make verify) compares it with the code. It fails when a flag or a field is missing here, when a listed flag or field does not exist, or when the commands or the default of a flag differ. For the full text of a command, run ka2a help <command>.

Environment

VariableMeaning
KA2A_STATE_DIRDefault of --state-dir.

Command-line flags

The column "Default" shows the value when you do not give the flag. "none" is an empty value. "varies" means that the commands have different defaults.

FlagCommandsDefaultMeaning
--abandon-dispatchrecovery simulate, recovery plannoneHeld dispatch row to abandon. Repeatable; the actions apply in command-line order.
--abandon-operationrecovery simulate, recovery plannoneOperation ID of a sent request to abandon. Repeatable.
--allow-plaintext-credentialsdoctor, topics verify, topics provisionfalsePermit SASL/PLAIN without TLS. Use it only for a local test broker.
--allow-plaintextrun, send, probe, task get, tasks list, task cancelfalsePermit a broker connection without TLS. Only the development profile permits it; use it only for a local development broker.
--atcatalog explainnoneSigning time of the explained request (RFC 3339). Key windows apply to it. The default is the current time.
--backuprestore rehearsenoneBackup file from 'ka2a backup'. Required. The rehearsal only reads it.
--brokersdoctor, topics verify, topics provision, run, send, probe, task get, tasks list, task cancel, scaffoldvariesComma-separated Kafka bootstrap brokers (host:port). The node commands need it. doctor checks the broker only with it. scaffold: the development broker of config/development.env (default 127.0.0.1:19092).
--budget-bytesdoctor, observe, snapshot export, mcp0Retained-state budget of the owner, for the storage checks. The default is the store default (1 GiB).
--catalogdoctor, topics verify, topics acl-plan, init, topics provision, run, send, probe, task get, tasks list, task cancel, catalog explainnoneTrusted catalog file (ka2a.catalog.v1). run, the request commands, topics acl-plan and catalog explain need it. doctor, init and the other topic commands use it to check the catalog or to find the mailbox topic.
--consumer-grouptopics acl-plannoneConsumer group of the node for the ACL plan. The default is ka2a.owner.<domain>.<endpoint>, the default of Config.Kafka.ConsumerGroup.
--context-idsend, tasks listnonesend: the A2A context ID to continue. tasks list: list only the tasks of this context.
--controlrunfalseServe the control socket control.sock in the state directory. ka2a backup --online uses it to write a consistent backup copy of the running store (an online snapshot). Only a user that can open the state directory can connect. The socket path must have at most 103 bytes.
--cursorobserve, snapshot export0Continue the list of --list after this cursor.
--digestrecovery applynoneExpected plan digest (sha256:...), as reviewed. Optional; a different value refuses the plan.
--dispatchheld release, held abandon0Inbound sequence number of the held dispatch row (the IN column of 'ka2a observe --list dispatch').
--domaindoctor, topics verify, topics acl-plan, init, topics provision, run, send, probe, task get, tasks list, task cancel, scaffoldvariesTrust domain of the local endpoint. scaffold: the trust domain of the two endpoints (default dev.example).
--drain-timeoutrun, send, probe, task get, tasks list, task cancel30sTime limit of the drain at the stop. Unfinished work stays durable.
--endpointdoctor, topics verify, topics acl-plan, init, topics provision, run, send, probe, task get, tasks list, task cancel, keys generate, keys publicnoneEndpoint ID of the local endpoint. keys generate and keys public: the endpoint that the key signs for, as DOMAIN/ENDPOINT (required).
--expiry-dayscatalog validate30Warn about catalog keys that end within this many days without a replacement (0..3650).
--forcesnapshot exportfalseReplace an existing file.
--fromcatalog explain, restorenonerestore: the backup file from 'ka2a backup'. catalog explain: the sender endpoint as DOMAIN/ENDPOINT (required).
--history-lengthtask get-1Most recent history messages to return. -1 returns all.
--ka2a-replacescaffoldnoneLocal ka2a checkout for a replace directive in go.mod. Use it only for local development.
--ka2a-versionscaffoldnoneVersion of github.com/k-a2a/ka2a in go.mod. The default is the version of this build; a development build needs this flag or --ka2a-replace.
--key-fingerprintcatalog explainnoneSigning key of the explained request: the catalog key ID or its public key (unpadded base64url). The default accepts any key of the sender that is usable at --at.
--key-idkeys generatenoneKey ID of the new key in the catalog ([A-Za-z0-9][A-Za-z0-9._:-]{0,127}). Required.
--listobserve, snapshot exportnoneShow only this list, to page through it: operations, outbox, dispatch, rejections, incidents, partitions.
--log-levelrun, send, probe, task get, tasks list, task cancelwarnNode diagnostics on stderr: off, error, warn or info. They never hold bodies or raw identifiers.
--max-value-bytesdoctor, topics verify, topics provision1048576Largest record value; it sets the required max.message.bytes.
--message-idsendnoneA2A message ID. The default is the --operation-id key, so a repeated command sends the same request; without a key it is a new UUID.
--metrics-listenrunnoneServe the node metrics in the Prometheus text format at http://ADDRESS/metrics. ADDRESS must be a loopback address (127.0.0.1, ::1 or localhost). Port 0 selects a free port. The default serves no metrics.
--not-afterkeys generate, keys publicnoneEnd of the key window in the printed catalog entry (RFC 3339). The default is no end.
--not-beforekeys generate, keys publicnoneStart of the key window in the printed catalog entry (RFC 3339). The default is the current time, truncated to the second.
--modulescaffoldexample.com/ka2a-appGo module path of the new project.
--notequarantine release, recovery simulate, recovery plannoneHow the state was reconciled (required, 1..1024 bytes). The recovery commands: required with --release-quarantine.
--onlinebackupfalseAsk the running node of the state directory for the copy through its control socket (ka2a run --control). The node does not stop. The copy has the format of an offline backup.
--operation-idsend, task get, tasks list, task cancelnoneOperation key (lowercase UUIDv4). The same key with the same request returns the original operation.
--operationheld abandon, catalog explainnoneheld abandon: the operation ID of a sent request that waits for its response or is held; give --dispatch or --operation. catalog explain: the A2A operation (SendMessage, GetTask, ListTasks or CancelTask, required).
--operatorquarantine release, recovery simulate, recovery plannoneName of the person or tool that decided (required, 1..128 bytes). The recovery commands: required with --release-quarantine.
--outsnapshot export, backup, keys generate, recovery plannonebackup: the backup file to write; it must not exist. snapshot export: the snapshot file to write. keys generate: the key file to write; it must not exist, and others must not be able to read its directory. recovery plan: the plan file to write (mode 0600); it must not exist.
--beforecatalog diff, snapshot diffnoneOriginal catalog file, or earlier raw-identifier snapshot file. Required.
--aftercatalog diff, snapshot diffnoneProposed catalog file, or later raw-identifier snapshot file. Required.
--limitcatalog diff, snapshot diffvariesMaximum change details per section (1..200). catalog diff: default 100 for endpoints, keys and grants. snapshot diff: default 50 for operations and partitions. Totals include omitted details.
--outputversion, doctor, observe, snapshot export, snapshot diff, operation show, topics verify, topics acl-plan, init, topics provision, backup, restore, quarantine release, held release, held abandon, run, send, probe, task get, tasks list, task cancel, scaffold, keys public, catalog validate, catalog digest, keys generate, catalog explain, catalog diff, recovery simulate, recovery plan, recovery apply, restore rehearse, mcptextOutput format: text or json. The mcp command always reserves stdout for the protocol and sends errors to stderr.
--page-sizeobserve, snapshot export, tasks listvariesLargest number of items in a page. tasks list: 1..100, default 50. The other commands give their own default in ka2a help <command>.
--page-tokentasks listnoneToken of the page to read, from the previous page.
--overwritescaffoldnoneReplace this existing file (a path relative to DIR, for example cmd/sender/main.go). Repeat the flag for each file. The default replaces no file.
--peersend, probe, task get, tasks list, task cancelnonePeer endpoint as DOMAIN/ENDPOINT. The catalog must grant the operation. Required. For probe, the peer must enable the probe handler.
--principaltopics acl-plannoneKafka principal of the node, for example User:ka2a-a or User:CN=ka2a-a,O=example. Required.
--probe-handlerrunfalseEnable the probe handler: answer the acceptance probes of ka2a probe (extension urn:ka2a:probe:1). Other SendMessage and CancelTask requests still get UnsupportedOperation. The catalog must grant the prober SendMessage. The default answers no probe.
--probe-listenrunnoneServe the health probes /livez, /readyz and /connectz (ka2a.health/1) at http://ADDRESS from the open of the node. ADDRESS must be a loopback address (127.0.0.1, ::1 or localhost). Port 0 selects a free port. The default serves no probes.
--profiledoctor, topics verify, topics provision, run, send, probe, task get, tasks list, task cancelqualifiedDeclared durability profile: qualified or development. The node and the topic commands check the mailbox topic against it.
--raw-idsobserve, snapshot export, operation show, held release, held abandon, send, task get, tasks list, task cancelfalseShow raw identifiers and digests. The default shows pseudonyms. Bodies are never shown.
--reasonheld release, held abandon, recovery simulate, recovery plannoneReason token of the decision, recorded with the row ([a-z][a-z0-9_]{0,63}, required). The recovery commands: required with a dispatch or operation action, and used for each of them.
--receiptrecovery applynoneReceipt file to write (ka2a.recovery-receipt/1, mode 0600). It must not exist, and its parent must pass the private-directory checks. Required. A later file failure keeps the receipt on stdout with receipt_error and exits 1.
--release-dispatchrecovery simulate, recovery plannoneHeld dispatch row to queue again (the IN column of 'ka2a observe --list dispatch'). Repeatable.
--release-quarantinerecovery simulate, recovery plannoneEnd the restore quarantine. A simulation or plan with this action has no other action.
--reportrestore rehearsenoneAlso write the rehearsal report to this new file (mode 0600).
--retentiondoctor, topics verify, topics provision192h0m0sSmallest accepted retention of the mailbox topic.
--sasl-mechanismdoctor, topics verify, topics provision, run, send, probe, task get, tasks list, task cancelnoneSASL mechanism: PLAIN, SCRAM-SHA-256 or SCRAM-SHA-512.
--sasl-password-filedoctor, topics verify, topics provision, run, send, probe, task get, tasks list, task cancelnoneFile with the SASL password (mode 0600). The password is never a flag value.
--sasl-usernamedoctor, topics verify, topics provision, run, send, probe, task get, tasks list, task cancelnoneSASL user name.
--show-resultsend, task get, tasks list, task cancelfalseAlso print the A2A result document. It can hold business data.
--signing-keydoctor, init, run, send, probe, task get, tasks list, task cancelnoneSigning key file of the local endpoint (ka2a.signing-key.v1, mode 0600). run and the request commands need it. doctor and init check it.
--live-statusmcpfalseRead the running endpoint's broker observations from its private control socket, if available.
--recovery-reportmcpnoneRetained recovery simulation JSON, maximum 256 KiB. No recovery is run.
--replay-reportmcpnoneRetained modelbridge observation JSON, maximum 256 KiB. No model is run.
--snapshotmcpnoneRead one retained pseudonymized ka2a.snapshot/1 file instead of a store.
--start-timeoutrun, send, probe, task get, tasks list, task cancel2m0sTime limit of the node start: restart recovery and the mailbox check. The start does not wait for a broker: without one, the mailbox check stays unverified and the node admits work locally.
--stateobserve, snapshot export, tasks listnoneList only the tasks in this state, for example working or TASK_STATE_WORKING.
--state-dirdoctor, observe, snapshot export, operation show, topics verify, topics acl-plan, init, topics provision, backup, restore, quarantine release, held release, held abandon, run, send, probe, task get, tasks list, task cancel, recovery simulate, recovery plan, recovery apply, mcpnoneState directory of the endpoint. The default is $KA2A_STATE_DIR.
--strictdoctor, topics verify, topics provision, catalog validatefalseCount unverified broker settings as problems. catalog validate: count warnings as problems.
--task-idsendnoneA2A task ID to continue.
--textsendnoneText of the message. Required.
--timeoutdoctor, topics verify, topics provision, probe30sTime limit of the broker requests. For probe: how long to wait for the answer (1s..1h); the probe request expires after this time.
--tlsdoctor, topics verify, topics provision, run, send, probe, task get, tasks list, task cancelfalseConnect to the brokers with TLS.
--tls-cadoctor, topics verify, topics provision, run, send, probe, task get, tasks list, task cancelnonePEM file of the CA certificates for TLS. The default is the system pool.
--tls-certdoctor, topics verify, topics provision, run, send, probe, task get, tasks list, task cancelnonePEM file of the client certificate for mutual TLS: the leaf first, then the intermediate CAs. Needs --tls-key. The certificate must allow client authentication.
--tls-crldoctor, topics verify, topics provision, run, send, probe, task get, tasks list, task cancelnonePEM (or one DER) file of the certificate revocation lists (CRL) of the broker chain; bytes after a DER list refuse the file. Needs --tls-ca: a CA certificate of that file must sign each list, and each list must be current (after its this update, before its next update). Each handshake refuses a broker chain that a list revokes (tls_failed), also through a revoked intermediate CA of the bundle. Delta lists, indirect lists and lists with an unknown critical extension are refused. At most 64 lists and 8 MiB.
--tls-keydoctor, topics verify, topics provision, run, send, probe, task get, tasks list, task cancelnonePEM file of the unencrypted private key of --tls-cert (mode 0600). The key is never a flag value and never appears in an output.
--tls-server-namedoctor, topics verify, topics provision, run, send, probe, task get, tasks list, task cancelnoneServer name for TLS verification.
--tocatalog explainnoneReceiver endpoint of the explained request as DOMAIN/ENDPOINT (required).
--topicdoctor, topics verify, topics provisionnoneMailbox topic. The default comes from the catalog entry of the endpoint.
--waitsend, task get, tasks list, task cancel30sHow long to wait for the response. 0 waits only for the broker stage.
--work-dirrestore rehearsenoneNew private directory for the restored copy; it is kept. The default is a temporary directory that the rehearsal removes.

Flag rules

  • A password is never a flag value. Give it in a file with mode 0600 (--sasl-password-file).
  • --tls-ca, --tls-crl, --tls-server-name, --tls-cert and --tls-key turn on TLS, also without --tls.
  • --tls-cert and --tls-key go together (mutual TLS). The key file must be a regular file of the effective user with mode 0600, and the pair must match. A command that contacts the broker refuses a client certificate that is expired or not yet valid. doctor reports broker.client_certificate: a problem outside the validity period and a warning in the last 30 days.
  • With --tls-crl, doctor reports broker.revocation_lists with the earliest next update of the lists: ok, or a warning when it is less than 24 hours away. A stale list is refused before broker contact. ka2a run shows the earliest next update of the lists in use in the line of an accepted reload, the run UI and ka2a_revocation_lists_next_update_timestamp_seconds.
  • With mutual TLS, SASL is optional. Without SASL, the client certificate identifies the principal (the broker maps its subject with ssl.principal.mapping.rules).
  • --allow-plaintext (node commands) permits a connection without TLS. Only the development profile accepts it.
  • --allow-plaintext-credentials (administrative commands) permits SASL/PLAIN without TLS. Use it only for a local test broker.
  • --metrics-listen and --probe-listen accept only loopback addresses.
  • ka2a run reads --tls-ca, --tls-crl, --tls-server-name, --tls-cert, --tls-key and --sasl-password-file again on SIGHUP and reloads the broker credentials of the running node. The node checks the new material, also with one broker request to each bootstrap broker of --brokers, before it uses it; a refusal of any broker keeps the previous material. Each refusal line on stderr names its class. The other flags, the catalog and the signing key stay until a restart (production guide).

ka2a.Config

pkg/ka2a reads this configuration at Open. Zero values take the defaults.

FieldDefaultMeaning
Config.EndpointrequiredThe local endpoint (Domain and Name). The catalog must list it.
Config.StateDirrequiredThe state directory. One process owns it. Open creates it with mode 0700.
Config.CatalogFilerequiredThe trusted catalog (ka2a.catalog.v1): peers, routes, keys and grants.
Config.SigningKeyFilerequiredThe Ed25519 signing key (ka2a.signing-key.v1, mode 0600).
Config.KafkaThe broker connection.
Config.Kafka.BrokersrequiredBootstrap brokers (host:port).
Config.Kafka.TLSnilTLS configuration. The node uses a clone. The qualified profile requires it. For mutual TLS, set Certificates (or GetClientCertificate); the library does not check the validity period of the client certificate at Open. Node.ReloadCredentials replaces the TLS configuration and the SASL user name and password of a running node, and refuses an expired client certificate, a configuration that turns off the verification of the broker certificate (InsecureSkipVerify) and a lower MinVersion. For the revocation lists of --tls-crl, set VerifyConnection to the method of ka2a.ParseBrokerRevocationLists(caPEM, crl, now) (production guide); a reload cannot remove it.
Config.Kafka.RevocationListsNextUpdatezeroEarliest next update of the revocation lists that Config.Kafka.TLS.VerifyConnection checks (BrokerRevocationLists.NextUpdate()). Information only: the node shows it in Status.Credentials.RevocationListsNextUpdate and ka2a_revocation_lists_next_update_timestamp_seconds; the check is the function. BrokerCredentials.RevocationListsNextUpdate replaces it at an accepted reload.
Config.Kafka.SASLnilSASL credentials.
Config.Kafka.SASL.MechanismSCRAM-SHA-512, SCRAM-SHA-256 or PLAIN. PLAIN needs TLS.
Config.Kafka.SASL.UsernameSASL user name. It must not hold control characters.
Config.Kafka.SASL.PasswordSASL password. The node never writes it to an error or a log.
Config.Kafka.AllowPlaintextfalsePermit a connection without TLS. The qualified profile refuses it.
Config.Kafka.ConsumerGroupka2a.owner.<domain>.<endpoint>The group of the one durable owner. Observers must use other groups.
Config.Kafka.ClientIDka2aPrefix of the Kafka client IDs.
Config.Kafka.FetchMaxWaitKafka layer defaultLongest wait of a fetch.
Config.Kafka.SessionTimeoutKafka layer defaultConsumer group session timeout.
Config.Kafka.HeartbeatIntervalKafka layer defaultConsumer group heartbeat interval.
Config.Kafka.RebalanceTimeoutKafka layer defaultConsumer group rebalance timeout.
Config.Kafka.CommitTimeoutKafka layer defaultTime limit of an offset commit.
Config.Kafka.RevokeSettleTimeoutKafka layer defaultTime that a revoked partition gets to settle its accounted progress.
Config.Kafka.DeliveryTimeoutKafka layer defaultTime limit of one record delivery.
Config.Kafka.RequestTimeoutKafka layer defaultTime limit of one broker request.
Config.DurabilityqualifiedDeclared broker profile: qualified or development.
Config.LimitsBounds of records, dispatch and retained state.
Config.Limits.MaxValueBytes1 MiBLargest record value.
Config.Limits.MaxHeaderBytes16 KiBLargest total of the record headers.
Config.Limits.RetainedBytes1 GiBRetained-state budget. A new admission that would exceed it fails with storage_pressure.
Config.Limits.MaxDispatch32Handler calls that run at the same time.
Config.HorizonsSigned admission horizons, the clock skew and the retention periods.
Config.Horizons.ClockSkew5 minutesAccepted wall-clock skew.
Config.Horizons.RequestHorizon24 hoursLongest signed request lifetime.
Config.Horizons.ResponseHorizon8 daysLongest signed response lifetime.
Config.Horizons.RequestDedupRetention8 daysRetention of request deduplication. At least the request horizon plus the skew.
Config.Horizons.ResponseDedupRetention9 daysRetention of response deduplication. At least the response horizon plus the skew.
Config.Horizons.ResultRetention8 daysHow long a completed result stays available.
Config.Horizons.TombstoneRetention8 daysHow long a purged identity stays blocked.
Config.Horizons.RejectionRetention8 daysHow long a rejection disposition stays.
Config.MirrorSessionfalseWrite the A2A contextId to the header ce_ka2asession.
Config.PropagateRunfalseWrite a submitted run ID to the header ce_ka2arun. The default drops it.
Config.DrainTimeout30 secondsTime limit of the drain of Run after its context ends.
Config.WaitForBrokerfalseThe start of Run waits until a broker answers the mailbox check.
Config.ObservernilReceives events through a bounded, lossy queue. Messaging never waits for it.
Config.ObserverQueue1024Size of the observer queue.
Config.Loggernil (discard)Receives classified diagnostics. It never receives bodies, context IDs, run IDs or key material.

All ka2a documents