Browse RC.6 documentation
RC.6 Documentation revision 18

Appendix: Agent-worker Configuration

Configure named Telegram, LINE, Discord, and Slack workers, credential precedence, runtime paths, transport modes, and local reply behavior.

Audience: Agent operators and integration maintainers

Agent-worker configuration#

.ait/agent-workers.json declares named messaging workers for one AIT Repository. RC.6 supports telegram, line, discord, and slack. The default location can be overridden with AIT_AGENT_CONFIG_PATH.

Read ait-agent-worker: Messaging and Reply Runtime first for the executable's role, complete command surface, message-to-reply path, transport modes, native Codex provider, runtime admission, and security limits. This appendix is the field-by-field authoring reference.

Canonical document shape#

Code · json
{
  "version": 1,
  "workers": {
    "telegram/support": {
      "kind": "telegram",
      "name": "support",
      "mode": "poll",
      "username": "support_bot",
      "env_path": ".ait/agent-runtime/telegram.env",
      "request_timeout_seconds": 30,
      "local_reply": {
        "model": "gpt-5.4-mini",
        "reasoning_effort": "low",
        "sandbox": "workspace-write",
        "turn_timeout_seconds": 300
      }
    }
  }
}

The author file is the direct version plus workers object shown above. An internal diagnostic projection may wrap it as config; do not write that wrapper into the repository file.

Worker keys use exact <kind>/<name> form. The kind and name must be nonempty, the name must not contain /, and an explicit kind must match the key. version is integer 1 for the current contract. Invalid normalization issues cause worker startup to fail closed.

Common worker fields#

FieldType and behavior
kindtelegram, line, discord, or slack; normally derived from the key.
nameNonempty instance name; normally derived from the key.
runtime_rootOptional path for worker runtime files; default .ait/agent-runtime. Relative paths resolve from the Repository root; ~ uses the process home directory when available.
sync_state_pathOptional state-file path. Default <runtime_root>/<kind>-<safe-name>-sync.json.
env_pathOptional credential environment-file path. Default <runtime_root>/<kind>.env.
web_urlOptional normalized browser base URL associated with replies.
request_timeout_secondsOptional positive request timeout. inf, infinite, or none disables supported generic timeouts; Telegram also accepts null and unlimited.
local_replyOptional local reply-provider object, documented below.
created_at, updated_atCommand-managed timestamps.
pid_file, log_file, termination_context_pathCommand-managed lifecycle paths when present; do not use them to configure reply behavior.

The runtime target is derived from .ait/config.json: solo_local runs locally; a remote workflow requires a valid default remote URL. The Repository default_model supplies the Telegram model fallback when no worker model is set.

Credential sources and precedence#

Credential fields must be nonempty strings. Resolution order is:

  1. the worker entry;
  2. the current process environment;
  3. the worker env_path file.

Other behavior fields come from the worker entry or their compiled default; the env file does not override them. Environment files accept KEY=VALUE lines, blank lines, # comments, and one matching pair of single or double quotes around a value. They are not shell scripts.

Keep secrets out of a committed manifest. Prefer an owner-readable env file or the process environment, and use the exact variable names in the environment appendix.

local_reply#

Unknown fields in this nested object are rejected.

FieldContract
programOptional nonempty reply-provider executable.
argsOptional array of strings without NUL characters.
timeout_secondsOptional finite positive number.
append_turn_analysisOptional boolean.
codex_programOptional nonempty Codex executable override.
modelOptional nonempty model name.
reasoning_effortnone, minimal, low, medium, high, xhigh, max, or ultra.
sandboxread-only, workspace-write, or danger-full-access.
turn_timeout_secondsPositive number, numeric string, or inf, infinite, none, or unlimited.

Sandbox choice is an execution boundary, not a messaging preference. Grant only the access required by the worker's Repository task.

Telegram fields#

