Crate talk

Crate talk 

Source
Expand description

Talk: A Rust library for creating controlled LLM agents

Talk enables developers to create production-ready AI agents with predictable behavior in under 50 lines of Rust code. The library provides behavioral guidelines, tool integration, multi-step conversation journeys, and pluggable storage backends.

§Quick Start

use talk::{Agent, Guideline, GuidelineCondition, GuidelineAction};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Implementation examples will be available after Agent API is implemented
    Ok(())
}

Re-exports§

pub use agent::Agent;
pub use agent::AgentBuilder;
pub use agent::AgentConfig;
pub use agent::AgentResponse;
pub use agent::LogLevel;
pub use agent::ResponseExplanation;
pub use agent::ToolExecution;
pub use context::Context;
pub use context::ContextVariable;
pub use context::Message;
pub use context::MessageRole;
pub use context::Validator;
pub use error::AgentError;
pub use error::GuidelineError;
pub use error::JourneyError;
pub use error::Result;
pub use error::StorageError;
pub use error::ToolError;
pub use guideline::DefaultGuidelineMatcher;
pub use guideline::Guideline;
pub use guideline::GuidelineAction;
pub use guideline::GuidelineCondition;
pub use guideline::GuidelineMatch;
pub use guideline::GuidelineMatcher;
pub use guideline::ParameterDef;
pub use journey::DefaultJourneyManager;
pub use journey::Journey;
pub use journey::JourneyManager;
pub use journey::JourneyState;
pub use journey::JourneyStep;
pub use journey::Transition;
pub use journey::TransitionCondition;
pub use provider::AnthropicProvider;
pub use provider::LLMProvider;
pub use provider::OpenAIProvider;
pub use provider::ProviderConfig;
pub use provider::StreamChunk;
pub use session::Session;
pub use session::SessionStatus;
pub use storage::memory::InMemorySessionStore;
pub use storage::SessionStore;
pub use tool::ParameterSchema;
pub use tool::Tool;
pub use tool::ToolRegistry;
pub use tool::ToolResult;
pub use types::*;

Modules§

agent
context
Context management for agent conversations
error
Error types for the Talk library
guideline
journey
Conversation Journey System
provider
LLM provider abstraction and implementations
session
Session management for agent conversations
storage
Session storage backends
tool
Tool integration for external API and function calls
types
Common type definitions used throughout the Talk library