Quickstart example
The smallest complete call sequence: one Bob → Alice turn, executed by the real kernel.
pnpm example:quickstart
{
visibleTools: [ 'files.search' ],
status: 'succeeded',
output: { fileResult: { hits: [Array] } }
}
Roughly 115 lines, and every line is one of the five things a turn needs:
- An
AccessContextbuilt from trusted state, carrying one grant. - A
ResourceProvider— here an in-memory stub standing in for storage. - An execution grant, because invoking Alice's agent is its own capability and a message addressed to her is not enough.
- An
AgentTurnDriver— here a scripted one, so the run is deterministic. SharedOSExecutor, which admits the turn, hands the driver a filtered catalog, and re-authorizes the exact file search before it runs.
visibleTools is the part worth reading twice. Twelve files tools are
registered; the grant covers search, so the driver is shown one. The other
eleven are not hidden from the model by instruction — they are absent from what
it was given.
The executor takes injected clock and createId functions here, which is how
a test or an evaluation harness makes a turn reproducible.
Next
examples/reference-hostreplaces the stubs with a real filesystem provider, durable SQLite stores, and a live model.examples/fleet-delegationshows the delegation rules in vocabulary that is not a document product.- The quickstart guide is the same material written against the published packages, with no clone required.