{"_id":"@agentid.live/sdk","_rev":"2-66030b2b3533286fce41e9900236cb40","name":"@agentid.live/sdk","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@agentid.live/sdk","version":"0.1.0","keywords":["agentid","ai","agent","identity","memory","mcp"],"license":"MIT","_id":"@agentid.live/sdk@0.1.0","maintainers":[{"name":"coalpsis","email":"bimandboom@gmail.com"}],"dist":{"shasum":"02e46fca30eab60dd3100ebc858a77065d3e3ef9","tarball":"https://registry.npmjs.org/@agentid.live/sdk/-/sdk-0.1.0.tgz","fileCount":5,"integrity":"sha512-mannQne6zAyPrP5TSdozhSGOVhHb9bvh4ubfG8BG4BQjhc+p4GetmQVTOyX/9dgXcTevqqZlZsDiPROaqSP3JQ==","signatures":[{"sig":"MEUCIDYEusEs3st0Zb1QHjxHfH8nuJGYPPX41qNzR6tvxc3bAiEAhp4YCKcEIkf+4nLGxox8lHnv1lkzMgTAkWmNlXqZLzg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19101},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"d29efbd517bd11dcfcbccd6318e5e6d0f58f12a0","scripts":{"dev":"tsup src/index.ts --format esm,cjs --dts --watch","build":"tsup src/index.ts --format esm,cjs --dts --clean","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"coalpsis","email":"bimandboom@gmail.com"},"_npmVersion":"10.9.7","description":"TypeScript SDK for AgentID — persistent identity and shared memory for AI agents","directories":{},"_nodeVersion":"22.22.2","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.1.0_1775664930892_0.9819036859330428","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@agentid.live/sdk","version":"0.1.1","description":"TypeScript SDK for AgentID — persistent identity and shared memory for AI agents","type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"build":"tsup src/index.ts --format esm,cjs --dts --clean","dev":"tsup src/index.ts --format esm,cjs --dts --watch","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"engines":{"node":">=18"},"keywords":["agentid","ai","agent","identity","memory","mcp"],"license":"MIT","devDependencies":{"tsup":"^8.0.0","typescript":"^5.0.0"},"_id":"@agentid.live/sdk@0.1.1","gitHead":"93c8d532f2af2e2484de504a8758b740a67d6ae7","_nodeVersion":"22.22.2","_npmVersion":"10.9.7","dist":{"integrity":"sha512-ghaImB/MAWNsG5ifhSmKvKEDN11fu27TpgrchlPCFDOTEqGF/UXsfNzQOeIDyb3KeA3oFcVXNLE34dwpOaCLMA==","shasum":"d46a36a84d723b604c300f3c69ef243053dac4bb","tarball":"https://registry.npmjs.org/@agentid.live/sdk/-/sdk-0.1.1.tgz","fileCount":6,"unpackedSize":22478,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCDG/UZh7+sKeFldjvihgkU0DUgybkQsuuRUm65uA8DVwIhAJ/z3UVHvkpzHe73C8qBpL8DSlPnE8PmbBm/7/mo8WaS"}]},"_npmUser":{"name":"coalpsis","email":"bimandboom@gmail.com"},"directories":{},"maintainers":[{"name":"coalpsis","email":"bimandboom@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdk_0.1.1_1775666028188_0.3201818474523688"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-08T16:15:30.835Z","modified":"2026-04-08T16:33:48.521Z","0.1.0":"2026-04-08T16:15:31.059Z","0.1.1":"2026-04-08T16:33:48.385Z"},"license":"MIT","keywords":["agentid","ai","agent","identity","memory","mcp"],"description":"TypeScript SDK for AgentID — persistent identity and shared memory for AI agents","maintainers":[{"name":"coalpsis","email":"bimandboom@gmail.com"}],"readme":"# @agentid.live/sdk\n\nTypeScript SDK for [AgentID](https://agentid.live) — persistent identity and shared memory for AI agents.\n\n## Install\n\n```bash\nnpm install @agentid.live/sdk\n```\n\n## Quick start\n\n```typescript\nimport { AgentIDClient } from \"@agentid.live/sdk\";\n\nconst agent = new AgentIDClient({\n  handle: \"myagent\",\n  token: process.env.AGENTID_TOKEN!, // from AgentID dashboard → Agent tab\n});\n\n// Load identity + memory in one call\nconst { systemPrompt, memory } = await agent.getContext();\n\n// Use systemPrompt as the system message with any LLM\nconst messages = [\n  { role: \"system\", content: systemPrompt },\n  { role: \"user\",   content: userMessage },\n];\n\n// Report activity to Studio dashboard\nawait agent.report({ type: \"task.started\", title: \"Processing request\", state: \"working\" });\n\n// Save a persistent fact (shared across all agents on this identity)\nawait agent.writeMemory(\"user_language\", \"TypeScript\");\n\nawait agent.report({ type: \"task.completed\", title: \"Done\", state: \"done\", tokensUsed: 1240 });\n```\n\n## Works with any LLM\n\n```typescript\n// OpenAI\nimport OpenAI from \"openai\";\nconst { systemPrompt } = await agent.getContext();\nconst result = await new OpenAI().chat.completions.create({\n  model: \"gpt-4o\",\n  messages: [{ role: \"system\", content: systemPrompt }, { role: \"user\", content: \"...\" }],\n});\n\n// Anthropic\nimport Anthropic from \"@anthropic-ai/sdk\";\nconst { systemPrompt } = await agent.getContext();\nconst result = await new Anthropic().messages.create({\n  model: \"claude-opus-4-5\",\n  system: systemPrompt,\n  messages: [{ role: \"user\", content: \"...\" }],\n});\n```\n\n## Multiple agents (same identity)\n\n```typescript\nconst agents = [\n  new AgentIDClient({ handle: \"agent1\", token: process.env.TOKEN_1! }),\n  new AgentIDClient({ handle: \"agent2\", token: process.env.TOKEN_2! }),\n];\n\n// Load all in parallel — same identity, shared memory\nconst contexts = await Promise.all(agents.map((a) => a.getContext()));\n\n// Memory written by any agent is visible to all\nawait agents[0].writeMemory(\"last_run\", new Date().toISOString());\n```\n\n## API\n\n### `new AgentIDClient(config)`\n\n| Option | Type | Description |\n|--------|------|-------------|\n| `handle` | `string` | Your agent's handle |\n| `token` | `string` | `mcp_secret` from the AgentID dashboard |\n| `baseUrl` | `string` | Optional. Defaults to `https://agentid.live` |\n\n### Methods\n\n| Method | Description |\n|--------|-------------|\n| `getContext()` | Fetch `systemPrompt` + `memory` + `agentInfo` in one call |\n| `getSystemPrompt()` | Fetch only the system prompt string |\n| `getMemory()` | Fetch all shared memory entries |\n| `writeMemory(key, value)` | Write or update a memory entry |\n| `searchMemory(query)` | Keyword/semantic search over memory |\n| `report(event)` | Report an activity event to Studio |\n\n### Activity event types\n\n`task.started` · `task.progress` · `task.completed` · `task.failed` · `observation` · `tool.call` · `tool.result` · `session.started` · `session.ended`\n\n### Activity states\n\n`thinking` · `working` · `idle` · `done` · `error`\n\n## Setup CLI\n\nAutomate setup for Claude Code, Codex, and `.env`:\n\n```bash\nnpx @agentid.live/cli setup\n```\n\n## Links\n\n- [AgentID Dashboard](https://agentid.live/app)\n- [npm](https://www.npmjs.com/package/@agentid.live/sdk)\n- [CLI package](https://www.npmjs.com/package/@agentid.live/cli)\n","readmeFilename":"README.md"}