llm-coding-tools-serdesai
Lightweight, high-performance serdesAI framework Tool implementations for coding tools.
Features
- File operations - Read, write, edit, glob, grep with two access modes:
absolute::*- Unrestricted filesystem accessallowed::*- Sandboxed to configured directories
- Shell execution - Cross-platform command execution with timeout
- Web fetching - URL content retrieval with format conversion
- Todo management - Shared-state todo list tracking
- Context strings - LLM guidance text for tool usage (re-exported from core)
- Schema builders - Composable helpers for custom tool definitions
Installation
Add to your Cargo.toml:
[]
= "0.1"
Quick Start
Minimal runnable agent (requires OPENAI_API_KEY):
use ;
use AgentBuilderExt;
use ;
use *;
async
See the serdesai-basic example for a complete working setup.
Usage
File tools come in absolute::* (unrestricted) and allowed::* (sandboxed) variants:
use ;
use ;
use AllowedPathResolver;
use PathBuf;
// Unrestricted access (absolute paths)
let read = new;
// Sandboxed access (paths relative to allowed directories)
let allowed_paths = vec!;
let resolver = new.unwrap;
let sandboxed_read: = new;
let sandboxed_write = new;
Other tools: BashTool, WebFetchTool, TaskTool, TodoReadTool, TodoWriteTool.
Use SystemPromptBuilder to track tools and pass pb.build() to .system_prompt(). Set working_directory() so the environment section is populated.
Use AgentBuilderExt::tool() to add tools that implement Tool<Deps> to the agent.
Context strings are re-exported in llm_coding_tools_serdesai::context (e.g., BASH, READ_ABSOLUTE).
Examples
# Basic agent setup with AgentBuilderExt
# Sandboxed file access with allowed::* tools
License
Apache 2.0