iranti_attend
Check whether to inject stored memory before LLM responses and after tool calls to avoid redundant lookups and maintain conversation continuity.
Instructions
Ask Iranti whether memory should be injected before the next LLM turn. REQUIRED CALL SEQUENCE — follow this every turn, regardless of host:
Call with phase='pre-response' BEFORE replying to the user.
Call BEFORE any lookup tool (Read, Grep, Glob, Bash, WebSearch, WebFetch) where Iranti might already hold the answer. When you do, pass the pendingToolCall field so Iranti can derive entity hints from the tool target (file, URL, query) and preempt the lookup with stored facts.
If you just ran Edit/Write/Bash/WebSearch/WebFetch since your last iranti_write, call iranti_write FIRST — then attend.
Call with phase='post-response' AFTER every reply, without exception.
If the user is asking you to recall a remembered fact (preference, decision, blocker, next step, prior project detail), use this before answering instead of guessing or saying you do not know. Returns an injection decision plus any facts that should be added to context if relevant memory is missing. If no handshake has been performed yet for this agent in the current process, attend will auto-bootstrap the session first and report that in the result metadata. This is the minimum safe pre-reply call even when the host skipped handshake. Omitting currentContext falls back to the latest message only; pass the full visible context when available. For host compatibility, message is accepted as an alias for latestMessage. When phase='post-response', pass the assistant response so Iranti can persist strict continuity facts and shared checkpoint state before closing the turn.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| latestMessage | No | The full text of the latest user or assistant message — pass the complete response text, not a summary. When phase='post-response', this must be the full assistant response so Iranti can extract and persist durable facts (drafts, decisions, findings) from it. | |
| message | No | Alias for latestMessage, accepted for host compatibility. Must be the full message text, not a summary. | |
| currentContext | No | Current visible context window. | |
| entityHints | No | Optional entity hints in entityType/entityId format. | |
| maxFacts | No | Maximum facts to inject. | |
| forceInject | No | Force a memory injection decision. | |
| phase | No | Call phase: 'pre-response' before replying, 'post-response' after replying, 'mid-turn' for discovery-triggered re-attends within the same turn (e.g. after reading a new file or hitting a new entity). Mid-turn attends dedup facts already injected this turn, default to a smaller fact budget (3), and skip user-rule re-scans. | |
| pendingToolCall | No | Describe the read-only tool call the agent is about to make. Iranti derives entity hints from the tool target (file path, URL, query) and surfaces any stored facts BEFORE the tool runs, so you can preempt redundant Read/Grep/Bash/WebFetch/WebSearch calls with stored memory. The result includes a toolCallGuidance field summarising what was derived. | |
| toolResult | No | M2: pass the raw output of a read-only tool call the agent just completed (Read/Grep/Bash/WebFetch/WebSearch). Iranti auto-extracts durable facts from the output and writes them with source="attendant_autowrite" so the next session does not need to re-run the same tool call. All autowrites share an autowriteBatchId and can be reverted as a group via `iranti revert-autowrite`. The response includes a toolResultExtraction field summarising what was extracted and written. | |
| agent | No | Override the default agent id. | |
| agentId | No | Alias for agent. Override the default agent id. |