Animus agent interactions
Skill launchapp-dev/animus-skills/skills/animus-agent-interactions
Deep reference for Animus human-in-the-loop (HITL) agent interactions — agent questions and approval requests, the pending-interaction inbox, paused workflows waiting for an answer, permission prompts, approval_policy routing, and suspend/resume mechanics. Use when an agent is parked on a pending interaction, a workflow is paused awaiting a human decision, an approval or permission prompt needs answering, or when configuring approvals for agents.From its SKILL.md
npx -y skills add launchapp-dev/animus-skills --skill animus-agent-interactionsAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
11.1 KB, as published. Nobody here has run it
Agent Interactions (Human-in-the-Loop)
Animus agents escalate to humans through two blocking MCP tools on the
kernel's animus mcp serve server:
animus.agent.ask— a clarifying question (agent_id,question,options[],questions[]— array of question objects to ask several at once (see below) —timeout_secs,workflow_id,task_id,wait).animus.agent.request_approval— an approval for a sensitive action (agent_id,action— derived asuse tool <tool_name>when omitted —tool_name,input/arguments,tool_use_id,suggestions,timeout_secs,workflow_id,task_id,wait).
Each call writes a pending record under
~/.animus/<repo-scope>/interactions/ until a human answers it. Timeouts:
default 600s, max 3600s.
Wait modes: block vs suspend
| Mode | Default for | Behavior | Timeout |
|---|---|---|---|
block | ad-hoc animus agent run / animus chat | tool call parks until answered | approval ⇒ deny (fail closed); question ⇒ structured error telling the agent to proceed on best judgment |
suspend | workflow phases (server pinned via animus mcp serve --workflow-id <ID> or ANIMUS_MCP_WORKFLOW_ID) | tool returns { status: "pending", interaction_id, instruction } immediately, the workflow pauses, the interaction id is stamped into the phase session checkpoint | no auto-expiry; workflow stays paused until answered |
Answering a suspend-created record resumes the workflow via the detached-runner
resume path with the decision threaded in as session feedback. Only
suspend-created records trigger a resume — a block-mode payload workflow_id
is observability metadata only. Agents may downgrade suspend→block; a
block→suspend request on an unpinned server is ignored with a warning.
Prefer suspend for daemon-driven phases: no process parks waiting, and a
crash mid-wait is recoverable from the checkpoint.
Approval policy (workflow YAML)
Per-agent routing for animus.agent.request_approval calls, consulted before
escalating:
agents:
swe:
permission_mode: acceptEdits # transport-level guard (provider's own flag)
approval_policy: # kernel inbox layer
auto_allow: ["cargo *", "git.commit"]
auto_deny: ["git.push*"]
default: ask # ask | allow | deny
auto_allow/auto_denyare*-glob lists matched against the request'stool_namewhen present, otherwise itsaction.auto_denywins on overlap (fail closed).default: askescalates to a pending interaction.- Declaring an
approval_policyimplies--approvalsonanimus agent run(setsextras.approvalsso transports route permission decisions through the kernel tool). permission_modecomposes withapproval_policy— neither overrides the other.permission_modeis the transport-level guard — each provider plugin maps it onto its own driver (claude--permission-modenatively; codex inside its MCP driver, gemini/opencode inside their ACP drivers, since v0.6.9) — deciding whether the provider escalates at all;approval_policydecides what happens to escalations that reach the kernel. Caveat: ad-hoc surfaces honourpermission_modetoday; workflow phase execution enforces it once the out-of-tree workflow-runner plugin pin consumes the field (still true at v0.7.0-rc.18). Phaseruntime.permission_modewins over the agent profile's value.
Native enforcement (claude) — SDK conformance
With approvals enabled, the claude transport wires
animus.agent.request_approval as the claude CLI's
--permission-prompt-tool, so every native permission decision routes
through the kernel — enforced, not voluntary. The wire contract:
- Input:
{ tool_name, input, tool_use_id }. Noagent_id— identity comes from the server pin. - Response (first text content block, SDK permission-result schema):
{ "behavior": "allow", "updatedInput": <original or modified input>, "updatedPermissions"? }or{ "behavior": "deny", "message": <string> }— with the legacy{ tool, result: { decision, source, … } }envelope alongside. - Native
AskUserQuestioncalls become structured Question records (questions[]parsed from the input) in the same inbox, bypassing the approval policy; the allow answer carriesupdatedInput { questions, answers, response? }. - A
suggestionsarray (SDKPermissionUpdate[]) is stored on the record; answering--allow --rememberechoes the localSettings-destination subset back asupdatedPermissions(pure echo — no kernel permission-rule engine). - Suspend mode on a native prompt-tool call answers
behavior: "deny"with an end-your-turn instruction, pauses the workflow, and the session later resumes with the answer as feedback (voluntary agent calls keep thependingpayload).
codex / gemini / opencode route approvals through their provider plugins'
request_approval wiring (kernel-mediated approvals landed on all five core
providers in the v0.6.0 line; codex is MCP-driven and gemini/opencode
ACP-driven since v0.6.9, and ACP carries a native permission-request
channel). Where a driver cannot intercept a tool call natively it falls back
to permission_mode mapping plus a system-prompt instruction block directing
the agent to call the two kernel tools. Claude remains the only provider with
the full SDK permission-prompt-tool conformance described above.
Operator inbox: animus agent interactions
animus agent interactions list # pending only
animus agent interactions list --all # include answered + expired
animus agent interactions list --agent swe # filter by requesting agent
animus agent interactions show <ID> # renders structured questions readably
animus agent interactions answer <ID> --text "use the copy table" # question
animus agent interactions answer <ID> --allow # approval
animus agent interactions answer <ID> --deny --message "too risky"
animus agent interactions answer <ID> --allow --remember # echo localSettings suggestions
animus agent interactions answer <ID> --allow --updated-input '{"command":"rm -rf build/sandbox"}'
animus agent interactions answer <ID> \
--select "Format=Summary" --select "2=Introduction,Conclusion" \
--text "keep it short" # structured (AskUserQuestion)
Answer flags: --text (question answer; on structured records it maps to the
single question's answer, or the freeform response on multi-question records
or when --select is given), --allow/--deny (exactly one, approvals),
--message, repeatable --select "<question text|header|1-based index>=<label[,label...]>"
(comma-separate labels or repeat for multi-select), --remember and
--updated-input <JSON> (require --allow), --by <NAME> (defaults to
human). All subcommands support --json (animus.cli.v1 envelope).
If a suspended workflow's resume spawn fails, the answer still succeeds and
the output carries a workflow_resume.guidance field with the exact
animus workflow resume --id <id> command. Two racing answers: first commit
wins, the second errors with a "not pending" message (e.g.
interaction '<id>' is not pending (status: answered)).
Management-gated MCP tools and identity pins
animus mcp serve --management registers two non-blocking inbox tools over
the same store (the default agent-injected server omits them so an agent can
never list or answer its own approvals — the gate stays human-only):
animus.interactions.list—all,agent_id,limit,project_root.animus.interactions.answer—id,text,decision(allow/deny),message,answers(keyed by exact question text; string or label array),response,updated_input,updated_permissions,remember,answered_by,project_root. Triggers the same suspended-workflow resume.
There is no animus.interactions.get tool; use list (or the CLI show).
Identity pins on the serving process:
animus mcp serve --agent-id <ID>(orANIMUS_MCP_AGENT_ID) makes the payloadagent_idignored, so an agent cannot claim a sibling profile with a looserapproval_policy. The ad-hocanimus agent run --agent/animus chat send --agentinjection path appends it automatically.animus mcp serve --workflow-id <ID>(orANIMUS_MCP_WORKFLOW_ID) binds escalations to that workflow and flips the default wait mode to suspend.- The two blocking tools accept no
project_rootoverride — they always operate on the server's own project scope.
Events, notifications, state
- Lifecycle events land in the daemon event log:
interaction_created,interaction_answered,interaction_expired— surfaced byanimus daemon events(each with a summary and a ready-to-runanswer_command), so no store polling is needed. - Installed notifier plugins (Slack / Telegram / HTTP) are pushed fresh escalations best-effort via the daemon's notifier dispatcher.
- Store: one JSON record per interaction under
~/.animus/<repo-scope>/interactions/(flock'd read-modify-write, atomic writes; survives daemon restarts).
Diagnosing a paused workflow
A workflow silently "stuck"? Check whether it is parked on an interaction:
animus agent interactions list # pending question/approval?
animus workflow list # suspended workflows show paused
animus subject get --kind task --id task:TASK-XXX # blocked_reason: "paused by workflow wf-..."
animus daemon events # interaction_created records
Answering the interaction auto-resumes the workflow when the daemon is up;
with no daemon the answer prints the animus workflow resume --id <id> command to
run. If the agent process died while blocked, the record stays pending and
answering warns it is a no-op.
Not the same as animus approval
animus approval {request, respond, outcome} is a separate surface gating
operator-initiated destructive git operations (e.g. animus git worktree prune requires an approved prune_worktrees record passed back via
--confirmation-id). Its records live in the project-local git-confirmations
store and never appear in the agent interactions inbox; agent escalations are
answered with animus agent interactions answer, not animus approval respond.
Related skills
- animus-agent-operations — running ad-hoc agents (
--approvals,--permission-modeflags). - animus-workflow-authoring — full agent-profile YAML, phase
runtime:blocks. - animus-mcp-tools — the rest of the
animus.*MCP tool surface.