Examples
Implementation patterns developers can actually reuse
Examples should do more than demonstrate isolated API calls. They should show how the core libraries, agentic loop, gesture systems, and simulator fit together in ordinary software that teams can adapt for their own product.
What our examples should teach
Core library embedding
Examples that show how to host the reusable Rust surface inside your own app runtime without depending on the CLI or GUI as the architecture.
Agentic loop orchestration
Examples that focus on request handling, tool execution, iteration boundaries, approvals, and streaming state back to the host application.
Gesture and haptic events
Examples that normalize multimodal interaction into typed events that feed the same orchestration system as text, voice, and background tasks.
Simulator-first validation
Examples that can be learned and tested before hardware is required, so contributors can verify behavior early and iterate faster.
Reference example archetypes
Desktop agent host
A desktop application embedding the loop directly, exposing a curated tool surface, and streaming state back into the UI.
Primary focus: core facade, sessions, tool approvals, UI state
Backend orchestration service
A server-side worker that accepts requests, resolves workspace context, executes tools safely, and returns structured progress.
Primary focus: pipeline, tools, policy, persistence
Gesture-aware assistant
An app that combines text, voice, gestures, and haptic feedback into a single event-driven orchestration loop.
Primary focus: gesture normalization, intent mapping, feedback semantics
Protocol bridge
A transport or protocol adapter that exposes a carefully selected set of capabilities to external agents through MCP or similar boundaries.
Primary focus: protocol surface, resources, tools, permissions
Best rule for examples
Favor examples that explain composition and intent over examples that only prove one method call works. People adopt systems faster when they can see how the pieces fit.
A strong example should include
- • Explain where the loop is hosted and why that boundary was chosen.
- • Show what the stable library entry point is before diving into domain crates.
- • Make tool execution and policy checkpoints visible.
- • Include simulator-backed or hardware-free validation wherever possible.
- • Link to generated Rustdoc for the exact API contracts behind the pattern.
Suggested starter projects
- Loop-enabled desktop assistant: embed the orchestration loop, expose a few safe tools, and render iteration progress in the UI.
- Gesture-driven control layer: normalize gesture events, map them to intents, and return haptic confirmations.
- MCP capability bridge: expose a focused set of tools and resources to external agents through a protocol boundary.
- Simulator-backed integration test harness: validate event flows and feedback semantics before relying on hardware.
Open-source contribution direction
The best community examples will be the ones that reduce guesswork for the next contributor. Over time, this page should become a map of reusable patterns backed by code, simulator flows, and generated API docs, not just a gallery of isolated demos.
Browse GitHub organization