cortex-orchestrate
v0.1.0
Published
Memory-first multi-agent orchestration SDK — built on mem0
Maintainers
Readme
cortex-orchestrate
Memory-first multi-agent orchestration SDK — built on mem0.
npm install cortex-orchestrateQuick start
import Cortex from 'cortex-orchestrate'
const cortex = new Cortex({
apiUrl: 'https://your-cortex-api.onrender.com',
userId: 'user-123',
})
const canvas = cortex.canvas('job-screener')
// Run an agent pipeline
const result = await canvas.run({
trigger: 'Evaluate candidate: Jane Doe, 5 yrs Python, AWS certified',
})
console.log(result.output)
console.log(`Memories written: ${result.memoriesWritten}`)
// Fetch accumulated memories
const memories = await canvas.memories()
// Search memories semantically
const relevant = await canvas.search({ query: 'Python candidates', limit: 5 })How it works
Every canvas in Cortex is a named memory namespace (userId::canvasId). Agents write to and read from this namespace across runs — so each execution is informed by everything that came before it.
Run 1 → cold start → agents evaluate → write memories
Run 2 → warm start → agents recall Run 1 patterns → write delta memories
Run N → deep context → quality compoundsAPI
new Cortex(config)
| Option | Type | Description |
|--------|------|-------------|
| apiUrl | string | Your Cortex API base URL |
| userId | string | User identifier for memory scoping |
| apiKey | string? | Optional bearer token |
cortex.canvas(id)
Returns a Canvas instance scoped to that id.
canvas.run(options)
Executes the agent pipeline with the given trigger string. Returns { executionId, output, memoriesWritten, agentsRun }.
canvas.memories()
Returns all memories accumulated in this canvas namespace.
canvas.search({ query, limit?, agentId? })
Semantic search over canvas memories.
canvas.clearMemories()
Deletes all memories in this canvas namespace.
License
MIT © 2026
