Skip to main content

AgentOvenClient

Struct AgentOvenClient 

Source
pub struct AgentOvenClient { /* private fields */ }
Expand description

Client for interacting with the AgentOven control plane.

Implementations§

Source§

impl AgentOvenClient

Source

pub fn new(base_url: &str) -> Result<Self>

Create a new client connected to the control plane.

Source

pub fn from_env() -> Result<Self>

Create from config file + environment variables.

Priority: CLI flags > env vars > ~/.agentoven/config.toml > defaults.

Source

pub fn from_config(cfg: &AgentOvenConfig) -> Result<Self>

Create from an explicit config struct (no env-var lookup).

Source

pub fn with_api_key(self, key: impl Into<String>) -> Self

Set API key.

Source

pub fn with_kitchen(self, kitchen_id: impl Into<String>) -> Self

Set the active kitchen (workspace).

Source

pub async fn register(&self, agent: &Agent) -> Result<Agent>

Register a new agent in the oven (menu).

Sends only the user-provided fields; server-managed fields (id, status, kitchen, timestamps, a2a_endpoint) are set server-side.

Source

pub async fn get_agent( &self, name: &str, version: Option<&str>, ) -> Result<Agent>

Get an agent by name and optional version.

Source

pub async fn list_agents(&self) -> Result<Vec<Agent>>

List all agents in the current kitchen.

Source

pub async fn bake(&self, agent: &Agent, environment: &str) -> Result<Agent>

Bake (deploy) an agent to an environment.

Source

pub async fn rewarm(&self, name: &str) -> Result<Value>

Rewarm a cooled agent (transition back to ready).

Source

pub async fn create_recipe(&self, recipe: &Recipe) -> Result<Recipe>

Create a new recipe (workflow).

Source

pub async fn bake_recipe( &self, recipe_name: &str, input: Value, ) -> Result<Value>

Bake (execute) a recipe with input.

Source

pub async fn update_agent(&self, name: &str, updates: Value) -> Result<Agent>

Update an existing agent.

Source

pub async fn delete_agent(&self, name: &str) -> Result<()>

Delete an agent.

Source

pub async fn recook_agent(&self, name: &str, edits: Value) -> Result<Value>

Re-cook an agent with edits.

Source

pub async fn cool_agent(&self, name: &str) -> Result<Value>

Cool (pause) an agent.

Source

pub async fn retire_agent(&self, name: &str) -> Result<Value>

Retire an agent permanently.

Source

pub async fn test_agent( &self, name: &str, message: &str, thinking: bool, ) -> Result<Value>

Test an agent (one-shot, via /test endpoint).

Source

pub async fn invoke_agent( &self, name: &str, message: &str, variables: Option<Value>, thinking: bool, ) -> Result<Value>

Invoke a managed agent (full agentic loop with execution trace).

Source

pub async fn agent_config(&self, name: &str) -> Result<Value>

Get the resolved configuration for a baked agent.

Source

pub async fn agent_card(&self, name: &str) -> Result<Value>

Get the A2A Agent Card for an agent.

Source

pub async fn agent_versions(&self, name: &str) -> Result<Vec<Value>>

List version history for an agent.

Source

pub async fn list_providers(&self) -> Result<Vec<Value>>

List all model providers.

Source

pub async fn add_provider(&self, provider: Value) -> Result<Value>

Add a new model provider.

Source

pub async fn get_provider(&self, name: &str) -> Result<Value>

Get a specific model provider.

Source

pub async fn update_provider( &self, name: &str, provider: Value, ) -> Result<Value>

Update a model provider.

Source

pub async fn delete_provider(&self, name: &str) -> Result<()>

Delete a model provider.

Source

pub async fn test_provider(&self, name: &str) -> Result<Value>

Test a provider’s connectivity and credentials.

Source

pub async fn discover_provider(&self, name: &str) -> Result<Value>

Discover models available from a provider.

Source

pub async fn list_tools(&self) -> Result<Vec<Value>>

List all MCP tools.

Source

pub async fn add_tool(&self, tool: Value) -> Result<Value>

Add a new MCP tool.

Source

pub async fn bulk_add_tools(&self, payload: Value) -> Result<Value>

Bulk-add multiple MCP tools in one request.

Source

pub async fn get_tool(&self, name: &str) -> Result<Value>

Get a specific tool.

Source

pub async fn update_tool(&self, name: &str, tool: Value) -> Result<Value>

Update a tool.

Source

