Skip to main content

Crate terraphim_multi_agent

Crate terraphim_multi_agent 

Source
Expand description

§Terraphim Multi-Agent System

A production-ready multi-agent system built on Terraphim’s role-based architecture with Rig framework integration for professional LLM management.

§Core Concepts

  • Role-as-Agent: Each Terraphim Role configuration becomes an autonomous agent
  • rust-genai Integration: Multi-provider LLM support with OpenRouter, Ollama, etc.
  • Knowledge Graph Intelligence: Agents use rolegraph/automata for capabilities
  • Individual Evolution: Each agent has own memory/tasks/lessons tracking
  • Multi-Agent Coordination: Discovery, communication, and collaboration

§Architecture

TerraphimAgent {
  Role Config + Rig Agent + Knowledge Graph + Individual Evolution
}

KnowledgeGraphAgentRegistry (from terraphim_agent_registry) {
  Discovery + Capability Mapping + Load Balancing + Task Routing
}

Multi-Agent Workflows {
  Role Chaining + Role Routing + Role Parallelization + Lead-Specialist + Review-Optimize
}

Re-exports§

pub use agent::*;
pub use agents::*;
pub use context::*;
pub use error::*;
pub use genai_llm_client::*;
pub use history::*;
pub use llm_types::*;
pub use prompt_sanitizer::*;
pub use pool::*;
pub use pool_manager::*;
pub use tracking::*;
pub use workflows::*;

Modules§

agent
Core TerraphimAgent implementation
agents
Specialized Agent Implementations
context
Context management for agents
error
Error types for the multi-agent system
genai_llm_client
Rust-GenAI LLM Client - Unified Multi-Provider Implementation
history
Command and interaction history for agents
llm_types
LLM Types and Request/Response Structures
pool
Agent pooling system for performance optimization
pool_manager
Pool manager for coordinating multiple agent pools
prompt_sanitizer
test_utils
tracking
Token usage and cost tracking for agents
vm_execution
workflows
Workflows module

Structs§

AgentCapability
Agent capability definition
AgentDiscoveryQuery
Agent discovery query
AgentDiscoveryResult
Agent discovery result
AgentMetadata
Comprehensive agent metadata
AgentPid
Unique identifier for agents in the supervision system
AgentRole
Agent role definition integrating with terraphim_rolegraph
CapabilityMetrics
Performance metrics for capabilities
KnowledgeGraphIntegration
Knowledge graph-based agent discovery and matching
RegistryBuilder
Registry builder for easy configuration
RegistryConfig
Registry configuration
RegistryStatistics
Registry statistics
SimilarityThresholds
Similarity thresholds for different types of matching
SupervisorId
Unique identifier for supervisors

Enums§

AgentStatus
Agent status information
RegistryError
Errors that can occur in the agent registry

Traits§

KnowledgeGraphAgentRegistry
Agent registry trait for different implementations

Type Aliases§

AgentId
Agent identifier type
MultiAgentResult
Result type for multi-agent operations
RegistryResult
Result type for agent registry operations