Skip to main content

Crate brainos_cortex

Crate brainos_cortex 

Source
Expand description

§Brain Cortex

Reasoning core providing:

  • LLM client (Ollama, OpenAI compatible)
  • Hybrid provider with trait-based adapter pattern
  • Context assembly from memory + user model
  • Token budget management
  • Tool calling and action dispatch
  • Structured output validation with retry logic

Re-exports§

pub use llm::create_provider;
pub use llm::LlmError;
pub use llm::LlmProvider;
pub use llm::Message;
pub use llm::OllamaProvider;
pub use llm::OpenAiProvider;
pub use llm::ProviderConfig;
pub use llm::Response;
pub use llm::ResponseChunk;
pub use llm::Role;
pub use llm::Usage;

Modules§

actions
Action dispatch — tool execution.
context
Context assembly — builds LLM prompts with token budget management.
llm
LLM client — hybrid provider with trait-based adapter.