Module agents

Module agents 

Source
Expand description

Agent integration module for Sentinel proxy.

This module provides integration with external processing agents for WAF, auth, rate limiting, and custom logic. It implements the SPOE-inspired protocol with bounded behavior and failure isolation.

§Architecture

  • AgentManager: Coordinates all agents, handles routing to appropriate agents
  • Agent: Individual agent with connection, circuit breaker, and metrics
  • AgentConnectionPool: Connection pooling for efficient connection reuse
  • AgentDecision: Combined result from processing through agents
  • AgentCallContext: Request context passed to agents

§Example

use sentinel_proxy::agents::{AgentManager, AgentCallContext};

let manager = AgentManager::new(agent_configs, 1000).await?;
manager.initialize().await?;

let decision = manager.process_request_headers(&ctx, &headers, &["waf", "auth"]).await?;
if !decision.is_allow() {
    // Handle block/redirect/challenge
}

Structs§

Agent
Individual agent configuration and state.
AgentCallContext
Agent call context.
AgentConnectionPool
Agent connection pool for efficient connection reuse.
AgentDecision
Agent decision combining all agent responses.
AgentManager
Agent manager handling all external agents.
AgentMetrics
Agent metrics collector.

Enums§

AgentAction
Agent action types.