Skip to main content

Crate rig_cat

Crate rig_cat 

Source
Expand description

§rig-cat

An LLM agent framework built on comp-cat-rs.

No async, no tokio. All effects are Io<Error, A>, all concurrency is Fiber, all streaming is Stream. The entire runtime is synchronous composition with thread-based parallelism when needed.

§Quick start

use rig_cat::provider::openai::{OpenAiCompletion, ApiKey, ModelName};
use rig_cat::agent::AgentBuilder;

let model = OpenAiCompletion::new(
    ApiKey::new(std::env::var("OPENAI_API_KEY")?),
    ModelName::new("gpt-4o".into()),
);

let agent = AgentBuilder::new(model)
    .preamble("You are a helpful assistant.")
    .temperature(0.7)
    .build();

let response = agent.prompt("What is a Kan extension?").run()?;
println!("{response}");

Modules§

agent
Agent: the high-level LLM abstraction.
embedding
Embedding model trait and vector types.
error
Project-wide error type.
model
Completion model trait: the core LLM abstraction.
pipeline
Pipeline: composable RAG and multi-step workflows.
provider
LLM provider implementations.
tool
Tool trait: functions that agents can invoke.
vector_store
Vector store trait and in-memory implementation.