#![allow(dead_code)]
#![allow(unused_variables)]
#![allow(deprecated)]
#![allow(clippy::too_many_arguments)]
#![allow(clippy::explicit_counter_loop)]
pub mod config;
pub mod workflows_config;
pub use config::AgentConfig;
pub use workflows_config::{SkillsTomlConfig, WorkflowConfig};
pub trait ToonAgents: Send + Sync {
fn get(&self, name: &str) -> Option<AgentConfig>;
fn names(&self) -> Vec<String>;
}
pub mod configurable;
pub mod context_provider;
pub mod loop_detector;
pub mod loop_mode;
pub mod checkpoint;
pub mod orchestrator;
pub mod registry;
pub mod router;
#[cfg(feature = "postgres")]
pub mod tenant_agent;
pub mod memory;
pub mod research;
#[cfg(feature = "postgres")]
pub(crate) mod resolver;
pub mod external_context;
pub mod execution;
pub mod plugins;
pub mod admit;
pub mod emergency_stop;
pub use emergency_stop::EmergencyStop;
#[cfg(feature = "scheduler")]
pub mod scheduler;
#[cfg(feature = "pipeline")]
pub mod pipeline;
#[cfg(feature = "trigger")]
pub mod trigger;
#[cfg(any(feature = "postgres", feature = "skills"))]
pub mod skills;
#[cfg(feature = "workflows")]
pub mod workflows;
pub use execution::{
request_tenant_ctx, request_user_scope, tenant_scope, user_id_from_ctx, AgentRequest,
AgentSource, Execute, ExecutionResult, RunTracker,
};
pub use admit::admit;
pub use plugins::register_plugins;
pub use external_context::ExternalContext;
use ares_llm::client::TokenUsage;
use ares_types::types::{AgentContext, AgentType, Result};
use async_trait::async_trait;
pub use configurable::ConfigurableAgent;
pub use context_provider::{ContextProvider, ContextProviderHandle, NoOpContextProvider};
pub use registry::{AgentRegistry, AgentRegistryBuilder};
#[cfg(feature = "postgres")]
pub use resolver::TenantId;
#[derive(Debug, Clone, Default)]
pub struct AgentResponse {
pub content: String,
pub usage: Option<TokenUsage>,
pub metadata: Option<ExecutionMetadata>,
}
#[derive(Debug, Clone, Default)]
pub struct ExecutionMetadata {
pub model_name: String,
pub provider_name: String,
}
#[async_trait]
pub trait Agent: Send + Sync {
async fn execute(&self, input: &str, context: &AgentContext) -> Result<AgentResponse>;
fn system_prompt(&self) -> String;
fn agent_type(&self) -> AgentType;
}