Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

649 Commits

Repository files navigation

ReloadedCode

Production-grade coding agent tools in Rust. ~10 MiB. No TUI. Embed it anywhere.

CIcrates.iodocs.rsLicense

Get Started · Documentation · API Reference · Examples


Why this project?

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.

OpenCodeReloadedCode
LanguageTypeScriptRust
Memory~305 MiB~13 MiB
InterfaceTUI / Desktop / IDELibrary (headless)
Agent formatMarkdown + YAMLSimilar format
EmbeddableHTTP APIRust crate

Features

  • 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

Quick Start

[dependencies]
reloaded-code-serdesai = "0.2"

1. Create an agent file (markdown + YAML frontmatter similar to [OpenCode]):

---name: codermode: alldescription: A coding agent that can read, search, and edit files.permission:
read: allowwrite: allowedit: allowglob: allowgrep: allowbash: allowwebfetch: allowtask: 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]asyncfnmain() -> Result<(),Box<dyn std::error::Error>>{// Load agents from the "agents" directory.letmut catalog = AgentCatalog::new();AgentLoader::new().add_directory(&mut catalog,"./agents")?;// Supports any model from https://models.devlet 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 Map

CrateVersionDescription
reloaded-code-core0.2Framework-agnostic tool implementations, path resolvers, permissions, custom tool registry
reloaded-code-agents0.1agent markdown loader similar to [OpenCode], typed catalog, runtime builder
reloaded-code-serdesai0.2SerdesAI framework integration, tool adapters, 15 provider bridges, task delegation
reloaded-code-bubblewrap0.1Linux bubblewrap sandbox profiles (Public Bot + Trusted Maintenance)
reloaded-code-models-dev0.1models.dev catalog sync with ETag caching and offline fallback
reloaded-code-provider-config0.1Provider configuration loading and provider catalog overrides

Examples

# 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

Contributing

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

License

Licensed under Apache 2.0. [OpenCode]: https://opencode.ai

About

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

Resources

Stars

9 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages