agentai_core/lib.rs
1//! # AgentAI Core
2//!
3//! Shared building blocks of the [AgentAI](https://crates.io/crates/agentai) crates.
4//!
5//! - [`message`] and [`prompt`]: the conversation types (`Message`, `Part`, `Media`,
6//! `ToolOutput`, `Prompt`, ...), re-exported by `agentai`.
7//! - [`storage`]: [`MediaStorage`](storage::MediaStorage) (`MediaRead` + `MediaSave`), a
8//! blob storage for images and other files, with [`MemoryStorage`](storage::MemoryStorage).
9//! - HTTP: the [`HttpClient`] trait hides the HTTP stack, so crates such as `agentai-image` send
10//! their requests without depending on a particular client. [`ReqwestClient`] implements it
11//! with `reqwest`; another environment (for example WebAssembly) can provide its own.
12//! - [`tls`]: the TLS backend is chosen with the `rustls-ring` (default), `rustls-aws-lc` and
13//! `native-tls` features.
14//!
15//! ## Features
16#![doc = document_features::document_features!()]
17
18#[cfg(all(
19 feature = "native-tls",
20 any(feature = "rustls-ring", feature = "rustls-aws-lc")
21))]
22compile_error!(
23 "agentai: `native-tls` cannot be combined with `rustls-ring` or `rustls-aws-lc`. \
24 To use native-tls, set `default-features = false` and enable `native-tls`."
25);
26
27mod http;
28pub mod message;
29pub mod prompt;
30pub mod storage;
31pub mod tls;
32
33pub use http::*;