Example conventions
Example conventions
Complete starting examples include imports and connector setup. Later snippets
extend that setup: agent, named connectors, application tools, trusted identity,
and storage objects must already exist where indicated. Host functions such as
promptUser, authorizeHostedTool, or saveDurableBatchHandle are integration
points, not library exports. Type/interface sketches show only the fields under
discussion; consult the generated reference for full public declarations.
Use import type for types and documented package subpaths for runtime/browser
adapters. Native responses use output_text; Agent Runtime results use
outputText. Always destroy agents/runtimes and close MCP/database/media resources.
Examples making actual model calls require provider credentials and may be billable.
Offline demonstrations are explicitly identified in the examples index.