Skip to main content

Crate praisonai

Crate praisonai 

Source
Expand description

PraisonAI Core - High-performance, agentic AI framework for Rust

This crate provides the core functionality for building AI agents and multi-agent workflows.

§Quick Start

use praisonai::{Agent, tool};

#[tool(description = "Search the web")]
async fn search(query: String) -> String {
    format!("Results for: {}", query)
}

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let agent = Agent::new()
        .instructions("You are a helpful assistant")
        .build();
     
    let response = agent.chat("Hello!").await?;
    println!("{}", response);
    Ok(())
}

§Architecture

PraisonAI follows an agent-centric design with these core components:

  • Agent: The core execution unit that processes prompts and uses tools
  • Tool: Functions that agents can call to perform actions
  • AgentTeam: Coordinates multiple agents for complex workflows
  • AgentFlow: Defines workflow patterns (sequential, parallel, etc.)
  • Memory: Persists conversation history and context

§Design Principles

  • Agent-Centric: Every design decision centers on Agents
  • Protocol-Driven: Traits define contracts, implementations are pluggable
  • Minimal API: Fewer parameters, sensible defaults
  • Performance-First: Lazy loading, optional dependencies
  • Async-Safe: All I/O operations are async

Re-exports§

pub use agent::Agent;
pub use agent::AgentBuilder;
pub use agent::AgentConfig;
pub use config::AutonomyConfig;
pub use config::AutonomyLevel;
pub use config::CachingConfig;
pub use config::ChunkingStrategy;
pub use config::ExecutionConfig;
pub use config::GuardrailAction;
pub use config::GuardrailConfig;
pub use config::GuardrailResult;
pub use config::HooksConfig;
pub use config::KnowledgeConfig;
pub use config::MemoryConfig;
pub use config::MultiAgentExecutionConfig;
pub use config::MultiAgentHooksConfig;
pub use config::MultiAgentMemoryConfig;
pub use config::MultiAgentOutputConfig;
pub use config::MultiAgentPlanningConfig;
pub use config::OutputConfig;
pub use config::PlanningConfig;
pub use config::ReflectionConfig;
pub use config::SkillsConfig;
pub use config::TemplateConfig;
pub use config::WebConfig;
pub use config::WebSearchProvider;
pub use error::Error;
pub use error::Result;
pub use hooks::HookDecision;
pub use hooks::HookEvent;
pub use hooks::HookInput;
pub use hooks::HookRegistry;
pub use hooks::HookResult;
pub use hooks::HookRunner;
pub use llm::LlmConfig;
pub use llm::LlmProvider;
pub use llm::LlmResponse;
pub use llm::Message;
pub use llm::MockLlmProvider;
pub use llm::Role;
pub use llm::ToolCall;
pub use llm::Usage;
pub use memory::ConversationHistory;
pub use memory::Memory;
pub use memory::MemoryAdapter;
pub use session::FileSessionStore;
pub use session::InMemorySessionStore;
pub use session::Session;
pub use session::SessionData;
pub use session::SessionInfo;
pub use session::SessionMessage;
pub use session::SessionStore;
pub use task::OnError;
pub use task::Task;
pub use task::TaskBuilder;
pub use task::TaskConfig;
pub use task::TaskOutput;
pub use task::TaskStatus;
pub use task::TaskType;
pub use tools::Tool;
pub use tools::ToolRegistry;
pub use tools::ToolResult;
pub use workflows::AgentFlow;
pub use workflows::AgentTeam;
pub use workflows::Loop;
pub use workflows::Parallel;
pub use workflows::Process;
pub use workflows::Repeat;
pub use workflows::Route;
pub use workflows::StepResult;
pub use workflows::WorkflowContext;
pub use handoff::ContextPolicy;
pub use handoff::Handoff;
pub use handoff::HandoffChain;
pub use handoff::HandoffConfig;
pub use handoff::HandoffFilters;
pub use handoff::HandoffInputData;
pub use handoff::HandoffResult;
pub use context::BudgetAllocation;
pub use context::ContextBudgeter;
pub use context::ContextConfig;
pub use context::ContextLedger;
pub use context::ContextManager;
pub use context::ContextSegment;
pub use context::MultiAgentContextManager;
pub use context::OptimizerStrategy;
pub use plugins::FunctionPlugin;
pub use plugins::Plugin;
pub use plugins::PluginHook;
pub use plugins::PluginInfo;
pub use plugins::PluginManager;
pub use plugins::PluginType;
pub use bus::Event;
pub use bus::EventBus;
pub use bus::EventType;
pub use agents::AudioAgent;
pub use agents::AudioAgentBuilder;
pub use agents::AudioConfig;
pub use agents::CodeAgent;
pub use agents::CodeAgentBuilder;
pub use agents::CodeConfig;
pub use agents::CodeExecutionResult;
pub use agents::DeepResearchAgent;
pub use agents::DeepResearchAgentBuilder;
pub use agents::DeepResearchConfig;
pub use agents::DeepResearchResult;
pub use agents::ImageAgent;
pub use agents::ImageAgentBuilder;
pub use agents::ImageConfig;
pub use agents::ImageResult;
pub use agents::OCRAgent;
pub use agents::OCRAgentBuilder;
pub use agents::OCRConfig;
pub use agents::OCRPage;
pub use agents::OCRResult;
pub use agents::RealtimeAgent;
pub use agents::RealtimeAgentBuilder;
pub use agents::RealtimeConfig;
pub use agents::ResearchCitation;
pub use agents::VideoAgent;
pub use agents::VideoAgentBuilder;
pub use agents::VideoConfig;
pub use agents::VideoResult;
pub use agents::VideoStatus;
pub use agents::VisionAgent;
pub use agents::VisionAgentBuilder;
pub use agents::VisionConfig;
pub use rag::build_context;
pub use rag::deduplicate_chunks;
pub use rag::estimate_tokens;
pub use rag::get_model_context_window;
pub use rag::truncate_context;
pub use rag::Citation;
pub use rag::CitationsMode;
pub use rag::ContextChunk;
pub use rag::ContextPack;
pub use rag::RAGBuilder;
pub use rag::RAGConfig;
pub use rag::RAGResult;
pub use rag::RetrievalConfig;
pub use rag::RetrievalResult;
pub use rag::RetrievalStrategy;
pub use rag::TokenBudget;
pub use rag::RAG;
pub use mcp::ConnectionStatus;
pub use mcp::MCPBuilder;
pub use mcp::MCPCall;
pub use mcp::MCPCallResult;
pub use mcp::MCPConfig;
pub use mcp::MCPContent;
pub use mcp::MCPPrompt;
pub use mcp::MCPResource;
pub use mcp::MCPServer;
pub use mcp::MCPTool;
pub use mcp::SecurityConfig;
pub use mcp::TransportConfig;
pub use mcp::TransportType;
pub use mcp::MCP;
pub use protocols::AgentMetrics;
pub use protocols::AgentOSConfig;
pub use protocols::AgentOSProtocol;
pub use protocols::AgentProtocol;
pub use protocols::BotAction;
pub use protocols::BotAttachment;
pub use protocols::BotMessage;
pub use protocols::BotProtocol;
pub use protocols::BotResponse;
pub use protocols::LlmMessage;
pub use protocols::LlmProtocol;
pub use protocols::LlmResponse as ProtocolLlmResponse;
pub use protocols::MemoryMessage;
pub use protocols::MemoryProtocol;
pub use protocols::RunnableAgentProtocol;
pub use protocols::TokenUsage;
pub use protocols::ToolCall as ProtocolToolCall;
pub use protocols::ToolProtocol;
pub use protocols::ToolSchema;
pub use knowledge::AddResult as KnowledgeAddResult;
pub use knowledge::Chunking;
pub use knowledge::ChunkingConfig;
pub use knowledge::ChunkingStrategy as KnowledgeChunkingStrategy;
pub use knowledge::Document;
pub use knowledge::IndexStats;
pub use knowledge::IndexType;
pub use knowledge::InMemoryVectorStore;
pub use knowledge::Knowledge;
pub use knowledge::KnowledgeBackendError;
pub use knowledge::KnowledgeBuilder;
pub use knowledge::KnowledgeConfig as KnowledgeModuleConfig;
pub use knowledge::KnowledgeStoreProtocol;
pub use knowledge::QueryMode;
pub use knowledge::QueryResult;
pub use knowledge::RerankerProtocol;
pub use knowledge::RerankResult;
pub use knowledge::RetrievalResult as KnowledgeRetrievalResult;
pub use knowledge::RetrievalStrategy as KnowledgeRetrievalStrategy;
pub use knowledge::RetrieverProtocol;
pub use knowledge::ScopeRequiredError;
pub use knowledge::SearchResult;
pub use knowledge::SearchResultItem;
pub use knowledge::SimpleReranker;
pub use knowledge::VectorRecord;
pub use knowledge::VectorStoreProtocol;
pub use streaming::AsyncStreamCallback;
pub use streaming::StreamCallback;
pub use streaming::StreamCollector;
pub use streaming::StreamEvent;
pub use streaming::StreamEventType;
pub use streaming::StreamHandler;
pub use streaming::StreamMetrics;
pub use streaming::ToolCallData;
pub use guardrails::AsyncGuardrail;
pub use guardrails::BlocklistGuardrail;
pub use guardrails::FunctionGuardrail;
pub use guardrails::Guardrail;
pub use guardrails::GuardrailAction as GuardrailsAction;
pub use guardrails::GuardrailChain;
pub use guardrails::GuardrailConfig as GuardrailsConfig;
pub use guardrails::GuardrailResult as GuardrailsResult;
pub use guardrails::LengthGuardrail;
pub use guardrails::PatternGuardrail;
pub use thinking::BudgetLevel;
pub use thinking::ThinkingBudget;
pub use thinking::ThinkingBudgetBuilder;
pub use thinking::ThinkingConfig;
pub use thinking::ThinkingTracker;
pub use thinking::ThinkingUsage;
pub use skills::format_skill_for_prompt;
pub use skills::generate_skills_xml;
pub use skills::ParseError;
pub use skills::SkillLoader;
pub use skills::SkillManager;
pub use skills::SkillMetadata;
pub use skills::SkillProperties;
pub use skills::ValidationError;
pub use planning::is_read_only_tool;
pub use planning::is_research_tool;
pub use planning::is_restricted_tool;
pub use planning::Plan;
pub use planning::PlanStep;
pub use planning::PlanStorage;
pub use planning::StepStatus;
pub use planning::TodoItem;
pub use planning::TodoList;
pub use planning::TodoPriority;
pub use planning::READ_ONLY_TOOLS;
pub use planning::RESEARCH_TOOLS;
pub use planning::RESTRICTED_TOOLS;
pub use eval::AccuracyEvaluator;
pub use eval::AccuracyEvaluatorBuilder;
pub use eval::AccuracyResult;
pub use eval::CriteriaEvaluator;
pub use eval::CriteriaEvaluatorBuilder;
pub use eval::CriteriaResult;
pub use eval::CriteriaScore;
pub use eval::EvaluationScore;
pub use eval::EvaluatorConfig;
pub use eval::Judge;
pub use eval::JudgeConfig;
pub use eval::JudgeResult;
pub use eval::PerformanceEvaluator;
pub use eval::PerformanceEvaluatorBuilder;
pub use eval::PerformanceMetrics;
pub use eval::PerformanceResult;
pub use eval::ReliabilityEvaluator;
pub use eval::ReliabilityEvaluatorBuilder;
pub use eval::ReliabilityResult;
pub use eval::ToolCallResult as EvalToolCallResult;
pub use telemetry::get_collector;
pub use telemetry::get_monitor;
pub use telemetry::get_performance_report;
pub use telemetry::record_event;
pub use telemetry::track_api;
pub use telemetry::track_function;
pub use telemetry::ApiStats;
pub use telemetry::FunctionStats;
pub use telemetry::PerformanceMonitor;
pub use telemetry::PerformanceReport;
pub use telemetry::TelemetryCollector;
pub use telemetry::TelemetryEvent;
pub use telemetry::TelemetryEventType;
pub use policy::credit_card_rule;
pub use policy::email_rule;
pub use policy::phone_rule;
pub use policy::profanity_rule;
pub use policy::ssn_rule;
pub use policy::PolicyAction;
pub use policy::PolicyEngine;
pub use policy::PolicyResult;
pub use policy::PolicyRule;
pub use trace::ConsoleExporter;
pub use trace::ContextEvent;
pub use trace::ContextEventType;
pub use trace::ContextListSink;
pub use trace::ContextNoOpSink;
pub use trace::ContextTraceEmitter;
pub use trace::ContextTraceSinkProtocol;
pub use trace::JsonFileExporter;
pub use trace::Span;
pub use trace::SpanEvent;
pub use trace::SpanKind;
pub use trace::SpanStatus;
pub use trace::TraceContext;
pub use trace::TraceExporter;
pub use trace::Tracer;
pub use embedding::cosine_similarity;
pub use embedding::get_dimensions;
pub use embedding::EmbeddingAgent;
pub use embedding::EmbeddingAgentBuilder;
pub use embedding::EmbeddingConfig;
pub use embedding::EmbeddingResult;
pub use embedding::EmbeddingUsage;
pub use embedding::SimilarityResult;
pub use failover::AuthProfile;
pub use failover::FailoverConfig;
pub use failover::FailoverManager;
pub use failover::FailoverStatus;
pub use failover::ProviderStatus;
pub use gateway::EventType as GatewayEventType;
pub use gateway::GatewayClientProtocol;
pub use gateway::GatewayConfig;
pub use gateway::GatewayEvent;
pub use gateway::GatewayHealth;
pub use gateway::GatewayMessage;
pub use gateway::GatewayProtocol;
pub use gateway::GatewaySessionProtocol;
pub use sandbox::ResourceLimits;
pub use sandbox::ResourceUsage;
pub use sandbox::SandboxConfig;
pub use sandbox::SandboxProtocol;
pub use sandbox::SandboxResult;
pub use sandbox::SandboxStatus;
pub use sandbox::SandboxStatusInfo;
pub use conditions::evaluate_condition;
pub use conditions::ClosureCondition;
pub use conditions::ConditionProtocol;
pub use conditions::DictCondition;
pub use conditions::ExpressionCondition;
pub use conditions::If;
pub use conditions::RoutingConditionProtocol;
pub use bots::BotChannel;
pub use bots::BotConfig;
pub use bots::BotMessage as BotsChatMessage;
pub use bots::BotProtocol as BotsChatProtocol;
pub use bots::BotUser;
pub use bots::MessageType;
pub use context::FastContextConfig;
pub use context::FastContextResult;
pub use context::FileMatch;
pub use context::LineRange;
pub use display::ApprovalDecision;
pub use display::ColorPalette;
pub use display::DisplayEvent;
pub use display::DisplayType;
pub use display::RiskLevel;
pub use display::add_approval_callback;
pub use display::add_display_callback;
pub use display::callback_count;
pub use display::clean_display_content;
pub use display::clear_all_callbacks;
pub use display::clear_display_callbacks;
pub use display::display_error;
pub use display::display_generating;
pub use display::display_instruction;
pub use display::display_interaction;
pub use display::display_reasoning_steps;
pub use display::display_self_reflection;
pub use display::display_tool_call;
pub use display::display_working_status;
pub use display::execute_async_callbacks;
pub use display::execute_callbacks;
pub use display::execute_sync_callbacks;
pub use display::has_callbacks;
pub use display::register_approval_callback;
pub use display::register_async_display_callback;
pub use display::register_display_callback;
pub use display::request_approval;
pub use display::PRAISON_COLORS;
pub use display::WORKING_FRAMES;
pub use display::WORKING_PHASES;
pub use presets::AutonomyPreset;
pub use presets::CachingPreset;
pub use presets::ContextPreset;
pub use presets::ExecutionPreset;
pub use presets::GuardrailPreset;
pub use presets::KnowledgePreset;
pub use presets::MemoryPreset;
pub use presets::MultiAgentExecutionPreset;
pub use presets::MultiAgentOutputPreset;
pub use presets::OutputPreset;
pub use presets::PlanningPreset;
pub use presets::ReflectionPreset;
pub use presets::WebPreset;
pub use presets::WorkflowStepExecutionPreset;
pub use presets::AUTONOMY_PRESETS;
pub use presets::CACHING_PRESETS;
pub use presets::CONTEXT_PRESETS;
pub use presets::EXECUTION_PRESETS;
pub use presets::GUARDRAIL_PRESETS;
pub use presets::KNOWLEDGE_PRESETS;
pub use presets::MEMORY_PRESETS;
pub use presets::MEMORY_URL_SCHEMES;
pub use presets::MULTI_AGENT_EXECUTION_PRESETS;
pub use presets::MULTI_AGENT_OUTPUT_PRESETS;
pub use presets::OUTPUT_PRESETS;
pub use presets::PLANNING_PRESETS;
pub use presets::REFLECTION_PRESETS;
pub use presets::WEB_PRESETS;
pub use presets::WORKFLOW_STEP_EXECUTION_PRESETS;
pub use presets::detect_memory_backend;
pub use presets::resolve_autonomy_preset;
pub use presets::resolve_caching_preset;
pub use presets::resolve_context_preset;
pub use presets::resolve_execution_preset;
pub use presets::resolve_guardrail_preset;
pub use presets::resolve_knowledge_preset;
pub use presets::resolve_memory_preset;
pub use presets::resolve_multi_agent_execution_preset;
pub use presets::resolve_multi_agent_output_preset;
pub use presets::resolve_output_preset;
pub use presets::resolve_planning_preset;
pub use presets::resolve_reflection_preset;
pub use presets::resolve_web_preset;
pub use presets::resolve_workflow_step_execution_preset;
pub use presets::DEFAULT_OUTPUT_MODE;
pub use specialized_agents::ExpandPrompts;
pub use specialized_agents::ExpandResult;
pub use specialized_agents::ExpandStrategy;
pub use specialized_agents::PromptExpanderAgent;
pub use specialized_agents::PromptExpanderAgentBuilder;
pub use specialized_agents::PromptExpanderConfig;
pub use specialized_agents::QueryRewriterAgent;
pub use specialized_agents::QueryRewriterAgentBuilder;
pub use specialized_agents::QueryRewriterConfig;
pub use specialized_agents::RewritePrompts;
pub use specialized_agents::RewriteResult;
pub use specialized_agents::RewriteStrategy;
pub use parity::A2A;
pub use parity::AGUI;
pub use parity::A2AAgentCard;
pub use parity::A2AAgentCapabilities;
pub use parity::A2AAgentSkill;
pub use parity::A2ATask;
pub use parity::A2ATaskState;
pub use parity::AGUIEvent;
pub use parity::AGUIEventType;
pub use parity::AGUIMessage;
pub use parity::AGUIRole;
pub use parity::AGUIRunInput;
pub use parity::PluginProtocol;
pub use parity::ToolPluginProtocol;
pub use parity::HookPluginProtocol;
pub use parity::AgentPluginProtocol;
pub use parity::LLMPluginProtocol;
pub use parity::PluginMetadata;
pub use parity::ParityPluginType;
pub use parity::PluginParseError;
pub use parity::PluginRegistry as ParityPluginRegistry;
pub use parity::ParityToolDefinition;
pub use parity::LLMMessage;
pub use parity::parse_plugin_header;
pub use parity::parse_plugin_header_from_file;
pub use parity::discover_plugins;
pub use parity::get_default_plugin_dirs;
pub use parity::discover_and_load_plugins;
pub use parity::ensure_plugin_dir;
pub use parity::get_plugin_template;
pub use parity::PraisonConfig;
pub use parity::PluginsConfig;
pub use parity::DefaultsConfig;
pub use parity::ManagerConfig;
pub use parity::SessionConfig as ParitySessionConfig;
pub use parity::ConfigValidationError;
pub use parity::PluginsEnabled;
pub use parity::ConfigAutoRagConfig;
pub use parity::SpecializedAutoRagConfig;
pub use parity::get_config;
pub use parity::get_config_path;
pub use parity::get_plugins_config;
pub use parity::get_defaults_config;
pub use parity::get_default;
pub use parity::is_plugins_enabled;
pub use parity::get_enabled_plugins;
pub use parity::apply_config_defaults;
pub use parity::validate_config;
pub use parity::ArrayMode;
pub use parity::ResolvedValue;
pub use parity::ResolveOptions;
pub use parity::StringMode;
pub use parity::resolve;
pub use parity::resolve_memory;
pub use parity::resolve_knowledge;
pub use parity::resolve_output;
pub use parity::resolve_execution;
pub use parity::resolve_planning;
pub use parity::resolve_reflection;
pub use parity::resolve_context;
pub use parity::resolve_routing;
pub use parity::resolve_hooks;
pub use parity::resolve_guardrails;
pub use parity::resolve_web;
pub use parity::resolve_autonomy;
pub use parity::resolve_caching;
pub use parity::resolve_skills;
pub use parity::detect_url_scheme;
pub use parity::is_path_like;
pub use parity::is_numeric_string;
pub use parity::is_policy_string;
pub use parity::parse_policy_string;
pub use parity::suggest_similar;
pub use parity::clean_triple_backticks;
pub use parity::clean_whitespace;
pub use parity::extract_json;
pub use parity::validate_keys;
pub use parity::make_preset_error;
pub use parity::make_array_error;
pub use parity::Workflow;
pub use parity::Pipeline;
pub use parity::ParityAgents;
pub use parity::AgentManager;
pub use parity::Agents;
pub use parity::loop_step;
pub use parity::parallel as parallel_step;
pub use parity::repeat as repeat_step;
pub use parity::route as route_step;
pub use parity::when;
pub use parity::ParityHandoffConfig;
pub use parity::ParityHandoffFilters;
pub use parity::HandoffFilter;
pub use parity::handoff;
pub use parity::handoff_filters;
pub use parity::prompt_with_handoff_instructions;
pub use parity::MinimalTelemetry;
pub use parity::TelemetryContext;
pub use parity::get_telemetry;
pub use parity::enable_telemetry;
pub use parity::disable_telemetry;
pub use parity::is_telemetry_enabled;
pub use parity::enable_performance_mode;
pub use parity::disable_performance_mode;
pub use parity::is_performance_mode;
pub use parity::cleanup_telemetry_resources;
pub use parity::ErrorLog;
pub use parity::DisplayCallback;
pub use parity::AsyncDisplayCallback;
pub use parity::ParityDisplayEvent;
pub use parity::ParityDisplayEventType;
pub use parity::ParityApprovalCallback;
pub use parity::ParityApprovalDecision;
pub use parity::ParityRiskLevel;
pub use parity::FlowDisplay;
pub use parity::PraisonColors;
pub use parity::get_error_logs;
pub use parity::add_error_log;
pub use parity::clear_error_logs;
pub use parity::log_error;
pub use parity::parity_register_display_callback;
pub use parity::parity_register_async_display_callback;
pub use parity::parity_add_display_callback;
pub use parity::parity_remove_display_callback;
pub use parity::execute_callback;
pub use parity::execute_async_callback;
pub use parity::parity_register_approval_callback;
pub use parity::parity_add_approval_callback;
pub use parity::parity_remove_approval_callback;
pub use parity::parity_request_approval;
pub use parity::PARITY_WORKING_FRAMES;
pub use parity::PARITY_WORKING_PHASES;
pub use parity::ContextAgent;
pub use parity::ContextAgentConfig;
pub use parity::ContextStrategy;
pub use parity::ContextEntry;
pub use parity::create_context_agent;
pub use parity::create_context_agent_with_config;
pub use parity::PlanningAgent;
pub use parity::PlanningAgentConfig;
pub use parity::PlanningStep;
pub use parity::PlanningStepStatus;
pub use parity::FastContext;
pub use parity::AutoAgents;
pub use parity::AutoAgentsConfig;
pub use parity::AutoAgentSpec;
pub use parity::AutoRagAgent;
pub use parity::TraceSinkProtocol;
pub use parity::TraceEvent;
pub use parity::ContextTraceSink;
pub use parity::TraceSink;
pub use parity::MemoryBackend;
pub use parity::Tools;
pub use parity::Citation as DeepResearchCitation;
pub use parity::ReasoningStep;
pub use parity::WebSearchCall;
pub use parity::CodeExecutionStep;
pub use parity::FileSearchCall;
pub use parity::Provider;
pub use parity::DeepResearchResponse;
pub use parity::RAGCitation;
pub use parity::RetrievalPolicy;
pub use parity::RagRetrievalPolicy;
pub use parity::LLMGuardrail;
pub use parity::HandoffError;
pub use parity::HandoffCycleError;
pub use parity::HandoffDepthError;
pub use parity::HandoffTimeoutError;
pub use parity::AgentAppProtocol;
pub use parity::AgentOSProtocol as ParityAgentOSProtocol;
pub use parity::AgentAppConfig;
pub use parity::SecurityPolicy;
pub use parity::ReflectionOutput;
pub use parity::EmbeddingResult as ParityEmbeddingResult;
pub use parity::EmbeddingUsage as ParityEmbeddingUsage;
pub use parity::embed;
pub use parity::embedding;
pub use parity::embeddings;
pub use parity::aembed;
pub use parity::aembedding;
pub use parity::aembeddings;
pub use parity::sync_display_callbacks;
pub use parity::async_display_callbacks;
pub use parity::error_logs;
pub use parity::AUTONOMY_PRESETS as PARITY_AUTONOMY_PRESETS;
pub use parity::RECOMMENDED_PROMPT_PREFIX;
pub use parity::resolve_guardrail_policies;
pub use parity::TraceContextData;
pub use parity::trace_context;
pub use parity::track_workflow;
pub use parity::load_plugin;

