ingot-runtime 0.5.2

Reference interpreter for the Ingot Agent IR: executes an agent and enforces its policy and budgets.
Documentation

The reference interpreter for the Ingot Agent IR.

This crate is the executable definition of what an IR document means. It is deliberately narrow — see RFC-0002 and ADR-0002. It has no context management, no provider routing, no session state and no orchestration features, because its job is to make the IR's semantics precise and testable, not to be a good place to host an agent.

use ingot_runtime::{run, RunOptions, ScriptedProvider, DenyAllTools, CollectingSink};
use std::collections::BTreeMap;

# fn main() -> Result<(), Box<dyn std::error::Error>> {
let ir = ingot_ir::AgentIr::from_json(&std::fs::read_to_string("Brief.ir.json")?)?;
let mut provider = ScriptedProvider::new(vec![serde_json::json!("# Brief\n\n...")]);
let mut tools = DenyAllTools;
let mut events = CollectingSink::default();

let report = run(
    &ir,
    &BTreeMap::new(),
    &mut provider,
    &mut tools,
    &mut events,
    RunOptions {
        inputs: [("topic".to_string(), serde_json::json!("compilers"))].into(),
        ..RunOptions::default()
    },
)?;

println!("{}", String::from_utf8_lossy(&report.outputs["brief"].to_bytes()));
# Ok(())
# }