InitOrigin

01 / रनटाइम · Rust 1.95 · Apache-2.0

io-harness

Rust के लिए embeddable एजेंट रनटाइम: कोई भी काम, कोई भी provider, आपकी ही प्रोसेस में — permission boundary, sandbox और एक durable trace के साथ, जो आपका है। यह सिर्फ़ एक लाइब्रेरी है; io-cli इसी पर बना एक प्रोग्राम है।

Embeddable, होस्टेड नहीं

crate के रूप में जोड़िए और उसी प्रोसेस में चलाइए। कोई binary, कोई daemon, कोई UI, कोई अकाउंट और कोई telemetry नहीं — डिफ़ॉल्ट बिल्ड में एक भी optional dependency नहीं।

हर step पर टिकाऊ

हर पूरे हुए step के बाद trace, बजट ख़र्च और एक checkpoint — सब एक ही transaction में। क्रैश के बाद पूरा पेड़ वहीं से चलता है: न step दोहराए जाते हैं, न दोबारा पैसा लगता है।

कोई भी provider

OpenRouter, Anthropic और OpenAI क्रेट के अपने HTTP+SSE क्लाइंट पर, किसी भी OpenAI-जैसे endpoint के लिए एक Compatible provider, 21 वेंडर presets, और उनके बीच fallback।

सीमा, trace के साथ

पढ़ने, लिखने, चलाने और नेटवर्क पर परतदार deny-first नियम। हर refusal trace में है, उस नियम और उस परत के नाम के साथ जिसने उसे रोका।

एक रिपॉज़िटरी पर टिकाऊ बातचीत

src/main.rs
use io_harness::{ApproveAll, OpenRouter, Policy, Session, Store};

let provider = OpenRouter::from_env()?;
let store = Store::open("runs.db")?;

let policy = Policy::default()
    .layer("app")
    .allow_read("*")
    .allow_write("src/*")
    .deny_read("secrets/*")
    .allow_exec("cargo test*")
    .deny_exec("cargo publish*");

let mut session = Session::open(&store, "/path/to/repo")?;
let turn = session
    .turn("the test suite is failing; why?", &provider, &store, &policy, &ApproveAll)
    .await?;

println!("{}", turn.reply.unwrap_or_default());

रिलीज़ और स्थिरता

अभीio-harness crates.io पर। io-cli हर GitHub Release पर checksum-जाँची binaries के रूप में — macOS, Linux, Windows — और वह उसी harness रिलीज़ पर pinned है जिस पर बना।
1.0 से पहलेकोई भी minor रिलीज़ session की शक्ल बदल सकती है। हर बदलाव CHANGELOG.md में लिखा है, और पुरानी रिलीज़ के लिए लिखी config फ़ाइल चलती रहती है।
1.0जब मालिक कहे, उससे पहले नहीं। तब तक CONTRACT.md ही वह है जिस पर कोई स्क्रिप्ट भरोसा कर सकती है: argv, exit codes, config keys और वे पाथ जहाँ io लिखता है।

crate के साथ क्या आता है

Orchestration loop

Observe, reason, act, check, stop — driven by a TaskContract or by a conversation.

Permission boundary

Layered, deny-first rules over read, write, exec and network. Every refusal is in the trace, attributed to the rule and the layer.

Human approval

Approve, deny, or defer past the end of the process and resume on a decision made later.

Plan gate

The agent reads, writes nothing, and exits only through an ordered plan you approve, correct or cancel.

Command execution

The project’s own build, test, lint and package-manager commands, checked on the whole argv and never as a shell string.

Containment

Commands run inside the sandbox backend the host offers, writing to the workspace and nowhere else, with per-host egress.

Execution sandbox

Model-produced code in an ephemeral workdir, with caps that kill rather than throttle and network denied by default.

Environment scrub

The harness’s own provider credentials are removed from every contained child, on every rung. A named variable survives only because the contract declared it.

Verification

Any language’s own test command, a second model against a rubric, or no gate at all.

Structured output

OutputSchema demands a shape of the final answer — a closed JSON Schema subset, validated here whatever the vendor did with it.

Budgets

Steps, wall-clock and token spend, from one ledger a whole tree of agents shares and no child can raise.

Durable runs

Trace, budget draw and checkpoint commit in one transaction after every completed step. A crash resumes the whole tree.

One driver per run

Every run and resume takes a lease; a second driver is refused by name before it can interleave its steps into the trace.

Composition and the mailbox

Nested sub-agents over a shared workspace, inherit-and-narrow. Every agent has an address, and siblings send findings exactly once.

Context and memory

Per-turn assembly to a stated budget share, compaction, invalidation, and durable memory kept by evidence rather than recency.

Accounting

Input, output, cache-read, cache-write and reasoning tokens per call, with latency and TTFT; cost derived on read from a price table you own.

Observability

An observer called as the run happens, a recorded provider that replays identically, an in-crate eval suite, and OTLP spans behind otel.

Extensibility

The Tool trait in-process, MCP over stdio and streamable HTTP, and markdown skills.

