enact-core 0.0.1

Core agent runtime for Enact - Graph-Native AI agents
Documentation
//! 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│
//!     └──────────┘   └──────────┘   └──────────┘
//! ```

mod callable;
mod composite;
mod graph;
mod llm;
mod registry;

pub use callable::{Callable, DynCallable};
pub use composite::{
    // Descriptor
    CallableDescriptor,
    CostTier,
    // Invocation
    CallableInvocation,
    CallableInvocationResult,
    // Resource allocation
    ResourceAllocation,
    ResourceAllocationStrategy,
    ResourceBudget,
    // Discovery
    CallableInvoker,
    DiscoveryQuery,
    DiscoveryResult,
};
pub use graph::GraphCallable;
pub use llm::{LlmCallable, ToolCall, ToolSchema};
pub use registry::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;