Troubleshooting
Common issues and solutions.
Installation Issues
"Cannot find module '@cortexmemory/sdk'"
npm install @cortexmemory/sdk@^0.9.0
"Peer dependency warnings"
Ensure compatible versions:
npm install ai@^3.0.0 convex@^1.28.2
Runtime Issues
"Failed to connect to Convex"
- Check
CONVEX_URLis set correctly - Ensure Convex is running:
npx convex dev - Verify Cortex backend is deployed
"Memory search returns empty"
Common causes:
- No prior conversations (expected for first use)
- Using local Convex (no vector search support)
- Embeddings not configured (uses keyword search)
Solution: Use cloud Convex + embeddings for best results.
"Type errors with LanguageModelV1"
Update to latest versions:
npm update ai @cortexmemory/vercel-ai-provider
Edge Runtime Issues
"process is not defined"
You're using Node.js APIs in edge runtime. Cortex is edge-compatible, but check your own code.
"Cannot use fs module"
Edge runtimes don't have fs. Use web-standard APIs only.
Performance Issues
"Slow responses"
Causes:
- Too many memories searched (
memorySearchLimit) - Slow embedding generation
- Network latency to Convex
Solutions:
- Reduce
memorySearchLimitto 3-5 - Cache embeddings
- Use Convex regions close to your users