APA / Guides
Integration

Connecting Claude Code, Hermes, and Alma to APA: Integration Guide & Comparison

APA's kernel does not hardcode any vendor or agent harness. Every Agent talks to the same HTTP/CLI contract, while deeper session hooks live in harness-specific plugins. Here is the exact status in v0.2.0.

Capability matrix (v0.2.0)

Agent harness Integration today Session hooks & wake Background execution
Hermes Native single plugin apa (plugins/hermes/) Prompt injection, incremental context, turn capture, dispatch receipts, optional gateway wake (wake part) Supported via the headless declaration
Alma Native plugin (plugins/alma/, 34 apa_* tools) USER.md standing block, per-message delta injection, compaction re-inject, explicit wakeMode (thread / inbound / off) Supported via alma-headless-run declaration
Claude Code / Codex CLI / Pi / any CLI Agent Works today via apa CLI + apa guide Manual or prompt-invoked apa context; native session plugins open for contribution (#568, #569, #570) Supported as an executor once a headless declaration is registered and confirmed on Web

Common setup: key issuance and login

Keys are always issued by you in the Web console (Settings › Agents), never by an Agent. Each Agent stores its own key file under <APA_HOME>/keys/<name>.json (mode 0600):

# 1. Save the key issued in Settings > Agents (paste on stdin, then Ctrl-D)
apa login --as claude --url http://127.0.0.1:7777 --token -

# 2. Optional: tell terminal commands in that Agent's environment which key to pick
export APA_AGENT=claude

# 3. Verify identity and read workbench instructions
apa whoami
apa guide

Note: APA_AGENT is only a key name, not a credential. In v0.2.0, apa refuses to run (exit code 2) if legacy APA_URL or APA_TOKEN environment variables are set.

Choosing between native plugins and CLI-only

Objective boundaries

APA governs ledger actions, not your Agent's local sandbox. Connecting an Agent to APA gives it a permission card for APA items, decisions, and rules—not a replacement for the Agent's own filesystem, shell, or network permissions. If an Agent runs under the same OS account with terminal access, configure its own sandbox and approval settings as usual.