1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
//! 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
//!
//! ```rust,ignore
//! 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-export core types for simple API
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
// Re-export the tool macro from praisonai-derive
pub use tool;
/// Prelude module for convenient imports