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
- Artifact Management - Store, retrieve, and list artifacts
- MIME Types - Automatic content type handling
- Versioning - Multiple versions per artifact
Artifacts are useful for storing images, documents, audio, and other binary data that agents produce or consume.
Installation
[]
= "0.1.8"
Or use the meta-crate:
[]
= { = "0.1.8", = ["artifacts"] }
Quick Start
use InMemoryArtifactService;
// Create artifact service
let service = new;
// Store an artifact
let artifact = service.save_artifact.await?;
// Retrieve artifact
let data = service.load_artifact.await?;
Use with LoadArtifactsTool
Artifacts integrate with agents via LoadArtifactsTool:
use LoadArtifactsTool;
let tool = new;
let agent = new
.tool
.build?;
The LLM can then request artifacts to be loaded into context.
Features
- Async storage and retrieval
- Automatic MIME type detection
- Version history support
- Thread-safe concurrent access
Related Crates
- adk-rust - Meta-crate with all components
- adk-core - Core
Artifactstrait - adk-tool -
LoadArtifactsTool
License
Apache-2.0
Part of ADK-Rust
This crate is part of the ADK-Rust framework for building AI agents in Rust.