objectiveai_sdk/lib.rs
1//! ObjectiveAI SDK for Rust.
2//!
3//! This crate provides data structures, validation, and client-side compilation
4//! for the ObjectiveAI API - a platform for scoring, ranking, and simulating
5//! preferences using swarms of agents.
6//!
7//! # Core Concepts
8//!
9//! - **Agent**: A configured instance of a single upstream language model
10//! - **Swarm**: A collection of Agents used together for voting
11//! - **Vector Completion**: Runs multiple agents to vote on responses, producing weighted scores
12//! - **Function**: A composable scoring pipeline built from Vector Completions
13//! - **Profile**: Learned weights for a Function, trained on example data
14//!
15//! # Features
16//!
17//! - `http` (default): Enables the HTTP client for making API requests
18//!
19//! # Modules
20//!
21//! - [`auth`] - API authentication types
22//! - [`agent`] - Agent definitions, configuration, and completion APIs
23//! - [`swarm`] - Swarm definitions and validation
24//! - [`error`] - Error types
25//! - [`functions`] - Function definitions, execution, and client-side compilation
26//! - [`prefixed_uuid`] - UUID utilities
27//! - [`vector`] - Vector completion APIs
28//!
29//! When the `http` feature is enabled:
30//! - [`HttpClient`] - HTTP client for API requests
31//! - [`HttpError`] - HTTP error types
32
33pub mod agent;
34pub mod arbitrary_util;
35pub mod auth;
36pub mod swarm;
37pub mod error;
38pub mod functions;
39pub mod laboratories;
40mod json_schema;
41pub use json_schema::*;
42pub mod prefixed_uuid;
43mod remote;
44pub(crate) mod serde_util;
45pub mod vector;
46mod weights;
47mod util;
48
49pub use remote::*;
50pub use weights::*;
51
52#[cfg(test)]
53mod serde_util_tests;
54#[cfg(test)]
55mod tests;
56
57#[cfg(test)]
58mod test_util;
59
60#[cfg(feature = "filesystem")]
61pub mod filesystem;
62
63#[cfg(feature = "http")]
64mod http;
65
66#[cfg(feature = "http")]
67pub use http::*;
68
69#[cfg(feature = "mcp")]
70pub mod mcp;
71
72#[cfg(feature = "cli")]
73pub mod cli;
74
75#[cfg(feature = "viewer")]
76pub mod viewer;
77