determinishtic
Blend deterministic Rust code with LLM-powered reasoning.
Hat tip to Dave Herman for the name.
Philosophy
Do things deterministically that are deterministic. File discovery, iteration, and I/O happen in Rust. Summarization, analysis, and judgment happen via the LLM.
use Determinishtic;
use AcpAgent;
async
Installation
Add to your Cargo.toml:
[]
= "0.1"
= "11.0.0-alpha.1"
[]
= "11.0.0-alpha.1"
= { = "1.0", = ["macros", "rt-multi-thread"] }
Core Concepts
Determinishtic
The main entry point. Wraps a connection to an LLM agent and provides the think() method.
// Connect to an agent
let d = new.await?;
// Or use an existing connection (e.g., inside a proxy)
let d = from_connection;
ThinkBuilder
A builder for composing prompts with embedded tools. Created via d.think().
let result: MyOutput = d.think
.text
.display
.textln
.text
.await?;
The output type must implement JsonSchema and Deserialize - the LLM returns structured data by calling a return_result tool.
Tools
Register tools that the LLM can call during reasoning:
use tool_fn_mut;
let mut results = Vecnew;
let output: Summary = d.think
.text
.tool
.await?;
Tools can capture references from the stack frame - no 'static requirement. The tool_fn_mut!() macro is required due to Rust async closure limitations.
.tool()- Register a tool and mention it in the prompt.define_tool()- Register a tool without mentioning it in the prompt
Examples
Run the summarize_docs example:
Available agents: claude-code, gemini, codex
Documentation
See the mdbook for detailed documentation and RFCs.
License
MIT OR Apache-2.0