Skip to main content

Crate terraphim_agent_registry

Crate terraphim_agent_registry 

Source
Expand description

§Terraphim Agent Registry

Knowledge graph-based agent registry for intelligent agent discovery and capability matching.

This crate provides a sophisticated agent registry that leverages Terraphim’s knowledge graph infrastructure to enable intelligent agent discovery, capability matching, and role-based specialization. It integrates with the existing automata and role graph systems to provide context-aware agent management.

§Core Features

  • Knowledge Graph Integration: Uses existing extract_paragraphs_from_automata and is_all_terms_connected_by_path for intelligent agent discovery
  • Role-Based Specialization: Leverages terraphim_rolegraph for agent role management
  • Capability Matching: Semantic matching of agent capabilities to task requirements
  • Agent Metadata: Rich metadata storage with knowledge graph context
  • Dynamic Discovery: Real-time agent discovery based on evolving requirements
  • Performance Optimization: Efficient indexing and caching for fast lookups

Re-exports§

pub use capabilities::*;
pub use discovery::*;
pub use error::*;
pub use knowledge_graph::*;
pub use matching::*;
pub use metadata::*;
pub use registry::*;

Modules§

capabilities
Agent capability management and matching
capability
Capability-based routing types for unified LLM and Agent providers.
discovery
Agent discovery utilities and algorithms
error
Error types for the agent registry
knowledge_graph
Knowledge graph integration for agent registry
llm_usage
LLM usage tracking types for cost monitoring across providers.
matching
Knowledge graph-based agent matching and coordination
mcp_tool
MCP Tool types for indexing and discovery.
metadata
Agent metadata management with role integration
persona
Persona definition types for agent personas with SFIA skill framework support.
procedure
Procedure capture types for the learning system.
registry
Main agent registry implementation
review
Review finding types for multi-agent code review.
score
Scoring algorithms and query types for document relevance ranking. Scoring algorithms and query types for document relevance ranking.

Structs§

AgentCommunication
Communication between agents in a multi-agent context
AgentInfo
Information about an AI agent in a multi-agent context
AgentPid
Unique identifier for agents in the supervision system
AgentSpec
Agent specification for creating supervised agents
CapturedProcedure
A captured procedure with ordered steps and execution history.
CharacteristicDef
Definition of a core personality characteristic.
ChatMessage
A single message in a conversation, including metadata for cost tracking.
Concept
A concept is a higher-level, normalized term.
ContextHistory
Context history that tracks what context has been used across conversations
ContextHistoryEntry
Entry in context usage history
ContextItem
Context item that can be added to LLM conversations
Conversation
ConversationId
Unique identifier for conversations
ConversationSummary
Summary of a conversation for listing purposes
CoverageSignal
Coverage governance signal
Document
The central document type representing indexed and searchable content.
Edge
A directed relationship between two nodes in the knowledge graph.
ExtractedEntity
Extracted entity from text
ExtractedRelationship
Extracted relationship from text
GroundingMetadata
Grounding metadata for normalized terms (Dynamic Ontology)
Index
An index is a hashmap of documents
IndexedDocument
Reference to external storage of documents
KGIndexInfo
Knowledge Graph index information
KGTermDefinition
Knowledge Graph term definition with comprehensive metadata
LlmResult
The text content produced by an LLM call together with optional usage metadata.
LlmUsage
Token usage and cost data for a single LLM call.
MarkdownDirectives
Parsed directives extracted from the YAML front matter of a markdown KG entry.
McpToolEntry
Represents an indexed MCP tool from configured servers.
MessageId
Unique identifier for messages within conversations
ModelPricing
Per-model pricing configuration for cost estimation.
MultiAgentContext
Multi-agent context for coordinating between different AI agents
Node
A Node represents single concept and its connections to other concepts.
NormalizedTerm
A normalized term is a higher-level term that has been normalized
NormalizedTermValue
The value of a normalized term
OntologyAntiPattern
Anti-pattern definition for detection
OntologyEntityType
Entity type definition in an ontology schema
OntologyRelationshipType
Relationship type definition in an ontology schema
OntologySchema
Schema-first ontology definition
PatternMatch
Result of pattern matching with priority scoring
PersonaDefinition
A complete persona definition for an AI agent.
Priority
Priority level for routing rules and decisions Higher numeric values indicate higher priority A clamped priority value in the range 0–100 (higher = more urgent).
ProcedureConfidence
Confidence metrics for a procedure based on execution history.
ProcedureStep
A single step in a captured procedure.
ProcessId
Process ID for spawned agents
Provider
A provider that can fulfill capabilities
QualityScore
Quality scores for Knowledge/Learning/Synthesis (K/L/S) dimensions.
ReviewAgentOutput
Output schema for a single review agent’s results.
ReviewFinding
A single structured finding from a review agent.
RoleName
A role name with case-insensitive lookup support.
RouteDirective
Routing directive specifying which LLM provider and model to use.
RoutingDecision
Routing decision with priority information
RoutingRule
A routing rule with pattern matching and priority
SchemaSignal
Schema signal extracted from text
SearchQuery
A search query for finding documents in the knowledge graph.
SfiaSkillDef
SFIA skill definition.
SupervisorId
Unique identifier for supervisors
Thesaurus
A thesaurus is a dictionary with synonyms which map to upper-level concepts.

Enums§

Capability
A capability that a provider can fulfill
ContextType
Types of context that can be added to conversations
ContextUsageType
How a context item was used
CostLevel
Cost level for routing decisions
DocumentType
Classifies a document by its role in the knowledge graph.
FindingCategory
Category of a review finding (maps to review groups).
FindingSeverity
Severity level for a review finding.
KnowledgeGraphInputType
Defines all supported inputs for the knowledge graph.
Latency
Latency expectation for routing decisions
Layer
Layered output levels for search results.
LogicalOperator
Logical operators for combining multiple search terms
NormalizationMethod
Normalization method used for grounding
PersonaLoadError
Errors that can occur when loading a persona definition.
ProviderType
Type of provider (LLM or Agent)
RelevanceFunction
Defines the relevance function (scorer) to be used for ranking search results for the Role.
RestartStrategy
Restart strategies for handling agent failures
RotStatus
Health status of conversation context based on token budget utilization.
RoutingScenario
Routing scenario types

Functions§

deduplicate_findings
Deduplicate findings by keeping the most severe finding per (file, line, category) key.
extract_first_paragraph
Extract the first paragraph from document body text.

Type Aliases§

GenAgentResult
RegistryResult
Result type for agent registry operations