# APA (Awesome Personal Agent) > Open-source, self-hosted workbench that sits behind your personal AI Agent (agent harness). Your Agent decides how work gets done; APA owns the ledger, clock, intake screening, decision queue, and kernel-enforced permission cards. - Website: https://xiaohei-info.github.io/awesome-personal-agent/ - Repository: https://github.com/xiaohei-info/awesome-personal-agent - Releases: https://github.com/xiaohei-info/awesome-personal-agent/releases - License: MIT - Current version: v0.2.0 ## What APA is (and is not) APA is a single self-hosted Go binary (`apa`) backed by SQLite and an embedded React Web console. It gives an Agent—which normally only runs when prompted—initiative across sessions without replacing the Agent itself. - **APA owns**: the ledger (projects, items, discussions, materials, decisions, preference rules), the clock (deadlines, time slots, follow-ups, briefs), inbound source screening (rules -> optional judgment model -> batch Agent), the decision queue (`For you to decide`), delegation tracking, and kernel-enforced authorization. - **Your Agent owns**: the agent loop, chat interface, model routing, tool sandbox, tool-level permissions, and personal long-term memory. - **Explicit non-goals**: no built-in agent loop, no multi-user team collaboration, no workflow/field designer, no billing/quota management, no hidden user profile inferred from chats. ## Quickstart (v0.2.0) Let your coding Agent install it by pasting this prompt: ```text Install APA for me by following https://raw.githubusercontent.com/xiaohei-info/awesome-personal-agent/main/docs/user/install-for-agents.md ``` Or run locally from a release archive (`apa-0.2.0--.tar.gz` for Linux/macOS `amd64`/`arm64`): ```sh tar -xzf apa-0.2.0-darwin-arm64.tar.gz && cd apa-0.2.0-darwin-arm64 shasum -a 256 -c SHA256SUMS # sha256sum -c on Linux export PATH="$PWD/bin:$PATH" apa version apa init # creates ~/.apa (or $APA_HOME) and sets Web password (>=12 chars) apa serve # listens on http://127.0.0.1:7777 by default apa doctor # read-only self-check and current run tier ``` Connect an Agent after creating its key in Web (`Settings > Agents`): ```sh apa login --as --url http://127.0.0.1:7777 --token - export APA_AGENT= # selects saved key; APA_URL and APA_TOKEN are rejected (exit 2) apa whoami apa guide ``` ## Core CLI workflow for Agents - `apa context`: fetch workbench overview at session start, then incremental changes. - `apa search `: BM25 full-text search across projects, items, decisions, and materials (permission-scoped, no model call). - `apa item show ` / `apa item thread ` / `apa item comment --text `: inspect and update items; `@executor` mentions trigger managed runs with chain-depth limits. - `apa ask --question --option ...`: queue a concrete decision for the user (at least two real options or free-text; never times out into a default answer). - `apa delegate --parent --assignee [--start]` / `apa dispatch add`: hand off work and track self-dispatched runs in the same ledger. - `apa report --outcome done|blocked|progress --summary `: deliver results. - `apa why `: replay provenance, matching rules, judgments, reports, and who decided. ## Security and permission boundaries - **10-group permission card per Agent**: View, Organize items, Handle source events, Decide for me, Change everyday rules and reminders, Connect sources, Data outbound, Channels, Agents and executors, Permanent deletion. A new Agent gets only the first three groups. - **Kernel-enforced exit codes**: exit `20` (`hard_line`, user-only operations such as editing permission cards, keys, passwords, channel answerers) and exit `23` (`tier_closed`, group closed or expired). Agents must not retry; pass the Web link in the error to the user. - **Observe-first acting rules**: rules that mutate state start in observe mode; edited acting rules fall back to observe. - **Untrusted content isolation**: external emails/issues are treated as material, never as instructions; background runs see only trusted senders by default. ## Supported Agent harnesses - **Hermes** (`plugins/hermes/`): one native plugin named `apa` (context injection, 33 CLI tools plus declaration, capture, receipts, wake, headless declaration), validated with `hermes plugins validate`. - **Alma** (`plugins/alma/`): native plugin (`apa-alma`) with 34 `apa_*` tools, `USER.md` standing instructions, compaction re-injection, wake routing, and headless runner. - **Claude Code, Codex CLI, Pi, and any CLI Agent**: supported today through the `apa` CLI (`apa login --as`, `apa guide`) and headless executor declarations. Full native session plugins are open for contribution (Appendix A). ## Guides and documentation - [Managing Multiple Agent Sessions: One Progress Ledger and Decision Queue](https://xiaohei-info.github.io/awesome-personal-agent/guides/multi-agent-decision-queue.html) - [Why Cron Jobs and Chat Logs Cannot Replace an Agent Workbench](https://xiaohei-info.github.io/awesome-personal-agent/guides/why-cron-and-chat-logs-fail.html) - [Connecting Claude Code, Hermes, and Alma to APA: Integration Guide & Comparison](https://xiaohei-info.github.io/awesome-personal-agent/guides/agent-harness-integration.html) - [Quickstart](https://github.com/xiaohei-info/awesome-personal-agent/blob/main/docs/user/quickstart.md) - [Install Guide for Agents](https://github.com/xiaohei-info/awesome-personal-agent/blob/main/docs/user/install-for-agents.md) - [Run Tiers](https://github.com/xiaohei-info/awesome-personal-agent/blob/main/docs/user/run-tiers.md) - [Security Notes](https://github.com/xiaohei-info/awesome-personal-agent/blob/main/docs/user/security.md) - [Solution Design](https://github.com/xiaohei-info/awesome-personal-agent/blob/main/docs/solution-design.md) - [Appendix A: Harness Interface & Headless Runs](https://github.com/xiaohei-info/awesome-personal-agent/blob/main/docs/appendix-a-harness.md)