pub struct AgentOvenClient { /* private fields */ }Expand description
Client for interacting with the AgentOven control plane.
Implementations§
Source§impl AgentOvenClient
impl AgentOvenClient
Sourcepub fn from_env() -> Result<Self>
pub fn from_env() -> Result<Self>
Create from config file + environment variables.
Priority: CLI flags > env vars > ~/.agentoven/config.toml > defaults.
Sourcepub fn from_config(cfg: &AgentOvenConfig) -> Result<Self>
pub fn from_config(cfg: &AgentOvenConfig) -> Result<Self>
Create from an explicit config struct (no env-var lookup).
Sourcepub fn with_api_key(self, key: impl Into<String>) -> Self
pub fn with_api_key(self, key: impl Into<String>) -> Self
Set API key.
Sourcepub fn with_kitchen(self, kitchen_id: impl Into<String>) -> Self
pub fn with_kitchen(self, kitchen_id: impl Into<String>) -> Self
Set the active kitchen (workspace).
Sourcepub async fn register(&self, agent: &Agent) -> Result<Agent>
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.
Sourcepub async fn get_agent(
&self,
name: &str,
version: Option<&str>,
) -> Result<Agent>
pub async fn get_agent( &self, name: &str, version: Option<&str>, ) -> Result<Agent>
Get an agent by name and optional version.
Sourcepub async fn list_agents(&self) -> Result<Vec<Agent>>
pub async fn list_agents(&self) -> Result<Vec<Agent>>
List all agents in the current kitchen.
Sourcepub async fn bake(&self, agent: &Agent, environment: &str) -> Result<Agent>
pub async fn bake(&self, agent: &Agent, environment: &str) -> Result<Agent>
Bake (deploy) an agent to an environment.
Sourcepub async fn rewarm(&self, name: &str) -> Result<Value>
pub async fn rewarm(&self, name: &str) -> Result<Value>
Rewarm a cooled agent (transition back to ready).
Sourcepub async fn create_recipe(&self, recipe: &Recipe) -> Result<Recipe>
pub async fn create_recipe(&self, recipe: &Recipe) -> Result<Recipe>
Create a new recipe (workflow).
Sourcepub async fn bake_recipe(
&self,
recipe_name: &str,
input: Value,
) -> Result<Value>
pub async fn bake_recipe( &self, recipe_name: &str, input: Value, ) -> Result<Value>
Bake (execute) a recipe with input.
Sourcepub async fn update_agent(&self, name: &str, updates: Value) -> Result<Agent>
pub async fn update_agent(&self, name: &str, updates: Value) -> Result<Agent>
Update an existing agent.
Sourcepub async fn delete_agent(&self, name: &str) -> Result<()>
pub async fn delete_agent(&self, name: &str) -> Result<()>
Delete an agent.
Sourcepub async fn recook_agent(&self, name: &str, edits: Value) -> Result<Value>
pub async fn recook_agent(&self, name: &str, edits: Value) -> Result<Value>
Re-cook an agent with edits.
Sourcepub async fn cool_agent(&self, name: &str) -> Result<Value>
pub async fn cool_agent(&self, name: &str) -> Result<Value>
Cool (pause) an agent.
Sourcepub async fn retire_agent(&self, name: &str) -> Result<Value>
pub async fn retire_agent(&self, name: &str) -> Result<Value>
Retire an agent permanently.
Sourcepub async fn test_agent(
&self,
name: &str,
message: &str,
thinking: bool,
) -> Result<Value>
pub async fn test_agent( &self, name: &str, message: &str, thinking: bool, ) -> Result<Value>
Test an agent (one-shot, via /test endpoint).
Sourcepub async fn invoke_agent(
&self,
name: &str,
message: &str,
variables: Option<Value>,
thinking: bool,
) -> Result<Value>
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).
Sourcepub async fn agent_config(&self, name: &str) -> Result<Value>
pub async fn agent_config(&self, name: &str) -> Result<Value>
Get the resolved configuration for a baked agent.
Sourcepub async fn agent_card(&self, name: &str) -> Result<Value>
pub async fn agent_card(&self, name: &str) -> Result<Value>
Get the A2A Agent Card for an agent.
Sourcepub async fn agent_versions(&self, name: &str) -> Result<Vec<Value>>
pub async fn agent_versions(&self, name: &str) -> Result<Vec<Value>>
List version history for an agent.
Sourcepub async fn list_providers(&self) -> Result<Vec<Value>>
pub async fn list_providers(&self) -> Result<Vec<Value>>
List all model providers.
Sourcepub async fn add_provider(&self, provider: Value) -> Result<Value>
pub async fn add_provider(&self, provider: Value) -> Result<Value>
Add a new model provider.
Sourcepub async fn get_provider(&self, name: &str) -> Result<Value>
pub async fn get_provider(&self, name: &str) -> Result<Value>
Get a specific model provider.
Sourcepub async fn update_provider(
&self,
name: &str,
provider: Value,
) -> Result<Value>
pub async fn update_provider( &self, name: &str, provider: Value, ) -> Result<Value>
Update a model provider.
Sourcepub async fn delete_provider(&self, name: &str) -> Result<()>
pub async fn delete_provider(&self, name: &str) -> Result<()>
Delete a model provider.
Sourcepub async fn test_provider(&self, name: &str) -> Result<Value>
pub async fn test_provider(&self, name: &str) -> Result<Value>
Test a provider’s connectivity and credentials.
Sourcepub async fn discover_provider(&self, name: &str) -> Result<Value>
pub async fn discover_provider(&self, name: &str) -> Result<Value>
Discover models available from a provider.
Sourcepub async fn list_tools(&self) -> Result<Vec<Value>>
pub async fn list_tools(&self) -> Result<Vec<Value>>
List all MCP tools.
Sourcepub async fn bulk_add_tools(&self, payload: Value) -> Result<Value>
pub async fn bulk_add_tools(&self, payload: Value) -> Result<Value>
Bulk-add multiple MCP tools in one request.
Sourcepub async fn delete_tool(&self, name: &str) -> Result<()>
pub async fn delete_tool(&self, name: &str) -> Result<()>
Delete a tool.
Sourcepub async fn list_prompts(&self) -> Result<Vec<Value>>
pub async fn list_prompts(&self) -> Result<Vec<Value>>
List all prompt templates.
Sourcepub async fn add_prompt(&self, prompt: Value) -> Result<Value>
pub async fn add_prompt(&self, prompt: Value) -> Result<Value>
Add a new prompt template.
Sourcepub async fn get_prompt(&self, name: &str) -> Result<Value>
pub async fn get_prompt(&self, name: &str) -> Result<Value>
Get a specific prompt template.
Sourcepub async fn update_prompt(&self, name: &str, prompt: Value) -> Result<Value>
pub async fn update_prompt(&self, name: &str, prompt: Value) -> Result<Value>
Update a prompt template.
Sourcepub async fn delete_prompt(&self, name: &str) -> Result<()>
pub async fn delete_prompt(&self, name: &str) -> Result<()>
Delete a prompt template.
Sourcepub async fn validate_prompt(&self, name: &str) -> Result<Value>
pub async fn validate_prompt(&self, name: &str) -> Result<Value>
Validate a prompt template.
Sourcepub async fn prompt_versions(&self, name: &str) -> Result<Vec<Value>>
pub async fn prompt_versions(&self, name: &str) -> Result<Vec<Value>>
List version history for a prompt.
Sourcepub async fn list_kitchens(&self) -> Result<Vec<Value>>
pub async fn list_kitchens(&self) -> Result<Vec<Value>>
List all kitchens.
Sourcepub async fn get_kitchen(&self, id: &str) -> Result<Value>
pub async fn get_kitchen(&self, id: &str) -> Result<Value>
Get a specific kitchen.
Sourcepub async fn create_kitchen(&self, kitchen: Value) -> Result<Value>
pub async fn create_kitchen(&self, kitchen: Value) -> Result<Value>
Create a new kitchen.
Sourcepub async fn delete_kitchen(&self, id: &str) -> Result<()>
pub async fn delete_kitchen(&self, id: &str) -> Result<()>
Delete a kitchen.
Sourcepub async fn server_info(&self) -> Result<Value>
pub async fn server_info(&self) -> Result<Value>
Get server info (edition, features, limits). The CLI calls this to discover what commands are available.
Sourcepub async fn get_settings(&self) -> Result<Value>
pub async fn get_settings(&self) -> Result<Value>
Get kitchen settings.
Sourcepub async fn update_settings(&self, settings: Value) -> Result<Value>
pub async fn update_settings(&self, settings: Value) -> Result<Value>
Update kitchen settings.
Sourcepub async fn list_sessions(&self, agent_name: &str) -> Result<Vec<Value>>
pub async fn list_sessions(&self, agent_name: &str) -> Result<Vec<Value>>
List sessions for an agent.
Sourcepub async fn create_session(&self, agent_name: &str) -> Result<Value>
pub async fn create_session(&self, agent_name: &str) -> Result<Value>
Create a new session for an agent.
Sourcepub async fn get_session(
&self,
agent_name: &str,
session_id: &str,
) -> Result<Value>
pub async fn get_session( &self, agent_name: &str, session_id: &str, ) -> Result<Value>
Get a specific session.
Sourcepub async fn delete_session(
&self,
agent_name: &str,
session_id: &str,
) -> Result<()>
pub async fn delete_session( &self, agent_name: &str, session_id: &str, ) -> Result<()>
Delete a session.
Sourcepub async fn send_session_message(
&self,
agent_name: &str,
session_id: &str,
message: &str,
thinking: bool,
) -> Result<Value>
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.
Sourcepub async fn rag_ingest(&self, request: Value) -> Result<Value>
pub async fn rag_ingest(&self, request: Value) -> Result<Value>
Ingest documents into the RAG pipeline.
Sourcepub async fn list_traces(
&self,
agent: Option<&str>,
limit: u32,
) -> Result<Vec<Value>>
pub async fn list_traces( &self, agent: Option<&str>, limit: u32, ) -> Result<Vec<Value>>
List recent traces.
Sourcepub async fn model_catalog(&self) -> Result<Vec<Value>>
pub async fn model_catalog(&self) -> Result<Vec<Value>>
List model catalog.
Sourcepub async fn catalog_refresh(&self) -> Result<Value>
pub async fn catalog_refresh(&self) -> Result<Value>
Refresh model catalog from providers.
Sourcepub async fn model_cost(&self) -> Result<Value>
pub async fn model_cost(&self) -> Result<Value>
Get cost summary.
Sourcepub async fn get_recipe(&self, name: &str) -> Result<Value>
pub async fn get_recipe(&self, name: &str) -> Result<Value>
Get a specific recipe.
Sourcepub async fn list_recipes(&self) -> Result<Vec<Value>>
pub async fn list_recipes(&self) -> Result<Vec<Value>>
List all recipes.
Sourcepub async fn delete_recipe(&self, name: &str) -> Result<()>
pub async fn delete_recipe(&self, name: &str) -> Result<()>
Delete a recipe.
Sourcepub async fn approve_gate(
&self,
recipe: &str,
run_id: &str,
step_name: &str,
approved: bool,
comment: Option<&str>,
) -> Result<Value>
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.
Sourcepub async fn guardrail_kinds(&self) -> Result<Vec<Value>>
pub async fn guardrail_kinds(&self) -> Result<Vec<Value>>
List available guardrail kinds.
Sourcepub async fn raw_get<T: DeserializeOwned>(&self, path: &str) -> Result<T>
pub async fn raw_get<T: DeserializeOwned>(&self, path: &str) -> Result<T>
Generic GET that returns deserialized JSON.
Sourcepub async fn raw_post<T: DeserializeOwned>(
&self,
path: &str,
body: &Value,
) -> Result<T>
pub async fn raw_post<T: DeserializeOwned>( &self, path: &str, body: &Value, ) -> Result<T>
Generic POST that sends JSON and returns deserialized JSON.
Sourcepub async fn raw_delete(&self, path: &str) -> Result<()>
pub async fn raw_delete(&self, path: &str) -> Result<()>
Generic DELETE.
Trait Implementations§
Source§impl Clone for AgentOvenClient
impl Clone for AgentOvenClient
Source§fn clone(&self) -> AgentOvenClient
fn clone(&self) -> AgentOvenClient
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for AgentOvenClient
impl !RefUnwindSafe for AgentOvenClient
impl Send for AgentOvenClient
impl Sync for AgentOvenClient
impl Unpin for AgentOvenClient
impl UnsafeUnpin for AgentOvenClient
impl !UnwindSafe for AgentOvenClient
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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