sayr_engine/
lib.rs

1//! Rust-flavored building blocks for running AGNO-style agents.
2//!
3//! The crate provides a minimal runtime with:
4//! - A language model abstraction (`LanguageModel`).
5//! - A simple tool interface (`Tool` and `ToolRegistry`).
6//! - An `Agent` that loops between the model and tools using structured JSON directives.
7
8mod agent;
9mod config;
10mod deployment;
11mod error;
12mod governance;
13pub mod guardrails;
14mod hooks;
15mod knowledge;
16mod llm;
17pub mod mcp;
18mod memory;
19mod message;
20mod metrics;
21pub mod reasoning;
22mod server;
23mod storage;
24mod team;
25mod telemetry;
26mod tool;
27mod toolkit;
28pub mod tools;
29mod workflow;
30
31
32pub use agent::{Agent, AgentDirective};
33pub use config::{
34    AppConfig, DeploymentConfig, ModelConfig, ProviderConfig, SecurityConfig, ServerConfig,
35    TelemetryConfig,
36};
37pub use deployment::DeploymentPlan;
38pub use error::{AgnoError, Result};
39pub use governance::{AccessController, Action, Principal, PrivacyRule, Role as GovernanceRole};
40pub use hooks::{AgentHook, ConfirmationHandler};
41pub use knowledge::{
42    Document, DocumentChunker, Embedder, InMemoryVectorStore, KnowledgeBase, OpenAiEmbedder,
43    OpenAiEmbeddingClient, PgVectorClient, PgVectorStore, QdrantClient, QdrantStore,
44    RetrievalConfig, RetrievalEvaluation, RetrievalOverrides, Retriever, ScoredDocument,
45    SearchParams, SimilarityMetric, SlidingWindowChunker, TransformerClient, TransformerEmbedder,
46    VectorStore, WhitespaceEmbedder,
47};
48pub use llm::{
49    AwsBedrockClient, AzureOpenAIClient, CohereClient, FireworksClient, GroqClient, LanguageModel,
50    MistralClient, ModelCompletion, OllamaClient, OpenAIClient, StubModel, TogetherClient,
51};
52pub use memory::{
53    ConversationMemory, FullMemoryStrategy, MemoryStrategy, PersistentConversationMemory,
54    SummarizedMemoryStrategy, TokenLimitedMemoryStrategy, WindowedMemoryStrategy,
55};
56
57pub use message::{Attachment, AttachmentKind, Message, Role, ToolCall, ToolResult};
58pub use metrics::{EvaluationReport, MetricsTracker};
59pub use server::AgentRuntime;
60pub use storage::{ConversationStore, FileConversationStore, SqlConversationStore};
61pub use team::{Team, TeamEvent};
62pub use telemetry::{
63    current_span_attributes, flush_tracer, init_tracing, span_with_labels, FallbackChain,
64    RetryPolicy, TelemetryCollector, TelemetryLabels, TelemetrySink,
65};
66pub use tool::{Tool, ToolDescription, ToolRegistry};
67pub use toolkit::basic_toolkit;
68pub use workflow::{
69    AgentTask, FunctionTask, Workflow, WorkflowContext, WorkflowNode, WorkflowTask,
70};