agentsys threat model (local-first demo / team tool)
agentsys coordinates AI coding agents on one machine (or one trusted host). It is not a multi-tenant SaaS. Assumptions and limits below are intentional.
Assets
- Task store (
.agent-system/state.db): tasks, findings, approvals, append-only events. - Install key (
~/.agentsys/install.key): HMAC key for the event hash chain (mode0600). - Optional approver verifier (
~/.agentsys/approver.json): scrypt hash of a passphrase; signatures on human approvals when enabled. - Shared usage ledger (
AGENTSYS_LEDGERor default path): token budgets across projects. - Git worktrees and branches: real code changes until merge.
Trust boundaries
| Actor | Trust level |
|---|---|
| Human at keyboard + TTY, or human on dashboard with session token | Can approve, deny, merge (with confirmations), cancel, requeue |
Agent CLI / MCP (harness:account:role or agent:harness:role) | Can claim, work, submit, review if a different identity than authors |
Dispatched child process (AGENTSYS_DISPATCHED=1) | Cannot perform human:* actions |
| Anyone with shell + write access to the store file | Can bypass all software rules (see below) |
Controls (software)
- Hash-chained events — Tampering with
prev_hash/event_hashor metachain_prev_hashis detected byagentsys verify-log. Pre-migration rows arelegacyand anchored. - Human provenance — Human actions record TTY/dashboard/dispatch state; refused when dispatched or without TTY/token (except dashboard token path).
- TTY confirmation — Sensitive CLI actions read yes from
/dev/tty, not piped stdin. - Reviewer independence — Store rejects review by task authors; dashboard/API flag
same_account_reviewwhen reviewer shares an account segment with a worker. - Scope / verify gate — Implement tasks must pass automated checks before review (extended in later phases with project test profiles).
- Git hooks (when installed) —
pre-merge-commit/pre-push+check-branchreduce accidental merges; fast-forward merges do not runpre-merge-commit— usemerge.ff=falseor rely onpre-push+ CI.
Out of scope / honest limits
- Same-user shell is root. A user who can run
sqlite3on the store or exportAGENTSYS_ACTOR=human:…with a real TTY can impersonate a human. The chain detects after-the-fact edits, not motivated same-user fraud. - Self-declared identities —
AGENTSYS_ACTORis asserted, not cryptographically bound to vendor accounts (adapters report usage where possible). - Network — Dashboard binds to localhost by default; Host/Origin/token reduce rebinding and drive-by POSTs, not a stolen laptop session.
- Secrets in findings — Scanners reduce accidental commits; agents can still paste secrets into the DB if the human does not run verify-log and review.
MCP and agents
The stdlib MCP server exposes worker tools only (claim, heartbeat, finding, checkpoint, submit, resume, status). No approve, merge, or review-over-HTTP.
Reporting incidents
- Run
agentsys verify-log --stricton a copy of the store. - Inspect events for unexpected
human:*actors andsame_account_reviewin the dashboard snapshot. - Rotate approver passphrase (
agentsys approver init) if passphrase may be compromised.