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
//! # temporal-agent-rs
//!
//! Durable AI agent execution on top of [Temporal](https://temporal.io) using
//! [AutoAgents](https://github.com/liquidos-ai/AutoAgents) for the
//! LLM-provider and tool abstractions.
//!
//! ## Pattern
//!
//! The library re-implements the ReAct loop inside a Temporal workflow
//! ([`AgentWorkflow`]). The workflow stays deterministic; every LLM call and
//! every tool invocation is checkpointed as a separate Temporal activity. A
//! mid-loop crash resumes from the last completed activity without
//! re-spending LLM tokens.
//!
//! ## Quick start
//!
//! ```no_run
//! use std::sync::Arc;
//! use temporal_agent_rs::prelude::*;
//!
//! # async fn run(client: temporalio_client::Client, llm: Arc<dyn LLMProvider>, tool: Arc<dyn ToolT>) -> anyhow::Result<()> {
//! let runtime = temporalio_sdk_core::CoreRuntime::new_assume_tokio(Default::default())?;
//! let mut worker = AgentWorkerBuilder::new(client)
//! .llm(llm)
//! .tool(tool)
//! .queue("agents")
//! .build_worker(&runtime)?;
//! worker.run().await?;
//! # Ok(())
//! # }
//! ```
//!
//! See the `math_agent` example for the full client-side flow.
pub use crateAgentActivities;
pub use crateAgentWorkerBuilder;
pub use crateAgentError;
pub use crate;
pub use crate;
pub use crateAgentWorkflow;