Guide an Agent
Guide page — how to use this step in your SDK or loop. For the HTTP endpoint parameters, see POST /v1/guide. For the product concept, see Execution Memory.
guide compiles governed context for the next Agent turn. It is where Aionis
decides what can be used now, what needs inspection, what should be avoided, and
what can be rehydrated when detail is needed.
SDK Example
import { agentPromptFromGuide } from "@aionis/sdk";
const guide = await aionis.execution.guideForRole({
agent_id: "worker-2",
team_id: "checkout-team",
role: "worker",
run_id: "run-002",
task_signature: "checkout-migration",
query_text: "Continue from the latest accepted checkout route.",
context_mode: "compact_agent",
guide: {
task_context_profile: "multi_agent_handoff",
},
});
await agent.run(agentPromptFromGuide(guide));Agent Context Surfaces
| Surface | Meaning |
|---|---|
use_now | Current, trusted enough for direct Agent use. |
inspect_before_use | Relevant but risky, contested, stale, or incomplete. |
do_not_use | Failed, suppressed, or unsafe as a route. |
rehydrate | Pointer to raw evidence that can expand on demand. |
Execution Memory renders these surfaces as a contract. That keeps risky or invalidated history visible without turning it into direct instruction.
Task Context Profile
When the host knows what kind of work the Agent is doing, pass
task_context_profile with the guide request. The profile changes how the
Agent-facing context is phrased, while the same Runtime governance still decides
use_now, inspect_before_use, do_not_use, and rehydrate.
const guide = await aionis.guide({
query_text: "Answer from the retained source evidence.",
mode: "full_power",
context_mode: "compact_agent",
task_context_profile: "long_qa",
consumer_agent_id: "qa-agent",
run_id: "run-qa-001",
});Common profiles:
| Profile | Use when |
|---|---|
coding_verifier | Coding tasks with tests, builds, validators, or acceptance checks. |
long_qa | Source-grounded long-memory question answering. |
multi_agent_handoff | Planner, worker, verifier, reviewer, or team handoff. |
loop_engineering | Plan, act, validate, repair loops. |
document_integrity | File movement, extraction, migration, archive, or document identity work. |
Full guide: Task Context Profiles.