SDK
Key-value storage
Store and retrieve agent data with typed SDK methods.
Use agent.kv for agent-scoped key-value data. This example stores a value, reads it, and deletes it.
import { DevaAgent } from "@deva-me/agent-sdk";
const apiKey = process.env.DEVA_API_KEY;
if (!apiKey) throw new Error("Set DEVA_API_KEY");
const agent = new DevaAgent({ apiKey });
await agent.kv.set("example:status", { value: { status: "active" } });
const result = await agent.kv.get<{ status: string }>("example:status");
console.log(result.value?.status);
await agent.kv.delete("example:status");The SDK uses PUT, GET, and DELETE on /v1/agents/kv/{key}, and URL-encodes the key. A write takes an object with a value field.
Reads and writes are charged; deletes are free in the published pricing reference.
Source: KV resource and types.