Expand description
Kowalski - A Rust-based agent framework for interacting with Ollama models
This crate provides a comprehensive framework for building AI agents with various capabilities.
It acts as a facade, re-exporting functionality from the other crates in the kowalski workspace.
§Core components
kowalski_core: Re-exported askowalski::core—TemplateAgent, tools, memory, MCP, federation types.- Tools live inside
kowalski-core(not a separatekowalski-toolscrate).
§Optional features
cli:kowalski-cliaskowalski::clipostgres: Postgres / pgvector paths inkowalski-corefull:cli+postgres
§Usage
Add kowalski to your Cargo.toml and enable the features you need (see the workspace Cargo.toml for the current version).
[dependencies]
kowalski = { version = "1.2.0" }use kowalski::core::agent::{Agent, BaseAgent};
use kowalski::core::template::builder::AgentBuilder;
use kowalski::core::config::Config;
use kowalski::core::error::KowalskiError;
#[tokio::main]
async fn main() -> Result<(), KowalskiError> {
// Create a basic agent
let agent = AgentBuilder::new().await
.build().await?;
Ok(())
}Re-exports§
pub use kowalski_core as core;
Structs§
- Agent
Builder - Base
Agent - The base agent implementation that provides common functionality.
- Config
- Core configuration for the Kowalski system
- Conversation
- Conversation: The AI’s memory of what it’s been talking about. “Conversations are like dreams - they make sense at the time but are hard to explain later.”
- Default
Template - Episodic
Buffer - A persistent memory store: SQLite is the default (single file under
MemoryConfig::episodic_path); PostgreSQLepisodic_kvis opt-in viapostgres://URL +postgresfeature. - Memory
Unit - Represents a single unit of memory, which could be a message, a fact, or a summary.
- Message
- Role
- Role: The AI’s personality for this conversation. “Roles are like costumes - they change how you act but not who you are.”
- Semantic
Store - Long-term memory: in-memory embedding index (cosine search) plus a lightweight relation map
(
subject→ list of(predicate, object)triples). No extra crates for the relational layer—onlystd::collections. - Template
Agent - TemplateAgent: A base agent implementation that provides common functionality for specialized agents to build upon
- Tool
Call - Tool
Chain - A chain of tools that can be executed in sequence.
- Tool
Input - Input for a tool execution
- Tool
Output - Output from a tool execution
- Tool
Parameter - Working
Memory - A simple, in-memory, volatile store for an agent’s short-term working memory.
Enums§
Constants§
Traits§
- Agent
- The core agent trait that all our specialized agents must implement.
- Memory
Provider - The core trait for any memory system in Kowalski. Defines the essential operations for storing and retrieving memories.
- Tool
- A tool that can be executed by the agent