pub async fn delete_tool(&self, name: &str) -> Result<()>

Delete a tool.

Source

pub async fn list_prompts(&self) -> Result<Vec<Value>>

List all prompt templates.

Source

pub async fn add_prompt(&self, prompt: Value) -> Result<Value>

Add a new prompt template.

Source

pub async fn get_prompt(&self, name: &str) -> Result<Value>

Get a specific prompt template.

Source

pub async fn update_prompt(&self, name: &str, prompt: Value) -> Result<Value>

Update a prompt template.

Source

pub async fn delete_prompt(&self, name: &str) -> Result<()>

Delete a prompt template.

Source

pub async fn validate_prompt(&self, name: &str) -> Result<Value>

Validate a prompt template.

Source

pub async fn prompt_versions(&self, name: &str) -> Result<Vec<Value>>

List version history for a prompt.

Source

pub async fn list_kitchens(&self) -> Result<Vec<Value>>

List all kitchens.

Source

pub async fn get_kitchen(&self, id: &str) -> Result<Value>

Get a specific kitchen.

Source

pub async fn create_kitchen(&self, kitchen: Value) -> Result<Value>

Create a new kitchen.

Source

pub async fn delete_kitchen(&self, id: &str) -> Result<()>

Delete a kitchen.

Source

pub async fn server_info(&self) -> Result<Value>

Get server info (edition, features, limits). The CLI calls this to discover what commands are available.

Source

pub async fn get_settings(&self) -> Result<Value>

Get kitchen settings.

Source

pub async fn update_settings(&self, settings: Value) -> Result<Value>

Update kitchen settings.

Source

pub async fn list_sessions(&self, agent_name: &str) -> Result<Vec<Value>>

List sessions for an agent.

Source

pub async fn create_session(&self, agent_name: &str) -> Result<Value>

Create a new session for an agent.

Source

pub async fn get_session( &self, agent_name: &str, session_id: &str, ) -> Result<Value>

Get a specific session.

Source

pub async fn delete_session( &self, agent_name: &str, session_id: &str, ) -> Result<()>

Delete a session.

Source

pub async fn send_session_message( &self, agent_name: &str, session_id: &str, message: &str, thinking: bool, ) -> Result<Value>

Send a message within a session.

Source

pub async fn rag_query(&self, query: Value) -> Result<Value>

Query the RAG pipeline.

Source

pub async fn rag_ingest(&self, request: Value) -> Result<Value>

Ingest documents into the RAG pipeline.

Source

pub async fn list_traces( &self, agent: Option<&str>, limit: u32, ) -> Result<Vec<Value>>

List recent traces.

Source

pub async fn get_trace(&self, trace_id: &str) -> Result<Value>

Get a specific trace.

Source

pub async fn model_catalog(&self) -> Result<Vec<Value>>

List model catalog.

Source

pub async fn catalog_refresh(&self) -> Result<Value>

Refresh model catalog from providers.

Source

pub async fn model_cost(&self) -> Result<Value>

Get cost summary.

Source

pub async fn get_recipe(&self, name: &str) -> Result<Value>

Get a specific recipe.

Source

pub async fn list_recipes(&self) -> Result<Vec<Value>>

List all recipes.

Source

pub async fn delete_recipe(&self, name: &str) -> Result<()>

Delete a recipe.

Source

pub async fn recipe_runs(&self, name: &str) -> Result<Vec<Value>>

List runs for a recipe.

Source

pub async fn approve_gate( &self, recipe: &str, run_id: &str, step_name: &str, approved: bool, comment: Option<&str>, ) -> Result<Value>

Approve a human gate in a recipe run.

Source

pub async fn list_audit(&self, limit: u32) -> Result<Vec<Value>>

List audit events.

Source

pub async fn guardrail_kinds(&self) -> Result<Vec<Value>>

List available guardrail kinds.

Source

pub async fn raw_get<T: DeserializeOwned>(&self, path: &str) -> Result<T>

Generic GET that returns deserialized JSON.

Source

pub async fn raw_post<T: DeserializeOwned>( &self, path: &str, body: &Value, ) -> Result<T>

Generic POST that sends JSON and returns deserialized JSON.

Source

pub async fn raw_delete(&self, path: &str) -> Result<()>

Generic DELETE.

Trait Implementations§

Source§

impl Clone for AgentOvenClient

Source§

fn clone(&self) -> AgentOvenClient

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AgentOvenClient

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> FutureExt for T

Source§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
Source§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more