Modules§

agent
Agent module for PraisonAI
agents
Specialized Agents Module
bots
Bots Module for PraisonAI Rust SDK
bus
Event Bus Module for PraisonAI Agents.
conditions
Conditions Module for PraisonAI Rust SDK
config
Configuration types for PraisonAI
context
Context Management Module for PraisonAI Agents.
display
Display and callback system for PraisonAI
embedding
Embedding Module for PraisonAI Rust SDK
error
Error types for PraisonAI Core
eval
Evaluation Module for PraisonAI Rust SDK.
failover
Model Failover Module for PraisonAI Rust SDK
gateway
Gateway Module for PraisonAI Rust SDK
guardrails
Guardrails Module
handoff
Handoff functionality for agent-to-agent delegation.
hooks
Hooks Module for PraisonAI Rust SDK.
knowledge
Knowledge System Module
llm
LLM Provider abstraction for PraisonAI
mcp
MCP (Model Context Protocol) Integration Module
memory
Memory system for PraisonAI
parity
Parity Module - Implements all missing Python SDK features
planning
Planning Module for PraisonAI Rust SDK.
plugins
Plugin Module for PraisonAI Agents.
policy
Policy Module for PraisonAI Rust SDK.
prelude
Prelude module for convenient imports
presets
Preset configurations for PraisonAI
protocols
Protocol System Module
rag
RAG (Retrieval Augmented Generation) Module
sandbox
Sandbox Module for PraisonAI Rust SDK
session
Session persistence module for PraisonAI Rust SDK.
skills
Skills Module for PraisonAI Rust SDK.
specialized_agents
Specialized agents for PraisonAI
streaming
Streaming Module
task
Task module for PraisonAI Rust SDK.
telemetry
Telemetry Module for PraisonAI Rust SDK.
thinking
Thinking Budget Module for PraisonAI Rust SDK.
tools
Tool system for PraisonAI
trace
Trace Module for PraisonAI Rust SDK.
workflows
Workflow system for PraisonAI

Attribute Macros§

tool
The #[tool] attribute macro for defining tools.