Skip to main content

Crate kowalski

Crate kowalski 

Source
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 as kowalski::coreTemplateAgent, tools, memory, MCP, federation types.
  • Tools live inside kowalski-core (not a separate kowalski-tools crate).

§Optional features

  • cli: kowalski-cli as kowalski::cli
  • postgres: Postgres / pgvector paths in kowalski-core
  • full: 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§

AgentBuilder
BaseAgent
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.”
DefaultTemplate
EpisodicBuffer
A persistent memory store: SQLite is the default (single file under MemoryConfig::episodic_path); PostgreSQL episodic_kv is opt-in via postgres:// URL + postgres feature.
MemoryUnit
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.”
SemanticStore
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—only std::collections.
TemplateAgent
TemplateAgent: A base agent implementation that provides common functionality for specialized agents to build upon
ToolCall
ToolChain
A chain of tools that can be executed in sequence.
ToolInput
Input for a tool execution
ToolOutput
Output from a tool execution
ToolParameter
WorkingMemory
A simple, in-memory, volatile store for an agent’s short-term working memory.

Enums§

KowalskiError
ParameterType

Constants§

VERSION

Traits§

Agent
The core agent trait that all our specialized agents must implement.
MemoryProvider
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

Type Aliases§

Result