Repository navigation
Releases
Releases · joydle/borg
borg v1.0.0
borg is now open source.
borg is a supervised agent runtime for Rust. You compose LLM calls into pipelines, and borg runs them under a supervisor: cancellation reaches every nested agent, in-flight call and tool; a panicking child doesn't take its siblings down; retryable failures restart with backoff; a budget is checked before every dispatch; and long runs resume from a checkpoint after a crash.
What's in the box
- Composition primitives: Single, Sequential, Parallel, Branch, Fallback, LoopUntil, Agent, FallbackLadder, Heartbeat and Deferred, written with the
dslbuilders or thepipeline!macro - Fallback ladders across models, a circuit breaker (consecutive or sliding-window), restart-storm meltdown
- Guardrails at every agent-loop boundary, with Warn / Throttle / Halt verdicts
- Budgets with sub-budgets and cache-aware pricing
- Tools with derive macros, opt-in parallel tool calls, MCP servers as tools, and images on the same request as tools
- Checkpoints (
execute_resumable), human-in-the-loop suspend and resume, streaming compositions borg-loop: long-lived streaming actors that park, reconnect and resume across restartsborg-tracing: a full span tree, session → composition → step → turn → toolFakeLlmClient,ScriptedAgentand an eval harness for tests
Safe defaults
borg-sandboxsays plainly thatTokioBackendis not isolation, and points to real sandboxes (agentjail, gVisor, Firecracker, bubblewrap/nsjail, hosted options). ItsSubprocessToolnow requires a program allowlist and a workspace root, never inherits your environment, never takesPATHfrom the model, kills the whole process group on timeout or cancel, and caps output.borg-mcpservers start from a cleared environment, and every call has a timeout, honours cancellation and caps its result.FileEventRecorderwrites private files and refuses symlinks.
See SECURITY.md for the full threat model.
Install
[dependencies]
# Not on crates.io (the `borg` name there is an unrelated crate).
borg = { git = "https://github.com/joydle/borg.git", tag = "v1.0.0" }
async-trait = "0.1" # the derive macros expand to #[async_trait]Rust 1.88+, Tokio. MIT OR Apache-2.0. Installed from GitHub, not crates.io (the borg name there belongs to an unrelated crate).