Reach

A browser under the policy, LSP navigation, provider-executed web search, documents, images and fixed-argv git.

कौन सा मॉडल जवाब देगा

NativeOpenRouter, Anthropic and OpenAI, over the crate’s own HTTP+SSE client.
CompatibleAny OpenAI-shaped endpoint from a base URL, an auth style, a key and a model.
13 hosted presetsGroq · xAI · Mistral · DeepSeek · Together · Fireworks · Cerebras · Perplexity · Gemini (compat) · Moonshot · Zhipu · Qwen · MiniMax
8 local runtimesOllama · llama.cpp · vLLM · LM Studio · LocalAI · Jan · SGLang · KoboldCpp
RoutingEscalate after repeated gate failures, downshift while the change is small, and refuse to start when the primary reports it is unreachable.

प्लैटफ़ॉर्म सपोर्ट

macOSNative, sandbox-exec. Egress scoped to the proxy’s address exactly.
LinuxNative chain: Landlock, bwrap, namespaces, floor. The Landlock rung scopes egress to a port.
Windows · defaultJob Object — memory, CPU, process count, tree kill. Resources only: no filesystem or network boundary, and the proxy is advisory.
Windows · opt-inAppContainer inside a Job Object: writes confined to the paths the run resolved. Egress is the capability — all of the network, or none.
Portable floorWhatever the host allows, recorded as the floor. What a run reports about its boundary is probed, not assumed.

फ़ीचर फ़्लैग

नीचे सब कुछ डिफ़ॉल्ट रूप से बंद है, और डिफ़ॉल्ट बिल्ड एक भी optional dependency कंपाइल नहीं करता। आख़िरी चार कोई नई crate नहीं जोड़ते — वे फ़्लैग इसलिए हैं कि जिस बिल्ड ने ब्राउज़र, telemetry या अपने ही tools पर दरवाज़ा नहीं माँगा, उसे वह कंपाइल नहीं करना चाहिए।

media

Images to providers that accept them; BMP, TIFF, ICO, TGA and PNM converted to PNG at the door.

documents

Umbrella over the five below.

xlsx

Spreadsheet read, generate, and a single-cell edit that keeps the rest of the workbook.

docx

Word read and generate. No in-place edit, deliberately.

pptx

PowerPoint text extraction. Read-only; there is no writer.

pdf

Generate, extract text, watermark, and fill AcroForm fields by name.

barcode

Barcode and QR decoding from an image. No encoder.

browser

Driving an already-installed browser over a pipe, under the run’s own policy. No debugging port.

otel

Exporting a run as OpenTelemetry spans over OTLP/HTTP. Structure and numbers, never transcript content.

mcp-server

Serving this crate’s own tools over MCP on stdio, under its policy, gate and trace.

codeact

One contained Python program in place of a chain of calls, run by a host interpreter that is found rather than downloaded.

(none)

The default build: the loop, the boundary, the sandbox, the providers, the store and the trace, with no optional dependency compiled at all.

यह आपका toolchain चलाता है

parsers का सेट नहीं: एक तालिका जो marker फ़ाइल को उसी ecosystem की अपनी कमांड से जोड़ती है, और हर कमांड io.toml में बदली जा सकती है। marker क्रम से जाँचे जाते हैं, पहला मैच जीतता है। हर पंक्ति install, build, lint, format और run भी रखती है।

Cargo.toml

cargo test

deno.json

deno test

package.json

<bun|pnpm|yarn|npm> test

go.mod

go test ./...

pyproject.toml

uv run pytest

pom.xml

mvn -B test

build.gradle

gradle test

mix.exs

mix test

Gemfile

bundle exec rake test

composer.json

composer test

Package.swift

swift test

CMakeLists.txt

ctest --test-dir build

*.csproj

dotnet test

Makefile

make test

नापा गया ख़र्च

इस रिपॉज़िटरी में असल में नापे गए आँकड़े — Apple M1, release बिल्ड। इनमें से कोई gate नहीं है: कोई टेस्ट समय पर दावा नहीं करता, क्योंकि CI रनर पर नापा गया समय आगे चलकर flake बनता है।

5.832 msRemoving one session of 1,000 steps from a store — and a sweep of ten sessions is ~4–5× cheaper than ten deletions.
1.106 msRanking a turn’s memory recall at the default 64 entries — linear in entries, flat in the recall table.
0.965 msA capped memory write that evicts, at 64 entries; ~73 ms at 4,096, which is why the cap is the operator’s.
1.75–2.55 msConverting an image at the door on a 512×512 image. A pass-through is 0.01–0.14 ms.
303.8 ms savedStarting a read before the completion ends, on a 400 ms window and a 300 ms read.
0.677A whole live run’s cache hit rate over six calls: 5,430 cache-read tokens on every step after the first, against a prompt that grows. A longer run of the same shape reports less.

गाइड

छब्बीस पेज, एक हर क्षमता के लिए — हर पेज उस क्षमता की असली सीमाएँ भी लिखता है।