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
//! # oris
//!
//! Programmable AI execution runtime in Rust: stateful graphs, agents, tools, RAG, and multi-step execution.
//!
//! ## Overview
//!
//! - **Chains** — LLM chains, conversational and sequential chains, Q&A, SQL
//! - **Agents** — Chat agents with tools, multi-agent (router, subagents, skills)
//! - **RAG** — Retrieval-augmented generation (agentic, hybrid, two-step)
//! - **Graph** — State graphs, streaming, persistence, interrupts, subgraphs
//! - **Deep Agent** — Planning, filesystem tools, skills, long-term memory, human-in-the-loop
//! - **Vector stores** — PostgreSQL (pgvector), Qdrant, SQLite (VSS/Vec), SurrealDB, OpenSearch, Chroma, FAISS, MongoDB, Pinecone, Weaviate (enable via features)
//! - **Embeddings** — OpenAI, Azure, Ollama, FastEmbed, Mistral (feature-gated)
//! - **Document loaders** — PDF, HTML, CSV, Git, code, and more (feature-gated)
//!
//! ## Installation
//!
//! ```toml
//! [dependencies]
//! oris = "5"
//! # With a vector store, e.g. PostgreSQL:
//! # oris = { version = "5", features = ["postgres"] }
//! ```
//!
//! ## Example
//!
//! ```ignore
//! use oris_runtime::chain::{Chain, LLMChainBuilder};
//! use oris_runtime::llm::openai::OpenAI;
//! use oris_runtime::prompt::HumanMessagePromptTemplate;
//! use oris_runtime::prompt::prompt_args;
//!
//! # async fn run() -> Result<(), Box<dyn std::error::Error>> {
//! let llm = OpenAI::default();
//! let prompt = HumanMessagePromptTemplate::new("Hello, {name}!".into());
//! let chain = LLMChainBuilder::new().prompt(prompt).llm(llm).build()?;
//! let out = chain.invoke(prompt_args! { "name" => "Rust" }).await?;
//! # Ok(()) }
//! ```
//!
//! See the [repository](https://github.com/Colin4k1024/Oris) and [examples](https://github.com/Colin4k1024/Oris/tree/main/examples) for more.
//!
//! ## Stable API (0.1.x)
//!
//! The following modules are the **stable surface**; we avoid breaking changes to their public paths in 0.1.x:
//!
//! - **[graph](graph)** — State graphs, execution, persistence, interrupts. Use `graph::StateGraph`, `graph::MessagesState`, checkpointer, and interrupt/resume.
//! - **[agent](agent)** — Agent loop, tools, Deep Agent (planning, skills).
//! - **[tools](tools)** — Tool trait and built-in tools.
//!
//! State types (e.g. `graph::MessagesState`) are part of the stable graph API. Other modules (chain, document_loaders, llm, rag, etc.) are building blocks and may see path or API adjustments in minor updates.
/// Agents: conversational and unified agents, tools, executor, middleware, Deep Agent. **Stable API.**
/// Agent runtime contract: proposal-only interface for external agents. Experimental API.
/// Chains: LLM, conversational, sequential, QA, SQL, RAG chains and options. Experimental API in 0.1.x.
/// Document loaders: PDF, HTML, CSV, Git, S3, and more (feature-gated). Experimental API in 0.1.x.
/// Economics layer: EVU ledger and reputation accounting. Experimental API.
/// Embedding models (OpenAI, Ollama, FastEmbed, etc.; feature-gated). Experimental API in 0.1.x.
/// Unified error types and utilities.
/// EvoKernel API: mutation, sandboxed validation, evolution memory, replay-first reuse. Experimental API.
/// Evolution network: OEN envelope and remote asset transport contracts. Experimental API.
/// Execution runtime control plane, scheduler, repositories, and compatibility re-exports.
/// Graph-aware HTTP execution server and benchmark helpers.
/// Governor: policy-only promotion, revocation, and cooldown rules. Experimental API.
/// Graph: state graphs, streaming, persistence, subgraphs, interrupts. **Stable API.**
/// Kernel API (2.0): event log, snapshot, reducer, action, step, policy, driver. Experimental API in 0.1.x.
/// Common LLM/embedding traits and config. Experimental API in 0.1.x.
/// LLM implementations: OpenAI, Claude, Ollama, Mistral, etc. (feature-gated). Experimental API in 0.1.x.
/// Memory: simple, conversational, and long-term (Deep Agent). Experimental API in 0.1.x.
/// Output parsers for chains and agents. Experimental API in 0.1.x.
/// Plugin categories and interfaces (Node, Tool, Memory, LLMAdapter, Scheduler). Experimental API in 0.1.x.
/// Prompts, templates, and message formatting. Experimental API in 0.1.x.
/// RAG: agentic, hybrid, and two-step retrieval-augmented generation. Experimental API in 0.1.x.
/// Retrievers and rerankers (feature-gated). Experimental API in 0.1.x.
/// Schemas: messages, documents, prompts, memory. Experimental API in 0.1.x.
/// Semantic routing and routing layers. Experimental API in 0.1.x.
/// Spec compiler contracts: repository-native OUSL YAML definitions. Experimental API.
/// Text splitters and code splitters (tree-sitter when enabled). Experimental API in 0.1.x.
/// Tools: command, search, Wolfram, long-term memory, etc. **Stable API.**
/// Utilities: similarity, vectors, builder, async helpers. Experimental API in 0.1.x.
/// Vector stores: pgvector, Qdrant, SQLite, SurrealDB, etc. (feature-gated). Experimental API in 0.1.x.
pub use url;
// ============================================================================
// Type Aliases for Common Type Combinations
// ============================================================================
use Arc;
use Mutex;
/// Type alias for a tool wrapped in Arc
pub type Tool = ;
/// Type alias for a list of tools
pub type Tools = ;
/// Type alias for tool context
pub type ToolContext = ;
/// Type alias for tool store
pub type ToolStore = ;
/// Type alias for agent state
pub type AgentState = ;
/// Type alias for memory
pub type Memory = ;
/// Type alias for middleware list
pub type MiddlewareList = ;
/// Type alias for message list
pub type Messages = ;
/// Type alias for embedding vector (f64)
pub type Embedding = ;
/// Type alias for embedding vector (f32)
pub type EmbeddingF32 = ;
/// Type alias for document list
pub type Documents = ;