FieldContract and default
tokenRequired bot token, or supply AIT_TELEGRAM_BOT_TOKEN/BOT_TOKEN.
usernameOptional; a leading @ is removed.
modepoll (default) or webhook.
bind_host / bind_portWebhook listener; defaults 127.0.0.1 and 8090.
webhook_pathHTTP path; default /webhook.
webhook_secretOptional secret or AIT_TELEGRAM_WEBHOOK_SECRET.
poll_timeout_secondsInteger at least 5; default 45.
background_sync_enabledBoolean; default false.
background_sync_interval_secondsNumber at least 5; default 30.
openai_api_keyOptional worker credential; placeholder values are rejected.
openai_base_urlOptional normalized base URL; default https://api.openai.com/v1.
openai_modelOptional model; falls back to the Repository default model, then gpt-5.4-mini.
openai_reasoning_effortOptional string; default low.
openai_timeout_secondsOptional positive timeout; inherits the request timeout when omitted.
openai_max_output_tokensInteger at least 64; default 700.
turn_merge_window_secondsNonnegative number; default 0.35.
turn_merge_max_messagesPositive integer; default 4.
decoupled_reply_enabledBoolean; default true.
reply_markdown_enabledBoolean; default true.
owner_bootstrap_enabledBoolean; default true.
stt_modeoff (default) or local-stt.
stt_modelLocal speech-to-text model name.
stt_deviceDevice selector; default auto.
stt_compute_type, stt_languageOptional strings.
stt_include_audio_uploadsBoolean; default false.
stt_programOptional local speech-to-text executable path.
stt_timeout_secondsPositive number from 0.1 through 3600; default 120.
expected_concurrent_workers, workers_per_shardOptional positive integers.
event_loop_backendOptional backend string.

LINE fields#

FieldContract and default
tokenRequired channel access token, or AIT_LINE_CHANNEL_ACCESS_TOKEN/LINE_CHANNEL_ACCESS_TOKEN.
secretRequired channel secret, or AIT_LINE_CHANNEL_SECRET/LINE_CHANNEL_SECRET.
api_base_urlDefault https://api.line.me.
bind_host / bind_portDefaults 127.0.0.1 and 8091.
webhook_pathDefault /callback.

Discord fields#

FieldContract and default
application_idRequired string, or AIT_DISCORD_APPLICATION_ID/DISCORD_APPLICATION_ID.
public_keyOptional credential for interaction verification.
bot_tokenOptional credential for gateway or API use.
turn_timeout_secondsOptional positive timeout; default is at least 300 seconds when request timeout is set.
api_base_urlDefault https://discord.com/api/v10.
http_user_agentDefault curl/8.7.1.
bind_host / bind_portDefaults 127.0.0.1 and 8092.
interaction_pathDefault /interactions.

The selected worker command determines whether public_key, bot_token, or both are required for that service mode.

Slack fields#

FieldContract and default
app_tokenOptional credential for socket mode.
signing_secretOptional credential for HTTP command verification.
api_base_urlDefault https://slack.com/api.
http_user_agentDefault ait-agent-worker/0.1.
bind_host / bind_portDefaults 127.0.0.1 and 8093.
command_pathDefault /command.
ack_textDefault ait is thinking....
response_typeDefault in_channel.

The selected Slack command determines whether socket credentials or an HTTP signing secret is mandatory.

Verification#

Use the agent-worker inspection and launch commands from the complete CLI reference. Diagnostic output reports only whether credentials are set; it does not print their values. Test webhook listeners on loopback before exposing them through a trusted reverse proxy.

Version authority

Checked against the exact RC.6 source

This page is public documentation, not a second product contract. Use the exact source and distribution contract for release authority.

Owning component Snapshots
  • ait-coreSNP-8C859807E799
  • ait-serverSNP-25FF61FEEA4C
  • ait-runnerSNP-E50374CBA6E6
  • ait-pythonSNP-DF2C871D5400
  • ait-nodeSNP-46BB35869747