Package 'rho.agent'

Title: Rho Async Agent Core
Description: Implements the asynchronous multi-turn agent loop over the Rho AI protocol, including ordered lifecycle events, steering and follow-up queues, cancellation, and typed scheduling of concurrent tool calls.
Authors: Sounkou Mahamane Toure [aut, cre]
Maintainer: Sounkou Mahamane Toure <[email protected]>
License: MIT + file LICENSE
Version: 0.0.1.9000
Built: 2026-07-15 18:49:46 UTC
Source: https://github.com/sounkou-bioinfo/Rho

Help Index


Agent state machine, policy, scheduling, and lifecycle events

Description

rho_prompt() and rho_continue() return tasks. The agent consumes typed assistant events, schedules tool tasks, preserves source-order results, and emits typed lifecycle events. Steering and follow-up queues have separate, typed draining policies.

Details

Policy and scheduling decisions are S7 generics. Packages can specialize context transformation, before/after-tool behavior, next-turn preparation, assistant event reduction, queue draining, and tool batch execution without replacing the core loop.


Session context and compaction contracts

Description

The session transcript is append-only. Message entries retain the complete interaction, while rho_build_agent_context() projects the active provider context through the latest compaction entry and any explicit exclusions.

Details

rho_compact() prepares a stable cut point, runs an asynchronous compactor, appends a semantic checkpoint, and invokes before/after policy methods. Automatic threshold compaction and one bounded provider-input recovery use the same protocol. Applications can supply another RhoCompactor class or specialize the public generics without replacing the agent loop.