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
//! # agentyk
//!
//! Compose agents from values and run them.
//!
//! An [`Agent`] is built entirely by value — a system prompt, a model
//! ([`ModelSpec`]), capabilities ([`Capability`]), tools ([`Tool`]) — with no
//! entity creation, no registration, and no ids to thread. Ids exist only as
//! internal correlation handles on sessions and events.
//!
//! This is the **framework crate**: builders, the default in-process
//! executor, bundled drivers (sim; OpenAI/Anthropic behind `http`), the JSONL
//! event log, and MCP support. The contract it drives — traits, the event
//! protocol, and the turn state machine — lives in
//! [`agentyk-core`](https://crates.io/crates/agentyk-core) and is fully
//! re-exported here; depend on core directly only when *implementing* a seam
//! (a custom driver, capability, event log, or executor).
//!
//! The domain language (events protocol, capabilities, drivers, the
//! `input → reason → act` turn) is inherited from
//! [everruns](https://github.com/everruns/everruns); agentyk is the
//! value-first core that everruns-core and everruns-runtime are intended to
//! be rebuilt on top of.
//!
//! ```
//! use agentyk::{Agent, ModelSpec, SimDriver, SimTurn};
//!
//! # #[tokio::main(flavor = "current_thread")]
//! # async fn main() -> agentyk::Result<()> {
//! let agent = Agent::builder()
//! .name("greeter")
//! .system_prompt("You are terse.")
//! .model(ModelSpec::llmsim())
//! .driver(SimDriver::new([SimTurn::text("hi!")]))
//! .build()?;
//!
//! let mut session = agent.session();
//! let turn = session.run("hello").await?;
//! assert_eq!(turn.response, "hi!");
//! assert!(!session.events().await?.is_empty());
//! # Ok(())
//! # }
//! ```
//!
//! With a real provider (feature `http`):
//!
//! ```ignore
//! let agent = Agent::builder()
//! .system_prompt("You are a coding agent.")
//! .model(ModelSpec::anthropic("claude-sonnet-4-5").api_key(key))
//! .capability(my_capability)
//! .build()?;
//! let result = agent.run("list the files").await?;
//! ```
// The full contract: protocol data, seams, the turn machine, atoms, replay.
pub use *;
pub use ;
pub use ;
pub use ;
pub use InProcessExecutor;
pub use JsonlEventLog;
pub use ;
pub use ;
pub use ;