Coding agents forget everything between sessions. InfiniteOcean gives them persistent, searchable, structured memory that grows smarter over time.
GET /context
Full state as markdown
Agent writes memories as drops to _memory/*
GET /context includes everything from before
# Step 1: Agent wakes up — one call gets full context curl https://api2.infiniteocean.io/v2/context \ -H "X-Ocean-Key: YOUR_KEY" # Step 2: Agent learns something — write it as a drop curl -X POST https://api2.infiniteocean.io/v2/drop \ -H "Content-Type: application/json" \ -H "X-Ocean-Key: YOUR_KEY" \ -d '{"route":"_memory/decisions", "key":"use-jwt", "payload":"{\"title\":\"Use JWT for auth\", \"reasoning\":\"Stateless, works at edge\", \"date\":\"2025-01-15\"}"}' # Step 3: Agent needs to recall — search memory curl -X POST https://api2.infiniteocean.io/v2/search/_memory \ -H "Content-Type: application/json" \ -d '{"text":"authentication approach"}'
Write drops to _memory/{category} routes. Each memory is an entity with a unique key — writing the same key updates the memory instead of duplicating it.
| Route | Purpose | Payload shape |
|---|---|---|
| _memory/decisions | Architecture and design decisions | { title, reasoning, date } |
| _memory/bugs | Bugs found and how they were fixed | { title, description, fix, date } |
| _memory/patterns | Code patterns discovered in the codebase | { title, description, files } |
| _memory/preferences | User and project preferences | { preference, value } |
| _memory/tasks | Task history and status | { title, status, description, date } |
| _memory/architecture | Component and file relationships | { component, description, dependencies } |
These are conventions, not constraints. Agents can create any sub-route under _memory/. The GET /context endpoint auto-discovers and summarizes all of them.
Add to your project's CLAUDE.md:
# Ocean Memory Before starting work, fetch context: curl api2.infiniteocean.io/context \ -H "X-Ocean-Key: $OCEAN_KEY" Write important decisions and patterns to _memory/* routes.
The API is just HTTP. Works with any agent framework:
// On session start const ctx = await fetch( "https://api2.infiniteocean.io/v2/context", { headers: { "X-Ocean-Key": key } } ); const markdown = await ctx.text(); // Inject into system prompt
This is a live GET /context response from the API right now:
# 1. Get an Ocean Key (free, instant) curl -X POST https://api2.infiniteocean.io/v2/drop \ -H "Content-Type: application/json" \ -d '{"route":"test","payload":"hello"}' # Response includes keypair.public — that's your key # 2. Fetch your context curl https://api2.infiniteocean.io/v2/context \ -H "X-Ocean-Key: YOUR_KEY" # 3. Write your first memory curl -X POST https://api2.infiniteocean.io/v2/drop \ -H "Content-Type: application/json" \ -H "X-Ocean-Key: YOUR_KEY" \ -d '{"route":"_memory/decisions", "key":"first-decision", "payload":"{\"title\":\"Testing InfiniteOcean\", \"reasoning\":\"Persistent agent memory\", \"date\":\"2025-01-01\"}"}' # 4. Fetch context again — your memory is there curl https://api2.infiniteocean.io/v2/context \ -H "X-Ocean-Key: YOUR_KEY"