Skip to main content
Glama
README.md
# PiyAPI SDKs and integrations

Client libraries and app integrations for **PiyAPI by Negentro**, the memory layer for AI agents: 84.1% on BEAM-1M,
93.6% on LongMemEval-S and 97% fewer tokens than the full history, with every answer
[published](https://github.com/Negentro-ai/piyapi-benchmarks).

[Start for free](https://piyapi.cloud) · [Docs](https://docs.negentro.tech) · [Benchmarks](https://www.negentro.tech/research)

## Packages

| Package | For | Install |
| --- | --- | --- |
| [`@piyapi/sdk`](packages/sdk) | TypeScript and JavaScript | `npm install @piyapi/sdk` |
| [`piyapi-memory`](packages/python-sdk) | Python | `pip install piyapi-memory` |
| [`@piyapi/mcp-server`](packages/mcp-server) | Claude Code, Cursor, Codex, Claude Desktop, VS Code, Windsurf, Zed and other MCP clients | `npx -y @piyapi/mcp-server install cursor --api-key YOUR_KEY` |
| [`@piyapi/ai-sdk`](packages/ai-sdk) | Vercel AI SDK: memory middleware and tools | `npm install @piyapi/ai-sdk ai zod` |
| [`piyapi-langchain`](packages/langchain-adapter) | LangChain vector store | `pip install piyapi-langchain` |
| [`piyapi-langgraph`](packages/langgraph-store) | LangGraph long-term memory store | `pip install piyapi-langgraph` |
| [`piyapi-llamaindex`](packages/llamaindex-memory) | LlamaIndex memory block | `pip install piyapi-llamaindex` |
| [`@piyapi/memory-widget`](packages/memory-widget) | A web component that lets your users see, correct and forget what is remembered about them | `npm install @piyapi/memory-widget` |

[`integrations/`](integrations) holds ready-made plugins, extensions, rules and configuration for Claude Code, Claude
Desktop, the Claude API, Antigravity, Gemini CLI, Codex, the OpenAI APIs, Cursor, VS Code, Windsurf and Zed.

## Quick start

```typescript
import { PiyAPIClient } from "@piyapi/sdk";

const client = new PiyAPIClient({ apiKey: process.env.PIYAPI_API_KEY! });

await client.memories.create({ content: "User prefers concise answers", namespace: "user_123" });

const { results } = await client.search.semantic("How should I format replies?", {
  namespace: "user_123",
  limit: 5,
});
```

```python
from piyapi_memory import PiyAPIClient

client = PiyAPIClient(api_key="YOUR_PIYAPI_API_KEY")
client.create_memory(content="User prefers concise answers", namespace="user_123")
results = client.hybrid_search(query="How should I format replies?", namespace="user_123", limit=5)
```

## Development

Each package builds and tests on its own: `npm install && npm test` in an npm package, `pip install -e ".[dev]" &&
pytest` in a Python one. Issues and pull requests are welcome.

## Licence

MIT, see [LICENSE](LICENSE).