| Crates.io | adk-artifact |
| lib.rs | adk-artifact |
| version | 0.2.1 |
| created_at | 2025-11-30 13:55:43.431484+00 |
| updated_at | 2026-01-22 03:38:02.202777+00 |
| description | Binary artifact storage for Rust Agent Development Kit (ADK-Rust) agents |
| homepage | |
| repository | https://github.com/zavora-ai/adk-rust |
| max_upload_size | |
| id | 1958246 |
| size | 47,892 |
Binary artifact storage for Rust Agent Development Kit (ADK-Rust) agents.
adk-artifact provides binary data storage for the Rust Agent Development Kit (ADK-Rust):
Artifacts are useful for storing images, documents, audio, and other binary data that agents produce or consume.
[dependencies]
adk-artifact = "0.2.0"
Or use the meta-crate:
[dependencies]
adk-rust = { version = "0.2.1", features = ["artifacts"] }
use adk_artifact::{InMemoryArtifactService, ArtifactService, SaveRequest, LoadRequest};
use adk_core::Part;
// Create artifact service
let service = InMemoryArtifactService::new();
// Store an artifact
let response = service.save(SaveRequest {
app_name: "my_app".to_string(),
user_id: "user_123".to_string(),
session_id: "session_456".to_string(),
file_name: "report.pdf".to_string(),
part: Part::InlineData {
mime_type: "application/pdf".to_string(),
data: pdf_bytes,
},
version: None, // Auto-increment
}).await?;
println!("Saved as version: {}", response.version);
// Retrieve artifact
let response = service.load(LoadRequest {
app_name: "my_app".to_string(),
user_id: "user_123".to_string(),
session_id: "session_456".to_string(),
file_name: "report.pdf".to_string(),
version: None, // Latest version
}).await?;
Artifacts integrate with agents via LoadArtifactsTool:
use adk_tool::LoadArtifactsTool;
let tool = LoadArtifactsTool::new();
let agent = LlmAgentBuilder::new("assistant")
.tool(Arc::new(tool))
.build()?;
The LLM can then call this tool to load artifacts by name into the conversation.
user: prefix for cross-session access)Apache-2.0
This crate is part of the ADK-Rust framework for building AI agents in Rust.