azure_ai_foundry_agents
Agent Service client for the Azure AI Foundry Rust SDK.
Features
- Agents — Create, get, list, update, and delete AI agents
- Threads — Manage conversation threads (create, get, update, delete)
- Messages — Add, list, get, and update messages in threads
- Runs — Execute agents, poll for completion, submit tool outputs
- Files — Upload, download, list, and delete files
- Vector Stores — CRUD operations for vector stores, files, and file batches
- Run Steps — Inspect individual actions taken during a run
- Tracing — Full instrumentation with
tracingspans
Installation
[]
= "0.8"
= "0.8"
= { = "1", = ["full"] }
Usage
Create an Agent
use FoundryClient;
use FoundryCredential;
use ;
async
Run a Conversation
use FoundryClient;
use ;
use MessageCreateRequest;
use RunCreateRequest;
use Duration;
# async
Upload and Manage Files
use FoundryClient;
use ;
# async
Vector Stores (RAG)
use FoundryClient;
use ;
# async
Submit Tool Outputs
use FoundryClient;
use ;
use Duration;
# async
Modules
| Module | Description |
|---|---|
agent |
Create, get, list, update, delete agents |
thread |
Create, get, update, delete conversation threads |
message |
Create, list, get, update messages in threads |
run |
Execute agents, poll, submit tool outputs |
file |
Upload, download, list, delete files |
vector_store |
Vector stores, files, and file batches |
run_step |
Inspect run step details |
Tracing Spans
All API calls emit tracing spans for observability:
| Span | Fields |
|---|---|
foundry::agents::create |
model |
foundry::agents::get |
agent_id |
foundry::agents::list |
- |
foundry::agents::delete |
agent_id |
foundry::agents::update |
agent_id |
foundry::threads::create |
- |
foundry::threads::get |
thread_id |
foundry::threads::delete |
thread_id |
foundry::threads::update |
thread_id |
foundry::messages::create |
thread_id |
foundry::messages::list |
thread_id |
foundry::messages::get |
thread_id, message_id |
foundry::messages::update |
thread_id, message_id |
foundry::runs::create |
thread_id, assistant_id |
foundry::runs::get |
thread_id, run_id |
foundry::runs::create_thread_and_run |
assistant_id |
foundry::runs::poll_until_complete |
thread_id, run_id |
foundry::runs::create_and_poll |
assistant_id |
foundry::runs::submit_tool_outputs |
thread_id, run_id, output_count |
foundry::runs::submit_tool_outputs_and_poll |
thread_id, run_id, output_count |
foundry::files::upload |
filename, purpose |
foundry::files::get |
file_id |
foundry::files::list |
- |
foundry::files::delete |
file_id |
foundry::files::download |
file_id |
foundry::vector_stores::create |
- |
foundry::vector_stores::get |
vector_store_id |
foundry::vector_stores::list |
- |
foundry::vector_stores::update |
vector_store_id |
foundry::vector_stores::delete |
vector_store_id |
foundry::vector_stores::add_file |
vector_store_id, file_id |
foundry::vector_stores::list_files |
vector_store_id |
foundry::vector_stores::get_file |
vector_store_id, file_id |
foundry::vector_stores::delete_file |
vector_store_id, file_id |
foundry::vector_stores::create_file_batch |
vector_store_id |
foundry::vector_stores::get_file_batch |
vector_store_id, batch_id |
foundry::run_steps::list |
thread_id, run_id |
foundry::run_steps::get |
thread_id, run_id, step_id |
Related Crates
azure_ai_foundry_core— Core types, authentication, and HTTP clientazure_ai_foundry_models— Chat completions and embeddingsazure_ai_foundry_tools— Vision and Document Intelligence
License
This project is licensed under the MIT License.