diff --git a/marketing/src/pages/index.astro b/marketing/src/pages/index.astro index ed257f6..ecdf7ef 100644 --- a/marketing/src/pages/index.astro +++ b/marketing/src/pages/index.astro @@ -1,326 +1,338 @@ --- import Base from "../layouts/Base.astro"; import SEO from "../components/SEO.astro"; -import { getCollection } from "astro:content"; - -const featuredIntegrations = (await getCollection('integrations')) - .filter(e => e.data.featured) - .sort((a, b) => a.data.order - b.data.order) - .slice(0, 6); - -const latestPatterns = (await getCollection('patterns')) - .sort((a, b) => a.data.order - b.data.order) - .slice(0, 4); - -const featuredPrompt = (await getCollection('prompts')) - .filter(e => e.data.featured) - .sort((a, b) => a.data.order - b.data.order)[0]; - -const integrationCategories = [ - { slug: 'agent-framework', label: 'Agent Frameworks', desc: 'LangChain, CrewAI, AutoGPT' }, - { slug: 'code-assistant', label: 'Code Assistants', desc: 'Claude Code, Cursor, Windsurf' }, - { slug: 'ci-cd', label: 'CI/CD', desc: 'GitHub Actions, GitLab CI' }, - { slug: 'orchestration', label: 'Orchestration', desc: 'n8n, Zapier, Temporal' }, - { slug: 'communication', label: 'Communication', desc: 'Slack, Discord, Teams' }, - { slug: 'mcp-server', label: 'MCP Servers', desc: 'Filesystem, Database, Git' }, -]; --- + -
+
-
-
+
-
+ >
-
- Shared memory for agents — from anywhere +
+ Persistent memory for AI agents
-

- deja, what one agent learns, they all know. +

+ deja

-

- CI learns it. Your chat agent already knows it. Open source, - self-hosted recall that any server, client, or script can shape. +

+ Agents forget everything between runs. deja fixes that. +

+

+ An open-source memory layer that stores what agents learn and recalls it when relevant. + Available as three packages — pick the runtime that fits your stack.

- -
-
-
npm i deja-client
-
- await - mem.learn("deploy failed", "check wrangler.toml") -
-
- await - mem.inject("deploying") // → "check wrangler.toml" -
-
-
- -
-

- Quickstart - · Docs - · Integrations - · Research -

+ +
+
+ What is deja? +
+
+
+
+

+ Every time an AI agent runs, it starts from scratch. It doesn't remember what worked last time, + what failed, or what another agent already figured out. You end up re-explaining the same context, + re-discovering the same workarounds, and watching agents make the same mistakes. +

+

+ deja is a memory layer. Agents call learn() to store + what they discover and recall() to retrieve what's relevant + before they act. Memories have confidence scores, get deduplicated automatically, and decay when they go stale. +

+

+ It works across agents, across runs, across tools. CI learns something → your chat agent already knows it. + One agent figures out a workaround → every agent benefits. +

+
+
+
- -
-
- Three ways to use deja + +
+
+ Three memory systems
+

+ Same concepts, different runtimes. Pick the one that matches your stack, or use them together. +

+
- -
-
+ +
+
+
+ deja-local
-
- Library +
+ In-process vector memory for Bun +
+ +
+
+ SEARCH + Vector similarity (all-MiniLM-L6-v2 via ONNX) +
+
+ STORAGE + SQLite file on disk +
+
+ LATENCY + Zero — runs in your process +
+
+ DEPS + Bun runtime + HuggingFace transformers +
-

- Thin wrapper over HTTP. Two functions. -

-
import deja from 'deja-client'
const mem = deja(DEJA_URL) -await mem.learn("trigger", "learning") -await mem.inject("context")
+
import { DejaLocal } from 'deja-local' +const mem = new DejaLocal('./memories.db') + +await mem.remember("node 20 breaks esbuild") +const hits = await mem.recall("deploying")
+ +

+ Best for: CLI tools, local agents, scripts, development. +

- -
-
+ +
+
+
+ deja-edge
-
- REST API +
+ Edge memory for Cloudflare Durable Objects +
+ +
+
+ SEARCH + FTS5 full-text search (BM25 + Porter stemming) +
+
+ STORAGE + Durable Object SQLite +
+
+ LATENCY + Zero — runs inside the DO +
+
+ DEPS + None — zero external dependencies +
-

- HTTP endpoints. Use from anywhere. + +

import { DejaEdge } from 'deja-edge' +// Inside your Durable Object: +const mem = new DejaEdge(this.ctx.storage.sql) + +mem.remember("node 20 breaks esbuild") +const hits = mem.recall("deploying")
+ +

+ Best for: per-user memory in edge apps, Cloudflare Workers, chat apps.

