Production-grade coding agent tools in Rust. ~10 MiB. No TUI. Embed it anywhere.
ReloadedCode started as "an OpenCode for servers." Headless, sandboxed, and cheap to host for non-commercial use.
OpenCode is a great interactive coding agent, but it's a ~305 MiB TypeScript application that runs as a separate process. What if you need those same tools for a server? A Discord bot? A CI pipeline? A custom product?
ReloadedCode ships the same agent tools as a Rust library. Shell sandboxing. Default-deny permissions. ~10 MiB footprint.
| OpenCode | ReloadedCode | |
|---|---|---|
| Language | TypeScript | Rust |
| Memory | ~305 MiB | ~13 MiB |
| Interface | TUI / Desktop / IDE | Library (headless) |
| Agent format | Markdown + YAML | Similar format |
| Embeddable | HTTP API | Rust crate |
- 10 Built-in tools - read, write, edit, glob, grep, bash, webfetch, todoread, todowrite, task
- Agents similar to OpenCode - load agent markdown files with YAML frontmatter
- Multi-agent delegation - orchestrator pattern with depth-limited task chains
- Linux sandboxing - bubblewrap profiles for shell isolation (Public Bot + Trusted Maintenance)
- Path security - restrict file access with allowed directories and glob-based rules
- Model catalog - sync models.dev with ETag caching (~3000 models, ~24 KiB cache)
- Permissions - default-deny with last-match-wins rules and wildcard patterns
- Optimized system prompt - auto-generated, ~2000 tokens full / ~560 search-only
- Async + Sync - every tool compiles as tokio async or blocking. Zero overhead.
- Framework-agnostic core - use the serdesAI integration or bring your own framework
- 15 LLM providers - OpenAI, Anthropic, Google, Groq, Mistral, Ollama, Azure, Bedrock, and more
- Semver-guaranteed API - 6-platform CI matrix, 11 semver surfaces, clippy -D warnings
[dependencies]
reloaded-code-serdesai = "0.2"1. Create an agent file (markdown + YAML frontmatter similar to OpenCode):
---
name: coder
mode: all
description: A coding agent that can read, search, and edit files.
permission:
read: allow
write: allow
edit: allow
glob: allow
grep: allow
bash: allow
webfetch: allow
task: deny
---
You are a coding assistant. Use the available tools to complete the user's task.2. Load the catalog, build the agent, and run:
use reloaded_code_agents::{AgentCatalog, AgentLoader, AgentRuntimeBuilder};
use reloaded_code_core::CredentialResolver;
use reloaded_code_models_dev::ModelsDevCatalog;
use reloaded_code_serdesai::{AgentBuildContext, AgentDefaults};
use std::{path::PathBuf, sync::Arc};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Load agents from the "agents" directory.
let mut catalog = AgentCatalog::new();
AgentLoader::new().add_directory(&mut catalog, "./agents")?;
// Supports any model from https://models.dev
let load_result = ModelsDevCatalog::load().await?;
let runtime = AgentRuntimeBuilder::new()
.catalog(catalog) // Default model if not specified by agent.
.defaults(AgentDefaults::with_model("synthetic/hf:MiniMaxAI/MiniMax-M2.5"))
.build()?;
let build_context = AgentBuildContext::new(
Arc::new(runtime),
Arc::new(load_result.catalog),
Arc::new(CredentialResolver::new()),
);
let agent = build_context.build("coder")?;
let response = agent.run("Find all TODO comments in src/", ()).await?;
println!("{}", response.output());
Ok(())
}| Crate | Version | Description |
|---|---|---|
| reloaded-code-core | 0.2 | Framework-agnostic tool implementations, path resolvers, permissions, system prompt builder |
| reloaded-code-agents | 0.1 | agent markdown loader similar to OpenCode, typed catalog, runtime builder |
| reloaded-code-serdesai | 0.2 | SerdesAI framework integration, tool adapters, 15 provider bridges, task delegation |
| reloaded-code-bubblewrap | 0.1 | Linux bubblewrap sandbox profiles (Public Bot + Trusted Maintenance) |
| reloaded-code-models-dev | 0.1 | models.dev catalog sync with ETag caching and offline fallback |
# Basic agent setup with all tools
cargo run --example serdesai-basic -p reloaded-code-serdesai
# Sandboxed file access (restricted to allowed directories)
cargo run --example serdesai-sandboxed -p reloaded-code-serdesai
# Sandboxed bash execution (Linux, requires bubblewrap)
cargo run --example serdesai-sandboxed-bash --features linux-bubblewrap -p reloaded-code-serdesai
# Agent catalog loading from markdown files
cargo run --example serdesai-agents -p reloaded-code-serdesai
# Multi-agent task delegation (orchestrator + reader sub-agent)
cargo run --example serdesai-task -p reloaded-code-serdesai- Documentation Site - guides, architecture, examples
- reloaded-code-core README
- reloaded-code-agents README
- reloaded-code-serdesai README
- reloaded-code-bubblewrap README
- reloaded-code-models-dev README
- Sandbox profiles and operator checklist
- API Reference (docs.rs)
Contributions are welcome! Please ensure all tests pass and the code follows our guidelines.
Licensed under Apache 2.0.