Skip to content

Reloaded-Project/ReloadedCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

145 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

llm-coding-tools

Crates.io - llm-coding-tools-core Crates.io - llm-coding-tools-rig Crates.io - llm-coding-tools-serdesai Docs.rs CI

Lightweight, high-performance coding tool implementations for LLM-powered development agents. Plug and play into your favourite frameworks like Rig.

About This Workspace

This workspace contains multiple Rust crates for integrating coding tools with LLM agents:

Features

  • 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

Feature Flags (llm-coding-tools-core)

  • tokio (default): Async mode with tokio runtime
  • blocking: Sync/blocking mode, mutually exclusive with async

Quick Start

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?;

Examples

# 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

Documentation

Contributing

Contributions are welcome! Please ensure all tests pass and the code follows our guidelines.

License

Licensed under Apache 2.0.

About

Lightweight, heavily optimized coding tool implementations for LLM-powered development agents.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages