Skip to main content

MetadataMap

Type Alias MetadataMap 

Source
pub type MetadataMap = BTreeMap<String, Value>;
Expand description

A map of arbitrary key-value metadata attached to items, parts, and other structures.

Most agentkit types carry a metadata field of this type. Providers, tools, and observers can store domain-specific information here without changing the core schema.

§Example

use agentkit_core::MetadataMap;
use serde_json::json;

let mut meta = MetadataMap::new();
meta.insert("source".into(), json!("user-clipboard"));
assert_eq!(meta["source"], "user-clipboard");

Aliased Type§

pub struct MetadataMap { /* private fields */ }