pub struct Client { /* private fields */ }Expand description
Client for Compose Memory
Standalone Compose Memory contract. This SDK surface is intentionally independent from agent/workflow execution so any external application or autonomous agent can integrate compact pre-turn recall, post-turn memory persistence, explicit durable memory, vector recall, transcripts, layered search, and stats without adopting the rest of the manowar SDK.
Version: 0.8.6
Implementations§
Source§impl Client
impl Client
Sourcepub fn new(baseurl: &str) -> Self
pub fn new(baseurl: &str) -> Self
Create a new client.
baseurl is the base URL provided to the internal
reqwest::Client, and should include a scheme and hostname,
as well as port and a path stem if applicable.
Sourcepub fn new_with_client(baseurl: &str, client: Client) -> Self
pub fn new_with_client(baseurl: &str, client: Client) -> Self
Construct a new client with an existing reqwest::Client,
allowing more control over its configuration.
baseurl is the base URL provided to the internal
reqwest::Client, and should include a scheme and hostname,
as well as port and a path stem if applicable.
Source§impl Client
impl Client
Sourcepub fn graph_add(&self) -> GraphAdd<'_>
pub fn graph_add(&self) -> GraphAdd<'_>
Add graph memory through the configured graph provider
Sends a POST request to /api/memory/add
let response = client.graph_add()
.body(body)
.send()
.await;Sourcepub fn archives_sync(&self) -> ArchivesSync<'_>
pub fn archives_sync(&self) -> ArchivesSync<'_>
Sync a memory archive to durable external storage
Sends a POST request to /api/memory/archives/{archiveId}/sync
let response = client.archives_sync()
.archive_id(archive_id)
.body(body)
.send()
.await;Sourcepub fn conflicts_resolve(&self) -> ConflictsResolve<'_>
pub fn conflicts_resolve(&self) -> ConflictsResolve<'_>
Resolve a memory conflict
Sends a POST request to /api/memory/conflicts/{id}/resolve
let response = client.conflicts_resolve()
.id(id)
.body(body)
.send()
.await;Sourcepub fn context_assemble(&self) -> ContextAssemble<'_>
pub fn context_assemble(&self) -> ContextAssemble<'_>
Assemble compact pre-turn memory context
Agent-first memory loop step. Call before reasoning or tool use. Returns a compact prompt and structured memory items across working, scene, graph, patterns, archives, and vectors.
Sends a POST request to /api/memory/context/assemble
let response = client.context_assemble()
.body(body)
.send()
.await;Sourcepub fn evals_run(&self) -> EvalsRun<'_>
pub fn evals_run(&self) -> EvalsRun<'_>
Run a memory retrieval evaluation
Sends a POST request to /api/memory/evals/runs
let response = client.evals_run()
.body(body)
.send()
.await;Sourcepub fn items_search(&self) -> ItemsSearch<'_>
pub fn items_search(&self) -> ItemsSearch<'_>
Search productized memory items across layers
Sends a POST request to /api/memory/items/search
let response = client.items_search()
.body(body)
.send()
.await;Sourcepub fn items_get(&self) -> ItemsGet<'_>
pub fn items_get(&self) -> ItemsGet<'_>
Fetch one durable memory item
Sends a GET request to /api/memory/items/{id}
let response = client.items_get()
.id(id)
.agent_wallet(agent_wallet)
.user_address(user_address)
.send()
.await;Sourcepub fn items_delete(&self) -> ItemsDelete<'_>
pub fn items_delete(&self) -> ItemsDelete<'_>
Delete or soft-delete one durable memory item
Sends a DELETE request to /api/memory/items/{id}
let response = client.items_delete()
.id(id)
.agent_wallet(agent_wallet)
.hard_delete(hard_delete)
.user_address(user_address)
.send()
.await;Sourcepub fn items_update(&self) -> ItemsUpdate<'_>
pub fn items_update(&self) -> ItemsUpdate<'_>
Update one durable memory item
Sends a PATCH request to /api/memory/items/{id}
let response = client.items_update()
.id(id)
.body(body)
.send()
.await;Sourcepub fn jobs_create(&self) -> JobsCreate<'_>
pub fn jobs_create(&self) -> JobsCreate<'_>
Run a memory maintenance job
Sends a POST request to /api/memory/jobs
let response = client.jobs_create()
.body(body)
.send()
.await;Sourcepub fn jobs_get(&self) -> JobsGet<'_>
pub fn jobs_get(&self) -> JobsGet<'_>
Fetch a memory maintenance job
Sends a GET request to /api/memory/jobs/{jobId}
let response = client.jobs_get()
.job_id(job_id)
.send()
.await;Sourcepub fn layers_search(&self) -> LayersSearch<'_>
pub fn layers_search(&self) -> LayersSearch<'_>
Search all memory layers
Sends a POST request to /api/memory/layers/search
let response = client.layers_search()
.body(body)
.send()
.await;Sourcepub fn loop_(&self) -> Loop<'_>
pub fn loop_(&self) -> Loop<'_>
Single endpoint for the agent memory loop
Minimal-token agent surface. Set step to pre_turn, post_turn, or
remember; each response returns the next valid loop steps.
Sends a POST request to /api/memory/loop
let response = client.loop_()
.body(body)
.send()
.await;Sourcepub fn loops_list(&self) -> LoopsList<'_>
pub fn loops_list(&self) -> LoopsList<'_>
List compact agent-first memory loop manifests
Sends a GET request to /api/memory/loops
let response = client.loops_list()
.send()
.await;Sourcepub fn loops_get(&self) -> LoopsGet<'_>
pub fn loops_get(&self) -> LoopsGet<'_>
Fetch one compact memory loop manifest
Sends a GET request to /api/memory/loops/{loopId}
let response = client.loops_get()
.loop_id(loop_id)
.send()
.await;Sourcepub fn patterns_list(&self) -> PatternsList<'_>
pub fn patterns_list(&self) -> PatternsList<'_>
List learned procedural memory patterns
Sends a GET request to /api/memory/patterns
let response = client.patterns_list()
.agent_wallet(agent_wallet)
.limit(limit)
.min_success_rate(min_success_rate)
.pattern_type(pattern_type)
.send()
.await;Sourcepub fn patterns_get(&self) -> PatternsGet<'_>
pub fn patterns_get(&self) -> PatternsGet<'_>
Fetch one procedural memory pattern
Sends a GET request to /api/memory/patterns/{patternId}
let response = client.patterns_get()
.pattern_id(pattern_id)
.agent_wallet(agent_wallet)
.send()
.await;Sourcepub fn patterns_promote(&self) -> PatternsPromote<'_>
pub fn patterns_promote(&self) -> PatternsPromote<'_>
Promote a validated procedural pattern into a learned skill
Sends a POST request to /api/memory/patterns/{patternId}/promote
let response = client.patterns_promote()
.pattern_id(pattern_id)
.body(body)
.send()
.await;Sourcepub fn patterns_validate(&self) -> PatternsValidate<'_>
pub fn patterns_validate(&self) -> PatternsValidate<'_>
Validate a procedural memory pattern before promotion
Sends a POST request to /api/memory/patterns/{patternId}/validate
let response = client.patterns_validate()
.pattern_id(pattern_id)
.send()
.await;Sourcepub fn remember(&self) -> Remember<'_>
pub fn remember(&self) -> Remember<'_>
Save an explicit durable fact or preference
Agent-first memory loop step. Call when the agent identifies a durable fact, preference, correction, decision, or operational lesson.
Sends a POST request to /api/memory/remember
let response = client.remember()
.body(body)
.send()
.await;Sourcepub fn rerank(&self) -> Rerank<'_>
pub fn rerank(&self) -> Rerank<'_>
Rerank candidate memory documents
Sends a POST request to /api/memory/rerank
let response = client.rerank()
.body(body)
.send()
.await;Sourcepub fn schedules_list(&self) -> SchedulesList<'_>
pub fn schedules_list(&self) -> SchedulesList<'_>
List Temporal memory schedule status
Sends a GET request to /api/memory/schedules
let response = client.schedules_list()
.agent_wallets(agent_wallets)
.send()
.await;Sourcepub fn schedules_create(&self) -> SchedulesCreate<'_>
pub fn schedules_create(&self) -> SchedulesCreate<'_>
Create or replace memory maintenance schedules
Sends a POST request to /api/memory/schedules
let response = client.schedules_create()
.body(body)
.send()
.await;Sourcepub fn schedules_delete(&self) -> SchedulesDelete<'_>
pub fn schedules_delete(&self) -> SchedulesDelete<'_>
Delete memory maintenance schedules
Sends a DELETE request to /api/memory/schedules
let response = client.schedules_delete()
.agent_wallets(agent_wallets)
.send()
.await;Sourcepub fn schedules_pause(&self) -> SchedulesPause<'_>
pub fn schedules_pause(&self) -> SchedulesPause<'_>
Pause one memory maintenance schedule
Sends a POST request to /api/memory/schedules/{scheduleId}/pause
let response = client.schedules_pause()
.schedule_id(schedule_id)
.send()
.await;Sourcepub fn schedules_resume(&self) -> SchedulesResume<'_>
pub fn schedules_resume(&self) -> SchedulesResume<'_>
Resume one memory maintenance schedule
Sends a POST request to /api/memory/schedules/{scheduleId}/resume
let response = client.schedules_resume()
.schedule_id(schedule_id)
.send()
.await;Sourcepub fn schedules_trigger(&self) -> SchedulesTrigger<'_>
pub fn schedules_trigger(&self) -> SchedulesTrigger<'_>
Trigger one memory maintenance schedule immediately
Sends a POST request to /api/memory/schedules/{scheduleId}/trigger
let response = client.schedules_trigger()
.schedule_id(schedule_id)
.send()
.await;Sourcepub fn graph_search(&self) -> GraphSearch<'_>
pub fn graph_search(&self) -> GraphSearch<'_>
Search graph memory through the configured graph provider
Sends a POST request to /api/memory/search
let response = client.graph_search()
.body(body)
.send()
.await;Sourcepub fn sessions_compress(&self) -> SessionsCompress<'_>
pub fn sessions_compress(&self) -> SessionsCompress<'_>
Compress a long transcript into durable archive memory
Sends a POST request to /api/memory/sessions/{sessionId}/compress
let response = client.sessions_compress()
.session_id(session_id)
.body(body)
.send()
.await;Sourcepub fn sessions_working_get(&self) -> SessionsWorkingGet<'_>
pub fn sessions_working_get(&self) -> SessionsWorkingGet<'_>
Fetch hot working memory for a session
Sends a GET request to /api/memory/sessions/{sessionId}/working
let response = client.sessions_working_get()
.session_id(session_id)
.agent_wallet(agent_wallet)
.send()
.await;Sourcepub fn sessions_working_update(&self) -> SessionsWorkingUpdate<'_>
pub fn sessions_working_update(&self) -> SessionsWorkingUpdate<'_>
Update hot working memory for a session
Sends a PATCH request to /api/memory/sessions/{sessionId}/working
let response = client.sessions_working_update()
.session_id(session_id)
.body(body)
.send()
.await;Sourcepub fn skills_list(&self) -> SkillsList<'_>
pub fn skills_list(&self) -> SkillsList<'_>
List learned memory skills
Sends a GET request to /api/memory/skills
let response = client.skills_list()
.agent_wallet(agent_wallet)
.category(category)
.limit(limit)
.send()
.await;Sourcepub fn skills_get(&self) -> SkillsGet<'_>
pub fn skills_get(&self) -> SkillsGet<'_>
Fetch one learned memory skill
Sends a GET request to /api/memory/skills/{skillId}
let response = client.skills_get()
.skill_id(skill_id)
.agent_wallet(agent_wallet)
.send()
.await;Sourcepub fn stats_get(&self) -> StatsGet<'_>
pub fn stats_get(&self) -> StatsGet<'_>
Get memory statistics for an agent wallet
Sends a GET request to /api/memory/stats/{agentWallet}
let response = client.stats_get()
.agent_wallet(agent_wallet)
.send()
.await;Sourcepub fn transcript_get(&self) -> TranscriptGet<'_>
pub fn transcript_get(&self) -> TranscriptGet<'_>
Fetch a transcript by session or thread id
Sends a GET request to /api/memory/transcript-get/{id}
let response = client.transcript_get()
.id(id)
.agent_wallet(agent_wallet)
.type_(type_)
.user_address(user_address)
.send()
.await;Sourcepub fn transcript_store(&self) -> TranscriptStore<'_>
pub fn transcript_store(&self) -> TranscriptStore<'_>
Store a session transcript
Sends a POST request to /api/memory/transcript-store
let response = client.transcript_store()
.body(body)
.send()
.await;Sourcepub fn transcripts_index(&self) -> TranscriptsIndex<'_>
pub fn transcripts_index(&self) -> TranscriptsIndex<'_>
Store, index, and optionally update working memory from a transcript
Sends a POST request to /api/memory/transcripts/index
let response = client.transcripts_index()
.body(body)
.send()
.await;Sourcepub fn turn_record(&self) -> TurnRecord<'_>
pub fn turn_record(&self) -> TurnRecord<'_>
Persist the completed turn
Agent-first memory loop step. Call after the assistant final answer to store transcript, working memory, and vector memory for later retrieval.
Sends a POST request to /api/memory/turns/record
let response = client.turn_record()
.body(body)
.send()
.await;Sourcepub fn vector_index(&self) -> VectorIndex<'_>
pub fn vector_index(&self) -> VectorIndex<'_>
Index a memory vector
Sends a POST request to /api/memory/vector-index
let response = client.vector_index()
.body(body)
.send()
.await;Sourcepub fn vector_search(&self) -> VectorSearch<'_>
pub fn vector_search(&self) -> VectorSearch<'_>
Search vector memory
Sends a POST request to /api/memory/vector-search
let response = client.vector_search()
.body(body)
.send()
.await;