Module client

Module client 

Source
Expand description

HTTP client for the CELLSTATE REST API.

CellstateClient provides typed methods for all entity CRUD operations, context assembly, memory commits, and recall queries. All responses are deserialized into the corresponding types::* structs.

§Example

use cellstate::CellstateClient;
use cellstate::types::CreateTrajectoryRequest;

let client = CellstateClient::new("https://cst.batterypack.dev", "cst_your_api_key")?;

let trajectory = client.create_trajectory(&CreateTrajectoryRequest {
    name: "Research task".to_string(),
    description: Some("Investigating memory models".to_string()),
    parent_trajectory_id: None,
    agent_id: None,
    metadata: None,
}).await?;

println!("Created trajectory: {}", trajectory.trajectory_id);

Structs§

CellstateClient

Enums§

ResponseFormat
CELLSTATE API client.