1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
//! The application-facing entrypoint to the [Everruns](https://everruns.com)
//! agentic framework.
//!
//! `everruns` is a thin, publishable facade over the existing in-process
//! runtime. It re-exports the minimum needed to construct and run a session
//! without depending on `everruns-core` or `everruns-runtime` directly, so an
//! application can add a single dependency and run an agent turn.
//!
//! This first release is a **compatibility facade**: it moves no engine code.
//! Default features stay offline — no provider, MCP, filesystem, SQLx, server,
//! or worker integrations are activated. Anything not yet promoted onto the
//! facade is reachable through the escape-hatch [`core`] and [`runtime`]
//! modules.
//!
//! # Example
//!
//! Build one in-process session and run one simulated turn, importing only
//! `everruns`:
//!
//! ```
//! # #[tokio::main]
//! # async fn main() -> Result<(), everruns::AgentLoopError> {
//! use everruns::{
//! DriverId, InProcessRuntimeBuilder, InputMessage, LlmSimConfig, ResolvedModel,
//! };
//!
//! let runtime = InProcessRuntimeBuilder::new()
//! .single_session(|s| {
//! s.harness("assistant", "You are a helpful assistant.")
//! .harness_display_name("Assistant")
//! .agent("assistant-agent", "Answer the user.")
//! .agent_display_name("Assistant Agent")
//! .agent_max_iterations(4)
//! .session_title("Facade Smoke")
//! })
//! .llm_sim(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);
//! assert_eq!(result.response, "4");
//! # Ok(())
//! # }
//! ```
// Let code emitted by `#[everruns::tool]` resolve `::everruns::…` paths even
// inside this crate's own tests and doctests.
extern crate self as everruns;
// --- Value-first agent description and execution -------------------------
pub use ;
pub use ;
pub use ;
pub use ;
// --- File-backed session persistence (feature-gated) --------------------
/// Persist and resume a [`Session`]'s conversation as an append-only JSONL file
/// with only `everruns` and the `jsonl` feature. Off by default; adds no
/// filesystem dependencies to the standard build.
pub use ;
// --- Function-tool procedural macro (feature-gated) ---------------------
/// Turn a typed async function into an agent tool.
///
/// `#[everruns::tool]` generates the argument JSON Schema and adapter for a
/// plain async function so it can be handed to
/// [`AgentBuilder::tool`](crate::AgentBuilder::tool) without writing either by
/// hand. See the [`macro@tool`] documentation for supported signatures and
/// options. Requires the default-enabled `macros` feature.
pub use tool;
/// Runtime support for code emitted by [`macro@tool`]. Not a stable API — the
/// expansion references these items by path so the calling crate needs no
/// direct dependency on `serde`, `schemars`, or `serde_json`.
// --- Real LLM provider configuration (feature-gated) --------------------
// The default facade build stays offline; provider modules compile only when
// their feature is enabled. `openai` adds `providers::openai::OpenAI`.
pub use ;
// --- Runtime construction and execution ---------------------------------
// Note: the value-first `AgentBuilder` above intentionally replaces the runtime
// crate's low-level `AgentBuilder` at the facade root. The runtime builder
// remains reachable as `everruns::runtime::AgentBuilder`.
pub use ;
// --- Portable message, model, and platform types ------------------------
pub use TurnStopReason;
pub use ;
// --- Deterministic in-process LLM simulator -----------------------------
pub use LlmSimConfig;
/// Escape hatch onto the underlying `everruns-core` crate for APIs not yet
/// promoted onto the facade. Prefer the re-exports above; reach here only for
/// types the facade does not yet surface directly.
pub use everruns_core as core;
/// Escape hatch onto the underlying `everruns-runtime` crate for APIs not yet
/// promoted onto the facade. Prefer the re-exports above; reach here only for
/// types the facade does not yet surface directly.
pub use everruns_runtime as runtime;
/// The common path: everything needed to describe an agent and run turns.
///
/// ```
/// use everruns::prelude::*;
///
/// let agent = Agent::builder()
/// .instructions("You are concise.")
/// .model(Model::simulated("Sure."))
/// .build();
/// assert!(agent.is_ok());
/// ```