neuron-turn
Shared toolkit for building LLM providers and operators
Overview
neuron-turn is the shared toolkit that concrete providers (Anthropic, OpenAI, Ollama) and
operators (ReAct, single-shot) build on top of. It provides:
Providertrait — the async interface that every LLM integration implements- Request / response types —
TurnRequest,TurnResponse,ContentPart,ToolCall, etc. - Context strategy types —
ContextStrategyenum and its resolution logic (used by providers to window conversation history before sending to the model) - Shared cost / token accounting —
TokenUsage,Cost,DurationMs
Usage
[]
= "0.4"
Implementing a custom provider
use ;
use async_trait;
Part of the neuron workspace
neuron is a composable async agentic AI framework for Rust. See the book for architecture and guides.