Expand description
The agentic runtime — the in-process entrypoint to the Everruns agentic framework.
The runtime crate exposes an in-memory execution surface that runs the same
core atoms (input, reason, act) used elsewhere in the system, but
without the durable engine, gRPC worker boundary, or control-plane server.
It is part of the Everruns ecosystem.
This is the agentic framework entrypoint for embedders who want to:
- run sessions in their own process
- provide their own platform definition (capabilities, drivers, harnesses)
- seed harnesses, agents, sessions, and workspace files directly in code
- replace the default in-memory stores with custom runtime backends
- inspect the assembled turn context before or after executing a turn
- reuse runtime-owned host phase execution from durable or server-backed hosts
- map
plan_next_host_turn(...)onto their own queue, retry, or in-memory host
InProcessRuntimeBuilder::new() starts from a runtime-safe built-in
capability registry. Hosted Everruns product capabilities and capabilities
that require optional host backends can still be enabled by supplying an
explicit PlatformDefinition.
For a runnable example, see:
cargo run -p everruns-runtime --example in_process_runtime
cargo run -p everruns-runtime --example inspect_context§Example
use everruns_core::{
CapabilityRegistry, DriverRegistry, InputMessage, DriverId, ResolvedModel,
PlatformDefinition,
};
use everruns_core::capabilities::TestMathCapability;
use everruns_runtime::InProcessRuntimeBuilder;
let mut capabilities = CapabilityRegistry::new();
capabilities.register(TestMathCapability);
let platform = PlatformDefinition::new(capabilities, DriverRegistry::new());
let runtime = InProcessRuntimeBuilder::new()
.platform_definition(platform)
.single_session(|s| {
s.harness("math", "You are a calculator.")
.harness_display_name("Math")
.with_capability("test_math")
.agent("math-agent", "Use tools when needed.")
.agent_display_name("Math Agent")
.agent_max_iterations(8)
.session_title("Math Session")
})
.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,
})
.build()
.await?;
let session_id = runtime.default_session_id().expect("single_session id");
let result = runtime
.run_turn(
session_id,
InputMessage::user("What is 2 + 2?"),
)
.await?;
assert!(result.success);§Real-disk workspace
Embedders who want built-in capabilities (file_system,
agent_instructions, skills, …) to read and write a real directory
on disk can configure RealDiskSessionFileSystemFactory on their
PlatformDefinition. Every capability that goes through
ToolContext.file_store or SystemPromptContext.file_store picks it up
automatically.
See the runnable examples for the full wiring:
cargo run -p everruns-runtime --example real_disk_agent_instructions
cargo run -p everruns-runtime --example real_disk_file_system_toolsAnd knowledge/runtime-resources/file-store.md for the trait contract.
Structs§
- Agent
Builder - Builds an
Agentwith runtime-friendly defaults. - Approval
Gating File Store - Gate destructive operations through an embedder-supplied
FileApprovalGate. Reads pass through. - Assembled
Turn Context - Public snapshot of the assembled turn context used by reason-phase hosts.
- Capability
Delta - Result of changing the session-scoped capability set of a live runtime.
- Harness
Builder - Builds a
Harnesswith runtime-friendly defaults. - InMemory
Session File Store - In-memory implementation of the session virtual filesystem.
- InMemory
Session File System Factory - Factory for the runtime’s in-memory session filesystem.
- InMemory
Session Storage Store - In-memory implementation of session key/value and secret storage.
- InMemory
Session Store - In-memory
SessionStore+SessionMutatorfor embedded runtimes. - InProcess
Runtime - Public in-process runtime backed by either in-memory or custom stores.
- InProcess
Runtime Builder - Builder for the public in-process runtime.
- Real
Disk File Store - A
SessionFileSystemrooted at a real host directory. - Real
Disk Session File System Factory - Factory for real-disk session files rooted at a fixed host directory.
- Runtime
ActPlan - Engine-owned act scheduling payload.
- Runtime
Backends - Non-filesystem backend bundle supplied to the embedded runtime.
- Runtime
Host Turn Context - Turn context loaded in one batched call for runtime host execution.
- Runtime
Session Lifecycle - Shared lifecycle helper for runtime-backed hosts.
- Runtime
Turn State - Host-owned state carried across turn phases.
- Session
Builder - Builds a
Sessionwith runtime-friendly defaults. - Single
Session Builder - High-level builder for seeding one harness, one agent, and one session.
- Turn
Result - Write
Blocklist File Store - Reject writes into vendored / build directories at any depth.
Enums§
- Runtime
Turn Plan - Generic next-step decision for a host turn.
- Task
Transition - A task lifecycle transition an observer can be notified of.
- Turn
Stop Reason - Stable reason a turn stopped, independent of provider-specific strings.
Constants§
- DEFAULT_
WRITE_ BLOCKLIST - Default vendored / build directory names that
WriteBlocklistFileStorerejects writes into. Embedders can override viawith_blocklist.
Traits§
- Event
Bus - Event sink that supports emission and optional collection.
- File
Approval Gate - Embedder-supplied approval callback used by
ApprovalGatingFileStore. - Runtime
Agent Store - Agent store contract for runtime seeding and lookup.
- Runtime
Harness Store - Harness store contract for runtime seeding and lookup.
- Runtime
Host Adapter - Public adapter contract for server-backed or durable runtime hosts.
- Runtime
Message Store - Message store contract for runtime persistence and lookup.
- Runtime
Provider Store - Provider store contract for runtime lookup and default-model configuration.
- Runtime
Session Store - Session store contract for runtime seeding, lookup, and mutation.
- Task
Transition Observer - Receive task-transition notifications in process.
Functions§
- detect_
dependency_ blocker - execute_
act_ activity - execute_
input_ activity - execute_
reason_ activity - execute_
reason_ activity_ with_ prompt_ messages - Execute a reason activity while applying
user_prompt_submithooks to the supplied messages. Hosts that inject synthetic user messages between reason iterations must include their ids here so they cross the same policy boundary as the turn’s original input. - in_
process_ internal_ org_ id - Derive an internal
i64org id from the publicorg_<32hex>form on aSession. - multi_
root_ file_ system - plan_
next_ host_ turn - Determine the next host step after an activity finishes.
Type Aliases§
- Platform
Store Factory - Factory producing a per-(org, session)
PlatformStore. The session id is supplied because platform stores are scoped to the calling session for subagent spawning and platform-management tools. - Schedule
Store Factory - Factory producing a per-org
SessionScheduleStore. Embedders that have a single global store can ignore theorg_idargument and return the sameArcevery time.