adk-artifact
Binary artifact storage for Rust Agent Development Kit (ADK-Rust) agents.
Overview
adk-artifact provides binary data storage for the Rust Agent Development Kit (ADK-Rust):
- InMemoryArtifactService - Simple in-memory artifact storage
- ArtifactService - Trait for custom storage backends
- ScopedArtifacts - Session-scoped artifact access
- Versioning - Multiple versions per artifact
Artifacts are useful for storing images, documents, audio, and other binary data that agents produce or consume.
Installation
[]
= "0.2.0"
Or use the meta-crate:
[]
= { = "0.2.1", = ["artifacts"] }
Quick Start
use ;
use Part;
// Create artifact service
let service = new;
// Store an artifact
let response = service.save.await?;
println!;
// Retrieve artifact
let response = service.load.await?;
Use with LoadArtifactsTool
Artifacts integrate with agents via LoadArtifactsTool:
use LoadArtifactsTool;
let tool = new;
let agent = new
.tool
.build?;
The LLM can then call this tool to load artifacts by name into the conversation.
Features
- Async storage and retrieval
- Automatic MIME type detection
- Version history support
- Thread-safe concurrent access
- User-scoped artifacts (use
user:prefix for cross-session access)
Related Crates
License
Apache-2.0
Part of ADK-Rust
This crate is part of the ADK-Rust framework for building AI agents in Rust.