Preview what an agent's model would receive
GET /Platform/lab/render-context
Preview what an agent's model would receive.
Free: no turn, no model call, no writes. Assembles the agent's view
tree exactly as a turn does
(Agent.build_context_view: the Agent's own view including
system_prompt, attached workflows with their answered
decisions, documents, integrations), each block with the
[EntityType:id] header it is placed under, plus the tool surface
the graph yields after effective_tool_access and the agent's
readiness(). Read-only and repeatable, so it is the instrument for
configuration work: run it after every assembly step (attach a
workflow copy, answer a decision, edit the Document) and diff the
output. Rendered through a touchpoint, the blocks are those of a
turn on that touchpoint's channel, its response structure and
channel style included; without one, a turn's llm-data is needed
to confirm those blocks. The time injection a live conversation adds
on top is never rendered.
Two things a config-only reading cannot show and this route does:
collected_tools is what the agent's entity graph ACTUALLY yields
(an unattached integration or a dead tool name silently drops
tools), and filter_patterns_matching_nothing names the explicitly
allowed tools with no backing tool.
Query parameters
agent_id: str. Agent to render (must belong to your org).branch: optional str. Branch whose entity state to render (default: your configured branch; name the feature branch under edit).include_text: optional bool. Include each block's rendered markdown (default true). False returns only headers/sizes for a quick diff.render: optional bool. Also returnrendered— all blocks concatenated in placement order, i.e. the system context as one string.touchpoint: optional str. Render the agent as reached through this touchpoint, as<Type>:<id>(for example the organization's browser extension:BrowserExtension:<id>, the id from a query such asBrowserExtension | select id). The touchpoint's own context, the channel's prompt blocks (as an email to an inbox, a web chat to a chat flow; a voice render has no live call's tools), the tools the agent may use there (an inbox's reply among them) and the line it adds to each turn (turn_notes) are included. It must route to the agent. An intake hook is named by its slug (IntakeHook:sh_..., its id) and routes to the agent itscrmaction runs.
Returns
RenderContextResponse
agent_id: str. Agent rendered.agent_name: optional str or null. Its name.branch: str. Branch whose entity state was rendered.touchpoint: optional str or null. The touchpoint the agent was rendered as reached through (<Type>:<id>), when one was given.blocks: optional List[RenderedContextBlock]. View blocks in placement order.total_chars: optional int. Characters across all blocks.effective_tool_access: optional List[EntityTools]. The agent's tool_access merged with attached workflows' grants, one entry per entity class (allow null = every tool on the class).collected_tools: optional List[str]. Qualified Class.method names the agent's entity graph actually yields after the filter — what the model would be handed as tools (session-transient tools such as Call.transfer_call are added by the channel and are not included).turn_notes: optional List[str]. Lines the touchpoint adds to each turn beside the newest message, outside the cached prompt (through the browser extension: whether your browser tab is connected). Empty without a touchpoint.content_tools: optional Dict[str, List[str]]. Per channel (voice,webchat), the content tools the turn offers on top of the collected tools: how the agent speaks or replies, andpresent_ui(pages in chat) where the organization turned it on. Absent on a channel = none.filter_patterns_matching_nothing: optional List[str]. Class.method names explicitly allowed by tool_access that matched no collected tool — a dead name or an unattached integration.session_only_patterns: optional List[str]. Explicitly allowed Class.method names on session types (Call, Conversation, Agent, touchpoints) that only exist once a conversation arrives; absent from a dry run by design, so not counted as dead.readiness: optional AgentReadiness or null. What is still missing before the agent can run its workflows.readiness_failure: optional str or null. Why readiness could not be computed, when it failed.rendered: optional str or null. All blocks concatenated in placement order (render=true).
Example request
curl -X GET "https://api.hilus.ai/Platform/lab/render-context" \
-H "Authorization: Bearer $HILUS_API_KEY"