Skip to content

Integration crates

Steven Enamakel edited this page Oct 3, 2026 · 4 revisions

Integration crates

The host can use routing, completion, and tool handling separately. The crate dependency map shows the direct Cargo edges.

Route a message

tinyhivemind_core::embed defines host-neutral ConversationKind and ConversationRef values. Its Router port supplies an evaluation; route_message and route_broadcast apply eligibility, escalation, and fallback rules. The model cannot add a member or exceed the configured width. A host keeps its own agent handles. When it runs a completion episode, BoundHive in the driver binds those handles to the desk.

tinyhivemind_core::typesafe provides JevRouter for that routing port. It builds Choice and Noul questions, turns System One answers into fixed-point probabilities, and waits through SystemOneTransport. The host supplies the transport, credentials, and retries. These routing modules can be used without a completion episode.

Run a completion episode

tinyhivemind_core::driver validates a desk and its bound handles through HiveGraph and BoundHive. CompletionDriver turns committed events into caller-owned DriverState. Conductor adds conversations, notices, and turn limits. It proposes rows and turns; the host appends rows and reports their sequences back.

tinyhivemind-tools renders tinytools::ToolSpec definitions for episode tools and validates their calls through EpisodeTools. The host gives these definitions to its native tool interface, then drains the accepted call records into the driver. The retired tinyhivemind-mcp crate used to serve the same record over a loopback socket. See ADR 0027. This removal concerns TinyHiveMind's adapter. A consuming application may still run its own MCP server for unrelated tools.

tinyhivemind-openhuman connects the driver and tools to OpenHuman seats. HostedRunner uses agents the host builds through EpisodeHost; EmbedRunner uses openhuman-embed agents with native tools. Both implement SeatRunner. run_episode and resume_episode step over a host-owned Journal. The host owns the executor, transcript, durable appends, and saved conductor state. The OpenHuman example also uses OpenHuman's AgentRegistryEntry, which is separate from the retired AgentRegistry.

See the OpenHuman crate README and standalone example for the runner setup.

Clone this wiki locally