Demos / Select then ask · Relay
What’s wrong with this one?
Click a delayed shipment and ask "What’s wrong with this one?". The agent has no tools at all: it answers from what the page sends with your message, and a panel shows you exactly what that is.
The agent has no tools. Everything it knows about the console is a small record the page sends with each message.
What the page sends
Plain strings, rebuilt whenever the visitor clicks.
src/demos/relay/awareness.ts
return {
page: 'Relay dispatch console, today’s deliveries (demo, sample data)',
now: `Today ${NOW}`,
selectedShipment: selected ? shipmentDetail(selected) : NOTHING_SELECTED,
view: `${label}: ${rows.length} shipment${rows.length === 1 ? '' : 's'} on screen`,
rowsOnScreen: rows.map(rowLine).join(' | '),
}Hand it to the agent
No page tools, just the record.
src/demos/relay/index.tsx
const agent = useDemoElement({ handle: AGENT_HANDLE, situationalAwareness: record, onRuntimeEvent, loadSdk, fetchSession })Tell the agent what it means
The prompt names each key, and what "this one" refers to.
demos/relay/prompt/policy-rules.md
1. Answer only from the page's situational awareness. Never invent a shipment, scan, time, note or phone number that is not in it.
2. "This one", "it" and "this shipment" mean selectedShipment. If selectedShipment is "none", ask the visitor to click a shipment in the list, in one sentence, and say nothing else about shipments.An agent with nothing else
No functions, no widgets.
demos/relay/demo.json
"functions": [],
"widgets": []