-
POST /learn -POST /inject -POST /query -GET /learnings -GET /stats
- -
-
+ +
+
+
+ deja (hosted)
-
- MCP +
+ Full-featured memory service on Cloudflare +
+ +
+
+ SEARCH + Semantic vector search (Vectorize + Workers AI) +
+
+ STORAGE + DO SQLite + Vectorize index +
+
+ LATENCY + Network hop — deployed to your CF account +
+
+ DEPS + Cloudflare Vectorize + Workers AI bindings +
-

- Native protocol. Claude, Cursor, etc. + +

import deja from 'deja-client' +const mem = deja(DEJA_URL) + +await mem.learn("deploy", "node 20 breaks esbuild") +await mem.inject("deploying")
+ +

+ Best for: multi-agent teams, shared memory, MCP, REST API access.

-
// claude_desktop_config.json -"mcpServers": { - "deja": { - "url": "..." - } -}
-
-

- Use cases: incident response, onboarding, playbooks. See walkthroughs. -

+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
deja-localdeja-edgedeja (hosted)
RuntimeBunCloudflare DOCloudflare Workers
SearchCosine similarityFTS5 / BM25Vectorize semantic
Embeddingsall-MiniLM-L6-v2None (text-based)bge-small-en-v1.5
LatencyZero (in-process)Zero (in-DO)Network hop
Multi-agentSingle processPer-DO isolationScoped sharing
MCPBuilt-in
Installnpm i deja-localnpm i deja-edgenpm i deja-client
+
- +
-
- One memory, everywhere +
+ How it works
-
-
+
+
+
+
1
+
Agent learns
+

+ After a run, the agent stores what it discovered. deja embeds the text, checks for duplicates, + and assigns a confidence score. +

-

- deja is just HTTP. Anything that can make a request can learn and - recall. CI/CD pipelines, local chat agents, Slack bots, cron jobs, CLI - scripts — all writing to and reading from the same memory. -

-
-
-
- CI/CD learns -
-
-
- # GitHub Action on deploy failure -
-
- curl -X POST $DEJA_URL/learn \ -
-
-d '{"{"}"trigger": "deploy",
-
-      "learning": "node 20 breaks esbuild"{ - "}" - }' -
-
-
-
-
- Chat agent recalls -
-
-
- // Claude, 30 seconds later -
-
- await mem.inject("deploying") -
-
- // → "node 20 breaks esbuild" -
-
-
-
-
- Cron maintains -
-
-
# Nightly cleanup
-
curl $DEJA_URL/stats
-
- // stale memories auto-expire -
-
-
+
+
+
2
+
Next agent recalls
+

+ Before acting, the next agent describes what it's about to do. deja returns the most relevant + memories — already formatted for injection into the prompt. +

+
+
+
+
3
+
Memory evolves
+

+ Useful memories gain confidence. Contradicted ones get superseded. Stale ones decay. + The memory stays clean without manual curation. +

-

- CI learns it. Your chat agent knows it. Same memory, different doors. -

