docs / sdks
SDKs
Use the REST API from any language. A thin client is all you need.
Status
The official TypeScript (
@agentvault/sdk) and Python packages are being updated to the shared-memory API. The snippets below call the API directly and work today.TypeScript
vault.ts
const base = "https://api.useagentvault.com";
const headers = {
Authorization: `Bearer ${process.env.AGENTVAULT_API_KEY}`,
"Content-Type": "application/json",
"X-AgentVault-Agent": "billing-bot",
"X-AgentVault-Model": "gpt-5.1",
"X-AgentVault-Provider": "openai",
};
export async function remember(content: string, opts: { key?: string; tags?: string[]; space_id?: string } = {}) {
const res = await fetch(`${base}/v1/memories`, { method: "POST", headers, body: JSON.stringify({ content, ...opts }) });
return res.json(); // { memory, action: "created" | "merged" | "superseded" }
}
export async function recall(query: string) {
const res = await fetch(`${base}/v1/recall`, { method: "POST", headers, body: JSON.stringify({ query }) });
return (await res.json()).context as string;
}Python
vault.py
import os, requests
BASE = "https://api.useagentvault.com"
HEADERS = {
"Authorization": f"Bearer {os.environ['AGENTVAULT_API_KEY']}",
"X-AgentVault-Agent": "research-agent",
"X-AgentVault-Model": "gemini-3-pro",
"X-AgentVault-Provider": "google",
}
def remember(content, **opts):
return requests.post(f"{BASE}/v1/memories", json={"content": content, **opts}, headers=HEADERS).json()
def recall(query):
return requests.post(f"{BASE}/v1/recall", json={"query": query}, headers=HEADERS).json()["context"]Prefer typed clients? Generate one from /v1/openapi.json with your usual OpenAPI generator.