Skip to main content

Crate objectiveai_sdk

Crate objectiveai_sdk 

Source
Expand description

ObjectiveAI SDK for Rust.

This crate provides data structures, validation, and client-side compilation for the ObjectiveAI API - a platform for scoring, ranking, and simulating preferences using swarms of agents.

§Core Concepts

  • Agent: A configured instance of a single upstream language model
  • Swarm: A collection of Agents used together for voting
  • Vector Completion: Runs multiple agents to vote on responses, producing weighted scores
  • Function: A composable scoring pipeline built from Vector Completions
  • Profile: Learned weights for a Function, trained on example data

§Features

  • http (default): Enables the HTTP client for making API requests

§Modules

  • auth - API authentication types
  • agent - Agent definitions, configuration, and completion APIs
  • swarm - Swarm definitions and validation
  • error - Error types
  • functions - Function definitions, execution, and client-side compilation
  • prefixed_uuid - UUID utilities
  • vector - Vector completion APIs

When the http feature is enabled:

Modules§

agent
Agent definitions, configuration, and completion API types.
arbitrary_util
Arbitrary helpers for types that don’t natively implement Arbitrary or that need bounded generation to avoid extreme values.
auth
Authentication types for the ObjectiveAI API.
error
Error types for the ObjectiveAI SDK.
filesystem
functions
Function definitions, profiles, and execution types.
laboratories
mcp
prefixed_uuid
Prefixed UUID type for ObjectiveAI identifiers.
swarm
Swarm definitions and validation.
vector
Vector completion API types.

Structs§

HttpClient
HTTP client for making requests to the ObjectiveAI API.
WeightsEntry
An entry in weights with an explicit weight and optional invert flag.

Enums§

HttpError
Errors that can occur during HTTP operations.
Remote
The remote source where a function, profile, or agent is hosted.
RemotePath
RemotePathCommitOptional
Weights
Weights for a swarm’s agents.

Functions§

flatten_schema
Schema helper: produces a $ref to T for use with #[schemars(schema_with)] on #[serde(flatten)] fields, preventing schemars from merging the inner type’s schema into the parent.
json_schemas
Returns JSON Schemas for all public types that derive JsonSchema.