pub struct Client {
pub auth: AuthClient,
pub core: CoreClient,
/* private fields */
}Fields§
§auth: AuthClient§core: CoreClientImplementations§
Source§impl Client
impl Client
pub fn new(config: ClientConfig) -> Result<Self>
Sourcepub fn advanced(&self) -> &AdvancedClient
pub fn advanced(&self) -> &AdvancedClient
Raw low-level control-plane surface. Every operation takes a free-form
serializable payload and returns raw JSON — the same ops that used to
be flattened onto Client directly (those flat delegates are now
deprecated in favour of this namespace). The ~24 typed helpers
(remember, recall, handoff, …) stay on Client.
pub fn set_api_key(&self, api_key: Option<String>)
pub fn set_token(&self, token: Option<String>)
pub fn set_run_id(&self, run_id: Option<String>)
pub fn set_transport(&self, transport: TransportMode)
Sourcepub fn run_scope(&self, run_id: impl Into<String>) -> RunScope
pub fn run_scope(&self, run_id: impl Into<String>) -> RunScope
Run-scope sugar: set the client’s ambient run id (the same mechanism
that auto-injects run_id into every operation with a run_id field)
and restore the previous run id when the returned RunScope guard
drops. For explicit reflection at the end of the scope, call
RunScope::end_with_reflect instead of letting the guard drop (no
async work happens in Drop).
{
let _scope = client.run_scope("ticket-4711");
client.remember(RememberBuilder::new("...").build()).await?;
} // previous run id restored hereSource§impl Client
impl Client
pub async fn remember(&self, options: RememberOptions) -> Result<Value>
pub async fn recall(&self, options: RecallOptions) -> Result<Value>
pub async fn get_context(&self, options: GetContextOptions) -> Result<Value>
pub async fn archive(&self, options: ArchiveOptions) -> Result<Value>
pub async fn archive_block(&self, options: ArchiveOptions) -> Result<Value>
pub async fn dereference(&self, options: DereferenceOptions) -> Result<Value>
pub async fn memory_health(&self, options: MemoryHealthOptions) -> Result<Value>
pub async fn diagnose(&self, options: DiagnoseOptions) -> Result<Value>
pub async fn reflect(&self, options: ReflectOptions) -> Result<Value>
pub async fn forget(&self, options: ForgetOptions) -> Result<Value>
pub async fn checkpoint(&self, options: CheckpointOptions) -> Result<Value>
pub async fn register_agent( &self, options: RegisterAgentOptions, ) -> Result<Value>
pub async fn list_agents(&self, options: ListAgentsOptions) -> Result<Value>
pub async fn record_outcome( &self, options: RecordOutcomeOptions, ) -> Result<Value>
pub async fn learned(&self, options: LearnedOptions) -> Result<Value>
Sourcepub async fn optimize_prompt(
&self,
options: OptimizePromptOptions,
) -> Result<Value>
pub async fn optimize_prompt( &self, options: OptimizePromptOptions, ) -> Result<Value>
Phase 2.4: generate a challenger prompt version from accumulated
lessons and outcome stats. The server never auto-activates unless
auto_activate=true explicitly; by default the challenger surfaces
via the champion/challenger evaluator (Phase 1.1) with
ready_for_promotion=true once it outperforms the active version.
Sourcepub async fn optimize_skill(
&self,
options: OptimizeSkillOptions,
) -> Result<Value>
pub async fn optimize_skill( &self, options: OptimizeSkillOptions, ) -> Result<Value>
Phase 2.4: skill-version analogue of optimize_prompt.
Sourcepub async fn circuit_break(&self, options: CircuitBreakOptions) -> Result<Value>
pub async fn circuit_break(&self, options: CircuitBreakOptions) -> Result<Value>
Phase 1.5: atomic anti-loop reset. Snapshots working memory to LTM as
a loop_detected lesson, clears working memory, resets the drift
monitor state, and emits a CIRCUIT_BROKEN event. Customers should
invoke this after observing signals.repeated == true (or stagnant /
drifting) on a recall response.
pub async fn record_step_outcome( &self, options: RecordStepOutcomeOptions, ) -> Result<Value>
pub async fn surface_strategies( &self, options: SurfaceStrategiesOptions, ) -> Result<Value>
Sourcepub async fn handoff(&self, options: HandoffOptions) -> Result<Value>
pub async fn handoff(&self, options: HandoffOptions) -> Result<Value>
Hand a task off to another agent.
With await_verdict = true, polls (2s interval) for a feedback entry
referencing the new handoff_id and returns the verdict
(“approve” | “request_changes” | “block” | “acknowledge”) as
Value::String — or Value::Null when timeout_s (default 30)
elapses without a verdict. Without it, returns the handoff response
as before.
Sourcepub async fn receive_handoffs(
&self,
options: ReceiveHandoffsOptions,
) -> Result<Vec<ReceivedHandoff>>
pub async fn receive_handoffs( &self, options: ReceiveHandoffsOptions, ) -> Result<Vec<ReceivedHandoff>>
Receiver-side handoff inbox.
Implemented client-side over query with entry_types = ["handoff"]
(evidence only, no LLM synthesis) and filtered to evidence whose
metadata addresses to_agent_id == agent_id. Each match is returned
as a ReceivedHandoff wrapper around the raw evidence item.
pub async fn feedback(&self, options: FeedbackOptions) -> Result<Value>
Source§impl Client
impl Client
pub async fn agent_heartbeat<T: Serialize>(&self, payload: T) -> Result<Value>
raw control ops moved to client.advanced().<op>(payload) — the flat Client delegate will be removed in a future major release
pub async fn context_snapshot<T: Serialize>(&self, payload: T) -> Result<Value>
raw control ops moved to client.advanced().<op>(payload) — the flat Client delegate will be removed in a future major release
pub async fn link_run<T: Serialize>(&self, payload: T) -> Result<Value>
raw control ops moved to client.advanced().<op>(payload) — the flat Client delegate will be removed in a future major release
pub async fn unlink_run<T: Serialize>(&self, payload: T) -> Result<Value>
raw control ops moved to client.advanced().<op>(payload) — the flat Client delegate will be removed in a future major release
pub async fn ingest<T: Serialize>(&self, payload: T) -> Result<Value>
raw control ops moved to client.advanced().<op>(payload) — the flat Client delegate will be removed in a future major release
pub async fn batch_insert<T: Serialize>(&self, payload: T) -> Result<Value>
raw control ops moved to client.advanced().<op>(payload) — the flat Client delegate will be removed in a future major release
pub async fn get_ingest_job<T: Serialize>(&self, payload: T) -> Result<Value>
raw control ops moved to client.advanced().<op>(payload) — the flat Client delegate will be removed in a future major release
pub async fn get_run_ingest_stats<T: Serialize>( &self, payload: T, ) -> Result<Value>
raw control ops moved to client.advanced().<op>(payload) — the flat Client delegate will be removed in a future major release
pub async fn query<T: Serialize>(&self, payload: T) -> Result<Value>
raw control ops moved to client.advanced().<op>(payload) — the flat Client delegate will be removed in a future major release
pub async fn delete_run<T: Serialize>(&self, payload: T) -> Result<Value>
raw control ops moved to client.advanced().<op>(payload) — the flat Client delegate will be removed in a future major release
pub async fn lessons<T: Serialize>(&self, payload: T) -> Result<Value>
raw control ops moved to client.advanced().<op>(payload) — the flat Client delegate will be removed in a future major release
pub async fn delete_lesson<T: Serialize>(&self, payload: T) -> Result<Value>
raw control ops moved to client.advanced().<op>(payload) — the flat Client delegate will be removed in a future major release
pub async fn context<T: Serialize>(&self, payload: T) -> Result<Value>
raw control ops moved to client.advanced().<op>(payload) — the flat Client delegate will be removed in a future major release
pub async fn create_handoff<T: Serialize>(&self, payload: T) -> Result<Value>
raw control ops moved to client.advanced().<op>(payload) — the flat Client delegate will be removed in a future major release
pub async fn submit_feedback<T: Serialize>(&self, payload: T) -> Result<Value>
raw control ops moved to client.advanced().<op>(payload) — the flat Client delegate will be removed in a future major release
pub async fn create_session<T: Serialize>(&self, payload: T) -> Result<Value>
raw control ops moved to client.advanced().<op>(payload) — the flat Client delegate will be removed in a future major release
pub async fn get_session<T: Serialize>(&self, payload: T) -> Result<Value>
raw control ops moved to client.advanced().<op>(payload) — the flat Client delegate will be removed in a future major release
pub async fn close_session<T: Serialize>(&self, payload: T) -> Result<Value>
raw control ops moved to client.advanced().<op>(payload) — the flat Client delegate will be removed in a future major release
pub async fn set_prompt<T: Serialize>(&self, payload: T) -> Result<Value>
raw control ops moved to client.advanced().<op>(payload) — the flat Client delegate will be removed in a future major release
pub async fn get_prompt<T: Serialize>(&self, payload: T) -> Result<Value>
raw control ops moved to client.advanced().<op>(payload) — the flat Client delegate will be removed in a future major release
pub async fn list_prompt_versions<T: Serialize>( &self, payload: T, ) -> Result<Value>
raw control ops moved to client.advanced().<op>(payload) — the flat Client delegate will be removed in a future major release
pub async fn activate_prompt_version<T: Serialize>( &self, payload: T, ) -> Result<Value>
raw control ops moved to client.advanced().<op>(payload) — the flat Client delegate will be removed in a future major release
pub async fn get_prompt_diff<T: Serialize>(&self, payload: T) -> Result<Value>
raw control ops moved to client.advanced().<op>(payload) — the flat Client delegate will be removed in a future major release
pub async fn create_project<T: Serialize>(&self, payload: T) -> Result<Value>
raw control ops moved to client.advanced().<op>(payload) — the flat Client delegate will be removed in a future major release
pub async fn get_project<T: Serialize>(&self, payload: T) -> Result<Value>
raw control ops moved to client.advanced().<op>(payload) — the flat Client delegate will be removed in a future major release
pub async fn list_projects<T: Serialize>(&self, payload: T) -> Result<Value>
raw control ops moved to client.advanced().<op>(payload) — the flat Client delegate will be removed in a future major release
pub async fn update_project<T: Serialize>(&self, payload: T) -> Result<Value>
raw control ops moved to client.advanced().<op>(payload) — the flat Client delegate will be removed in a future major release
pub async fn delete_project<T: Serialize>(&self, payload: T) -> Result<Value>
raw control ops moved to client.advanced().<op>(payload) — the flat Client delegate will be removed in a future major release
pub async fn create_agent_definition<T: Serialize>( &self, payload: T, ) -> Result<Value>
raw control ops moved to client.advanced().<op>(payload) — the flat Client delegate will be removed in a future major release
pub async fn get_agent_definition<T: Serialize>( &self, payload: T, ) -> Result<Value>
raw control ops moved to client.advanced().<op>(payload) — the flat Client delegate will be removed in a future major release
pub async fn list_agent_definitions<T: Serialize>( &self, payload: T, ) -> Result<Value>
raw control ops moved to client.advanced().<op>(payload) — the flat Client delegate will be removed in a future major release
pub async fn update_agent_definition<T: Serialize>( &self, payload: T, ) -> Result<Value>
raw control ops moved to client.advanced().<op>(payload) — the flat Client delegate will be removed in a future major release
pub async fn delete_agent_definition<T: Serialize>( &self, payload: T, ) -> Result<Value>
raw control ops moved to client.advanced().<op>(payload) — the flat Client delegate will be removed in a future major release
pub async fn list_run_history<T: Serialize>(&self, payload: T) -> Result<Value>
raw control ops moved to client.advanced().<op>(payload) — the flat Client delegate will be removed in a future major release
pub async fn get_run_history<T: Serialize>(&self, payload: T) -> Result<Value>
raw control ops moved to client.advanced().<op>(payload) — the flat Client delegate will be removed in a future major release
pub async fn create_skill<T: Serialize>(&self, payload: T) -> Result<Value>
raw control ops moved to client.advanced().<op>(payload) — the flat Client delegate will be removed in a future major release
pub async fn get_skill<T: Serialize>(&self, payload: T) -> Result<Value>
raw control ops moved to client.advanced().<op>(payload) — the flat Client delegate will be removed in a future major release
pub async fn list_skills<T: Serialize>(&self, payload: T) -> Result<Value>
raw control ops moved to client.advanced().<op>(payload) — the flat Client delegate will be removed in a future major release
pub async fn update_skill<T: Serialize>(&self, payload: T) -> Result<Value>
raw control ops moved to client.advanced().<op>(payload) — the flat Client delegate will be removed in a future major release
pub async fn delete_skill<T: Serialize>(&self, payload: T) -> Result<Value>
raw control ops moved to client.advanced().<op>(payload) — the flat Client delegate will be removed in a future major release
pub async fn list_skill_versions<T: Serialize>( &self, payload: T, ) -> Result<Value>
raw control ops moved to client.advanced().<op>(payload) — the flat Client delegate will be removed in a future major release
pub async fn activate_skill_version<T: Serialize>( &self, payload: T, ) -> Result<Value>
raw control ops moved to client.advanced().<op>(payload) — the flat Client delegate will be removed in a future major release
pub async fn get_skill_diff<T: Serialize>(&self, payload: T) -> Result<Value>
raw control ops moved to client.advanced().<op>(payload) — the flat Client delegate will be removed in a future major release
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Client
impl !UnwindSafe for Client
impl Freeze for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnsafeUnpin for Client
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request