everruns-runtime 0.15.0

In-process Rust runtime for building local agentic systems — coding agents, personal agents, and more — by embedding Everruns agent harnesses
Documentation

everruns-runtime

Embed Everruns agents directly in your Rust process — no server, worker, or database required.

Crates.io Documentation License: MIT

everruns-runtime is the in-process entrypoint for embedding Everruns. It runs a harness entirely inside your own process — with in-memory stores by default — using the same input → reason → act loop as worker- and server-backed execution, but without the durable engine, gRPC worker boundary, or control-plane server. It is the recommended starting point for trying Everruns, writing tests, and embedding agents in your own application.

Part of the Everruns ecosystem — the durable agentic harness engine for building unstoppable agents. The runtime builds on the contracts in everruns-core and pairs with provider crates such as everruns-openai and everruns-anthropic.

Quick Example

use everruns_core::{
    CapabilityRegistry, DriverId, DriverRegistry, PlatformDefinition, ResolvedModel,
};
use everruns_core::capabilities::TestMathCapability;
use everruns_runtime::InProcessRuntimeBuilder;

# async fn example() -> Result<(), Box<dyn std::error::Error>> {
let mut capabilities = CapabilityRegistry::new();
capabilities.register(TestMathCapability);

let platform = PlatformDefinition::new(capabilities, DriverRegistry::new());
let runtime = InProcessRuntimeBuilder::new()
    .platform_definition(platform)
    .llm_sim(everruns_core::llmsim_driver::LlmSimConfig::fixed("4"))
    .default_model(ResolvedModel {
        model: "llmsim-model".into(),
        provider_type: DriverId::LlmSim,
        api_key: Some("fake-key".into()),
        base_url: None,
        provider_metadata: None,
    })
    .single_session(|s| {
        s.harness("math", "You are a calculator.")
            .with_capability("test_math")
            .agent("math-agent", "Use tools when useful.")
            .session_title("Math example")
    })
    .build()
    .await?;

let session_id = runtime.default_session_id().expect("single_session id");
let result = runtime.run_text_turn(session_id, "What is 2 + 2?").await?;

assert!(result.success);
# Ok(())
# }

The example above uses the built-in deterministic LLM simulator so it runs with no API key. Swap in a real provider (for example everruns-openai) to talk to a hosted model.

Runnable examples ship with the crate:

cargo run -p everruns-runtime --example in_process_runtime
cargo run -p everruns-runtime --example inspect_context
cargo run -p everruns-runtime --example real_disk_file_system_tools

What It Provides

  • InProcessRuntimeBuilder for declaring platforms, harnesses, agents, and sessions in code
  • In-memory stores for local development and tests, with hooks to plug in custom backends
  • Real-disk workspace wiring so file-backed agents can read and write an actual directory
  • Turn-context inspection before and after a turn executes
  • Host-phase helpers reused by durable and server-backed execution

Documentation

License

Licensed under the MIT License.