daimon-core 0.16.0

Core traits and types for the Daimon AI agent framework — implement Model to add providers
Documentation

daimon-core

Core traits and types for the Daimon AI agent framework. This crate is the plugin interface — implement [Model] to add a new LLM provider.

Provider crates depend on daimon-core for the shared types and trait. The main daimon crate re-exports everything from here, so end users typically never need to depend on daimon-core directly.

Implementing a Provider

use daimon_core::{Model, ChatRequest, ChatResponse, Result, ResponseStream};

pub struct MyProvider { /* ... */ }

impl Model for MyProvider {
    async fn generate(&self, request: &ChatRequest) -> Result<ChatResponse> {
        // call your LLM API
        todo!()
    }

    async fn generate_stream(&self, request: &ChatRequest) -> Result<ResponseStream> {
        todo!()
    }
}