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
//! Callable - The execution unit abstraction
//!
//! A Callable is anything that can be invoked with an input and produces an output.
//! This is the fundamental building block of execution.
//!
//! ## Key Distinction
//!
//! - **Callable**: The interface (trait) - defines HOW to invoke
//! - **Agent**: A marketing/user-facing term - we keep it as a type alias
//! - **LlmCallable**: A Callable backed by an LLM with tool loop
//! - **GraphCallable**: A Callable backed by a compiled graph
//!
//! ## Naming Convention
//!
//! Internally we use "Callable" to be precise about what this abstraction is.
//! Externally we re-export "Agent" as a type alias for user familiarity.
//!
//! ```text
//! ┌─────────────────────────────────────────────┐
//! │ trait Callable │
//! │ ┌─────────────────────────────────────┐ │
//! │ │ fn name() -> &str │ │
//! │ │ fn description() -> Option<&str> │ │
//! │ │ async fn run(&str) -> Result<String>│ │
//! │ └─────────────────────────────────────┘ │
//! └─────────────────────────────────────────────┘
//! ▲ ▲ ▲
//! │ │ │
//! ┌──────┴───┐ ┌──────┴───┐ ┌──────┴───┐
//! │LlmCallable│ │GraphCallable│ │FnCallable│
//! └──────────┘ └──────────┘ └──────────┘
//! ```
pub use ;
pub use ;
pub use GraphCallable;
pub use ;
pub use CallableRegistry;
// Re-export Agent as a user-friendly alias
// "Agent" is what users expect, "Callable" is what it really is
pub type Agent = dyn Callable;
pub type DynAgent = DynCallable;