aof_core/
lib.rs

1// AOF Core - Foundation types and traits for the Agentic Ops Framework
2//
3// This crate provides zero-cost abstractions for building high-performance
4// agentic systems targeting DevOps and SRE workflows.
5
6pub mod activity;
7pub mod agent;
8pub mod agentflow;
9pub mod binding;
10pub mod context;
11pub mod error;
12pub mod error_tracker;
13pub mod fleet;
14pub mod mcp;
15pub mod memory;
16pub mod model;
17pub mod registry;
18pub mod schema;
19pub mod tool;
20pub mod trigger;
21pub mod workflow;
22
23// Re-export core types
24pub use agent::{
25    Agent, AgentConfig, AgentContext, AgentMetadata, ExecutionMetadata, HttpToolConfig,
26    MemorySpec, Message, MessageRole, OutputSchemaSpec, QualifiedToolSpec, ShellToolConfig,
27    StructuredMemoryConfig, ToolResult as AgentToolResult, ToolSource, ToolSpec, TypeBasedToolSpec,
28    TypeBasedToolType,
29};
30pub use error::{AofError, AofResult};
31pub use error_tracker::{ErrorKnowledgeBase, ErrorRecord, ErrorStats};
32pub use mcp::{McpServerConfig, McpTransport};
33pub use memory::{Memory, MemoryBackend, MemoryEntry, MemoryQuery};
34pub use model::{
35    Model, ModelConfig, ModelProvider, ModelRequest, ModelResponse, RequestMessage, StopReason,
36    StreamChunk, ToolDefinition as ModelToolDefinition, Usage,
37};
38pub use schema::{FormatHint, InputSchema, OutputSchema};
39pub use tool::{
40    Tool, ToolCall, ToolConfig, ToolDefinition, ToolExecutor, ToolInput, ToolResult, ToolType,
41};
42pub use workflow::{
43    BackoffStrategy, CheckpointBackend, CheckpointConfig, CheckpointFrequency, ConditionalNext,
44    FlatWorkflowConfig, InterruptConfig, InterruptType, JoinConfig, JoinStrategy, NextStep,
45    ParallelBranch, RecoveryConfig, ReducerType, RetryConfig, StateReducer, StateSchema, StepConfig,
46    StepResult, StepStatus, StepType, TerminalStatus, ValidatorType, Workflow, WorkflowConfigInput,
47    WorkflowError, WorkflowMetadata, WorkflowSpec, WorkflowState, WorkflowStatus, WorkflowStep,
48};
49pub use fleet::{
50    AgentFleet, AgentInstanceState, AgentInstanceStatus, AgentRole, CoordinationConfig,
51    CoordinationMode, ConsensusConfig, ConsensusAlgorithm, DeepConfig, FinalAggregation, FleetAgent,
52    FleetAgentSpec, FleetMetadata, FleetMetrics, FleetSpec, FleetState, FleetStatus, FleetTask,
53    FleetTaskStatus, SharedResources, SharedMemoryConfig, SharedMemoryType, CommunicationConfig,
54    MessagePattern, TaskDistribution, ScalingConfig, TieredConfig,
55};
56pub use agentflow::{
57    AgentFlow, AgentFlowMetadata, AgentFlowSpec, AgentFlowState, FlowConfig, FlowConnection,
58    FlowContext, FlowError, FlowExecutionStatus, FlowNode, FlowRetryConfig, InlineAgentConfig,
59    NodeCondition, NodeConfig, NodeExecutionStatus, NodeResult, NodeType, ScriptConfig,
60    ScriptOutputParse,
61};
62pub use binding::{
63    BindingMatch, FlowBinding, FlowBindingMetadata, FlowBindingSpec, ResolvedBinding,
64};
65pub use context::{
66    ApprovalConfig, AuditConfig, AuditEvent, Context, ContextMetadata, ContextSpec,
67    LimitsConfig, SecretRef,
68};
69pub use registry::{
70    AgentRegistry, BindingRegistry, ContextRegistry, FlowRegistry, Registry,
71    ResourceManager, TriggerRegistry,
72};
73pub use trigger::{
74    CommandBinding, StandaloneTriggerConfig, StandaloneTriggerType, Trigger, TriggerMetadata,
75    TriggerSpec,
76};
77pub use activity::{
78    ActivityDetails, ActivityEvent, ActivityLogger, ActivityType, NoopActivityLogger, TokenCount,
79};
80
81/// Version information
82pub const VERSION: &str = env!("CARGO_PKG_VERSION");
83
84/// Default context window size (tokens)
85pub const DEFAULT_CONTEXT_WINDOW: usize = 100_000;
86
87/// Maximum parallel tool calls
88pub const MAX_PARALLEL_TOOLS: usize = 10;