-
- Try it +
+ Try it — hosted demo
-
-
-
-
+
+
+
-
+
Teach
- +
- + -
+ >
-
+
Recall
- + -
+
POST /learn @@ -403,133 +403,29 @@ const integrationCategories = [
- - {featuredIntegrations.length > 0 && ( -
-
-
Featured Integrations
- View all → -
- -
- )} - - -
-
Browse by category
-
- {integrationCategories.map(cat => ( - -
{cat.label}
-
{cat.desc}
-
- ))} -
-
- - - {latestPatterns.length > 0 && ( -
-
-
Latest Patterns
- View all → -
- -
- )} - - -
-
-
Memory Interface Research
- All 20 explorations → -
-
-
-

- 20 explorations of how humans and agents might interact with persistent memory. - From filing cabinets to mycelial networks — each one is a standalone interactive research page. -

- -
-
- - - {featuredPrompt && ( -
-
-
Featured Prompt
- All prompts → -
- -
-
- {featuredPrompt.data.category.replace(/-/g, ' ')} -
-

{featuredPrompt.data.title}

-

{featuredPrompt.data.description}

-
{featuredPrompt.data.prompt.slice(0, 300)}{featuredPrompt.data.prompt.length > 300 ? '...' : ''}
-
-
- )} -
Honest answers
-

"Why not just use a database?"

-

You could. But then you're building semantic search, scoping, confidence decay, and cleanup yourself. deja is that layer, already wired to Cloudflare's vector and AI stack.

+

"Why three packages?"

+

Different agents run in different places. A CLI tool needs in-process memory with zero latency. An edge worker needs memory inside its Durable Object. A multi-agent team needs shared memory over HTTP. Same core idea, three runtimes.

-

"Another AI tool?"

-

It's 1 Worker, 2 endpoints. No SDK required. curl works. The whole thing is ~500 lines of TypeScript.

+

"Why not just use a database?"

+

You could. But then you're building semantic search, deduplication, confidence scoring, conflict resolution, and cleanup yourself. deja is that layer.

"Vendor lock-in?"

-

Your Cloudflare account, your data, MIT license. It's a single Worker with a Durable Object and a Vectorize index. Fork it if we disappear.

+

deja-local runs on Bun with SQLite — no cloud required. deja-edge runs inside any Cloudflare DO. The hosted version runs on your own CF account. MIT license, fork it if we disappear.

-

"Will this actually get maintained?"

-

It's the tool we use daily. But it's also open source — so it doesn't depend on us. The architecture is intentionally simple enough to understand in an afternoon.

+

"Which one should I use?"

+

Building a local CLI tool or script? deja-local. Building on Cloudflare Workers? deja-edge. Need shared memory across multiple agents or MCP? deja (hosted).

@@ -539,45 +435,39 @@ const integrationCategories = [
-
-
-
-
-

- One agent learns it. The next one already knows. + >

+
+
+

+ Stop re-explaining. Start remembering.

-

- Every lesson, every workaround, every hard-won fix — already waiting in - context before the first token lands. +

+ Pick a package, add two function calls, and your agents will never forget again.

Docs · Integrations + · Patterns · Research

-
- Open source. MIT licensed. Self-hosted. Built for Cloudflare Workers. +
+ Open source. MIT licensed. Three runtimes — local, edge, hosted.
diff --git a/packages/deja-edge/src/index.ts b/packages/deja-edge/src/index.ts index 28dffe7..a3fafa9 100644 --- a/packages/deja-edge/src/index.ts +++ b/packages/deja-edge/src/index.ts @@ -420,4 +420,41 @@ export function createEdgeMemory( return store } +// ============================================================================ +// DejaEdge — class wrapper matching the homepage API +// ============================================================================ + +type SqlStorage = DurableObjectState['storage']['sql'] + +/** + * Class-based API for deja-edge. + * + * ```ts + * import { DejaEdge } from 'deja-edge' + * // Inside your Durable Object: + * const mem = new DejaEdge(this.ctx.storage.sql) + * + * mem.remember("node 20 breaks esbuild") + * const hits = mem.recall("deploying") + * ``` + */ +export class DejaEdge implements EdgeMemoryStore { + private store: EdgeMemoryStore + + constructor(sql: SqlStorage, opts: CreateEdgeMemoryOptions = {}) { + // Wrap the sql handle in a minimal DurableObjectState shape + const ctx = { storage: { sql } } as unknown as DurableObjectState + this.store = createEdgeMemory(ctx, opts) + } + + remember(text: string) { return this.store.remember(text) } + recall(context: string, options?: RecallOptions) { return this.store.recall(context, options) } + confirm(id: string) { return this.store.confirm(id) } + reject(id: string) { return this.store.reject(id) } + forget(id: string) { return this.store.forget(id) } + list(options?: { limit?: number; offset?: number }) { return this.store.list(options) } + recallLog(options?: { limit?: number }) { return this.store.recallLog(options) } + get size() { return this.store.size } +} + export default createEdgeMemory diff --git a/packages/deja-local/src/index.ts b/packages/deja-local/src/index.ts index 68bceb4..a5ae2ee 100644 --- a/packages/deja-local/src/index.ts +++ b/packages/deja-local/src/index.ts @@ -420,5 +420,40 @@ export function createMemory(opts: CreateMemoryOptions): MemoryStore { return store } +// ============================================================================ +// DejaLocal — class wrapper matching the homepage API +// ============================================================================ + +/** + * Class-based API for deja-local. + * + * ```ts + * import { DejaLocal } from 'deja-local' + * const mem = new DejaLocal('./memories.db') + * + * await mem.remember("node 20 breaks esbuild") + * const hits = await mem.recall("deploying") + * ``` + */ +export class DejaLocal implements MemoryStore { + private store: MemoryStore + + constructor(path: string, opts: Omit = {}) { + this.store = createMemory({ ...opts, path }) + } + + remember(text: string) { return this.store.remember(text) } + recall(context: string, options?: Parameters[1]) { return this.store.recall(context, options) } + confirm(id: string) { return this.store.confirm(id) } + reject(id: string) { return this.store.reject(id) } + forget(id: string) { return this.store.forget(id) } + list(options?: Parameters[0]) { return this.store.list(options) } + recallLog(options?: Parameters[0]) { return this.store.recallLog(options) } + get size() { return this.store.size } + close() { return this.store.close() } + /** @deprecated Use remember() */ + learn(text: string) { return this.store.learn(text) } +} + export { createModelEmbed } export default createMemory