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
//! # Axonio
//!
//! Rust client for [Axonio](https://axonio.xyz): persistent memory for AI agents.
//! Formerly the `clawdb-client` crate.
//!
//! ```no_run
//! use axonio::{Axonio, SearchOptions};
//!
//! #[tokio::main]
//! async fn main() -> axonio::Result<()> {
//! // Reads AXONIO_API_KEY; an API key alone means the Axonio cloud.
//! let db = Axonio::from_env()?;
//!
//! let id = db.remember("The user prefers concise answers").await?;
//! for hit in db.search("how should I phrase answers?", SearchOptions::default()).await? {
//! println!("[{:.2}] {}", hit.score, hit.content);
//! }
//! db.delete_memory(&id).await?;
//! db.close().await;
//! Ok(())
//! }
//! ```
//!
//! For a self-hosted server use `Axonio::builder().endpoint("https://db.example.com")`
//! or set `AXONIO_URL`.
pub use AxonioBuilder;
pub use Axonio;
pub use ;
pub use ;
pub use ;
/// The crate version.
pub const VERSION: &str = env!;