Lightweight, high-performance coding tool implementations for LLM-powered development agents. Plug and play into your favourite frameworks like Rig.
This workspace contains multiple Rust crates for integrating coding tools with LLM agents:
- llm-coding-tools-core: Framework-agnostic core operations and utilities
- llm-coding-tools-rig: Rig framework-specific Tool implementations
- llm-coding-tools-serdesai: serdesAI framework-specific Tool implementations
- File Operations: Read, write, edit files with line-numbered output
- Search: Glob pattern matching and regex content search
- Shell: Cross-platform command execution with timeout
- Web: URL fetching with HTML-to-markdown conversion
- Path Security: Choose between unrestricted or sandboxed file access
- Context Strings: Embedded LLM guidance for tool usage
tokio(default): Async mode with tokio runtimeblocking: Sync/blocking mode, mutually exclusive withasync
Add to your Cargo.toml:
[dependencies]
llm-coding-tools-rig = "0.1"See also llm-coding-tools-serdesai for serdesAI framework support.
use llm_coding_tools_rig::absolute::{ReadTool, WriteTool, GlobTool};
use llm_coding_tools_rig::{BashTool, PreambleBuilder, TodoTools};
use rig::providers::openai;
use rig::completion::Prompt;
// Track tools and generate LLM guidance
let mut pb = PreambleBuilder::<false>::new();
let todos = TodoTools::new();
let client = openai::Client::from_env();
let agent = client
.agent("gpt-4o")
.tool(pb.track(ReadTool::<true>::new()))
.tool(pb.track(WriteTool::new()))
.tool(pb.track(GlobTool::new()))
.tool(pb.track(BashTool::new()))
.tool(pb.track(todos.read))
.tool(pb.track(todos.write))
.preamble(&pb.build())
.build();
// Use the agent
// let response = agent.prompt("List all files").await?;# Rig framework - Basic toolset setup
cargo run --example rig-basic -p llm-coding-tools-rig
# Rig framework - Sandboxed file access
cargo run --example rig-sandboxed -p llm-coding-tools-rig
# serdesAI framework - Basic agent setup
cargo run --example serdesai-basic -p llm-coding-tools-serdesai
# serdesAI framework - Sandboxed file access
cargo run --example serdesai-sandboxed -p llm-coding-tools-serdesai- llm-coding-tools-core README
- llm-coding-tools-rig README
- llm-coding-tools-serdesai README
- Developer Guidelines
Contributions are welcome! Please ensure all tests pass and the code follows our guidelines.
Licensed under Apache 2.0.