← API Overview
SDKs
Full-featured SDKs for TypeScript and Python. Typed interfaces, automatic retries, timeout handling, and all API surfaces covered.
TS TypeScript SDK
Install
npm install @ai-memory/sdk-ts Usage
import { AgentMemoryClient } from '@ai-memory/sdk-ts';
const client = new AgentMemoryClient({
apiKey: process.env.TELEPATHINE_API_KEY!,
workerUrl: 'https://api.telepathine.ai',
});
const session = await client.createSession({ project: 'my-app', userPrompt: 'Refactor auth' });
await client.appendObservation(session.id, { type: 'decision', text: 'Migrating from JWT to session tokens', title: 'Auth migration' });
const results = await client.search({ q: 'authentication', mode: 'hybrid', project: 'my-app' });
const context = await client.injectContext({ projects: 'my-app', limit: 15 });
await client.completeSession(session.id, { summarize: true }); Key Features
- ✅ Full type coverage for all API surfaces
- ✅ Automatic retries with jittered backoff (default 2 retries)
- ✅ Configurable timeout with AbortController (default 30s)
- ✅ Separate data-plane and control-plane clients
- ✅ Bearer API key auth + JWT token auth for dashboard
- ✅ Injectable fetch implementation for testing
PY Python SDK
Install
pip install agent-memory-sdk Usage
from agent_memory import AgentMemoryClient
client = AgentMemoryClient(
api_key=os.environ["TELEPATHINE_API_KEY"],
worker_url="https://api.telepathine.ai",
)
session = client.create_session(project="my-app", user_prompt="Refactor auth")
client.append_observation(session_id=session["id"], observation={
"type": "decision", "text": "Migrating from JWT", "title": "Auth migration",
})
results = client.search(q="authentication", mode="hybrid", project="my-app")
context = client.inject_context(projects="my-app", limit=15)
client.complete_session(session["id"], summarize=True)