# Eidentic > Eidentic is the open-source TypeScript SDK for AI agents with self-improving memory and production fundamentals built in. It pairs a stateful agent loop with a four-tier memory engine (lexical + vector recall, self-editing memory blocks, a temporal knowledge graph, and sleep-time consolidation) and ships durable execution, enforced cost ceilings, multi-tenant isolation, sandboxed tools, evals in CI, an MCP host + server, and A2A — all Apache-2.0, with no enterprise tier. Native to TypeScript; runs on Node, Bun, Deno, and the edge. ## Start here - [Documentation](https://docs.eidentic.dev): guides for memory, workflows, the server, React hooks, model routing, evals, and benchmarks. - [Quickstart](https://docs.eidentic.dev/getting-started): install `eidentic`, construct an `Agent`, and stream `agent.query()`. - [GitHub](https://github.com/eidentic/eidentic): source for the umbrella package and the 32 `@eidentic/*` packages. - [npm](https://www.npmjs.com/package/eidentic): `npm install eidentic`. ## Key facts - Construct an agent: `new Agent({ id, model, store })`; wrap any AI SDK provider with `new AIModel(provider(modelId))`. - Query with memory: `agent.query(input, { sessionId })` returns an async generator of stream events; text deltas are `ev.type === "stream.delta"` carrying `ev.delta.text`. - Stores are swappable adapters: `@eidentic/sqlite` (Node/Bun), `@eidentic/libsql` (serverless/edge, pure JS), `@eidentic/postgres`. Vector backends: pgvector, Qdrant, LanceDB, Pinecone. - Next.js: `export const POST = withEidentic(agent)` from `@eidentic/nextjs`. React: `useEidenticStream(endpoint)` from `@eidentic/react`. Server: `createServer({ agents })` + `serveNode(server, { port })` from `@eidentic/server`. ## Benchmarks - [Benchmarks](https://docs.eidentic.dev/guides/benchmarks): On LongMemEval, Eidentic memory scores 55.2% overall vs 41.0% for a full-context baseline (+14.2 pts), winning all six question types while sending up to ~39× fewer tokens per query (2,550 vs 99,435). On LoCoMo's smaller haystack, full context stays ahead (-7.8 pts) — published in full, wins and losses, no sampling. ## Examples - [example-nextjs](https://github.com/eidentic/example-nextjs), [example-react](https://github.com/eidentic/example-react), [example-express](https://github.com/eidentic/example-express): clone, add an API key, run a memory-backed chat.