AI app builders

Add Aether to a v0 app

Wire Aether memory and retrieval into a React/Next.js app you're building with v0.

Aether is a managed memory and retrieval API: store text or documents, then recall the most relevant pieces by meaning. v0 generates React components and Next.js apps, so reach for Aether when a component needs persistent memory (a chat that remembers the user) or search over your own content — anything that shouldn't live only in client state.

Prompt v0 with this

v0 outputs Next.js, so Aether belongs in a Route Handler or Server Action — never in a client component, where the API key would leak. Append the block below to your v0 prompt, then describe the component or page. Add your key in your Vercel project under Settings → Environment Variables as AETHER_API_KEY (and to .env.local for local dev).

text
Use Aether for persistent memory and document retrieval in this app.

Setup:
1. Install the SDK: `npm install @aether-ai/sdk` (for a Python backend: `pip install aether-ai`).
2. Read the API key from the `AETHER_API_KEY` environment variable. Never hardcode it and never expose it to the browser — all Aether calls run server-side.

Per-user memory (TypeScript):
  import { Memory } from "@aether-ai/sdk";
  const memory = new Memory(userId, { apiKey: process.env.AETHER_API_KEY });
  await memory.remember("a fact about this user"); // store one memory
  const hits = await memory.recall("a question", { k: 5 }); // returns [{ text, score }], higher score = more relevant

Document search / RAG (TypeScript):
  import { AetherClient } from "@aether-ai/sdk";
  const client = new AetherClient({ apiKey: process.env.AETHER_API_KEY });
  await client.insertText("some document text"); // store a document
  const results = await client.retrieve("a question", 5); // passages with .content, ready for a prompt

Rules:
- Scope memory per user: pass a stable user id as the entity id.
- Call Aether from a server route, action, or API handler — never from client components.
- Use Memory for personalization; use AetherClient + retrieve for RAG over documents.

If the agent didn't get it right

Three manual steps recover any integration:

  1. Install the SDK — run npm install @aether-ai/sdk in the project you exported from v0.
  2. Set the key — add AETHER_API_KEY to your Vercel Environment Variables and to .env.local. Get a key from the Aether Dashboard.
  3. Add a server route — create a Route Handler (app/api/memory/route.ts) or Server Action that builds new Memory(userId, { apiKey: process.env.AETHER_API_KEY }) and calls remember / recall. Your client component fetches that route.

Good first builds

  • Memory for a chat componentremember what the user tells the assistant, then recall it so the conversation has continuity across reloads.
  • A search box over your docsinsertText your content, then retrieve matching passages behind a Server Action.

New to the SDK? Walk through the TypeScript quickstart first.