Skip to main content

Module decider

Module decider 

Source
Expand description

Decider: Agent decision-making layer for ryo

This module provides the abstraction for agents to make decisions about what action to take next, based on context and world state.

§Architecture

┌─────────────────────────────────────────────────────────────┐
│  Agent Mode                                                 │
├─────────────────────────────────────────────────────────────┤
│  Plain Mode      │ Just execute the given operation        │
│  Agentic Mode    │ Autonomous decision-making via Decider  │
└─────────────────────────────────────────────────────────────┘

┌─────────────────────────────────────────────────────────────┐
│  Decider Implementations                                    │
├─────────────────────────────────────────────────────────────┤
│  PlainDecider        │ μs   │ Pass-through (no decision)   │
│  KeywordDecider      │ μs   │ Keyword matching             │
│  ParameterizedDecider│ μs   │ WorldState-based decisions   │
│  MurmurationDecider  │ μs   │ Swarm-like collision avoid   │
└─────────────────────────────────────────────────────────────┘

§Usage

use ryo_executor::decider::{AgentMode, DeciderConfig, KeywordDecider};

// Plain mode - just execute operations
let config = DeciderConfig::plain();

// Agentic mode - autonomous decision-making
let config = DeciderConfig::agentic(Box::new(KeywordDecider::default()));

Structs§

Action
An action that an agent can take
ActionResult
Result of executing an action
AgentState
State of the agent’s world
ComposableDecider
ComposableDecider: Combines a base decider with modifiers
DeciderConfig
Configuration for agent decision-making
DecisionContext
Context for making a decision
ErrorAwareModifier
ErrorAwareModifier: Prioritizes files with errors
ErrorInfo
Error information
FileState
State of a single file
MurmurationDecider
MurmurationDecider: Swarm behavior for parallel agents
ParameterizedDecider
ParameterizedDecider: Makes decisions based on current state
PlainDecider
PlainDecider: Just returns the next work item as a read action
RetryModifier
RetryModifier: Retries on failure with backoff
StallDetectionModifier
StallDetectionModifier: Escalates when progress stalls
SuccessRateModifier
SuccessRateModifier: Escalates on low success rate

Enums§

ActionKind
The kind of action
AgentMode
Agent execution mode

Traits§

Decider
Trait for decision-making strategies
DecisionModifier
Trait for modifying decisions based on conditions