First Run
Guide to your first CortexPrism session.
The Setup Wizard
When you run cortex for the first time (or cortex setup), the setup wizard will prompt you for:
- LLM Provider — Choose from 12+ providers: Anthropic, OpenAI, Google, Mistral, Groq, DeepSeek, OpenRouter, xAI, Together AI, AWS Bedrock, Cohere, Ollama
- API Key — Enter the API key for your chosen provider
- Model Selection — Choose your default model (e.g.,
claude-sonnet-4-20250514,gpt-4o,gemini-2.0-flash) - Data Directory — Where to store data (defaults to
~/.cortex/)
Configuration File
After setup, your configuration is stored at ~/.cortex/config.json:
{
"version": 1,
"defaultProvider": "anthropic",
"providers": {
"anthropic": {
"kind": "anthropic",
"model": "claude-sonnet-4-20250514",
"apiKey": "sk-ant-..."
}
},
"agent": {
"name": "Cortex",
"maxTurns": 50,
"streamOutput": true
},
"router": {
"enabled": false,
"confidenceThreshold": 0.7,
"cascade": []
}
}
Data Directory
Default: ~/.cortex/data/
Override:
CORTEX_DATA_DIR=/data/cortex cortex chat
The data directory contains:
| File | Contents |
|---|---|
cortex.db | Core: sessions, jobs, policy rules |
memory.db | 5-tier memory: episodic, semantic, reflection |
lens.db | Audit log: all events, tool calls, policy checks |
vault.db | Encrypted credentials |
plugins.db | Plugin registry |
sess_*.db | Per-session message history |
Your First Chat
cortex chat
On first chat, the system:
- Starts background daemons (validator, executor, scheduler)
- Initializes the chat session
- Injects any relevant memory into context
- Connects to your configured LLM provider
Type a message and the agent will respond. Try these:
"What can you do?"— Learn about agent capabilities"Search the web for latest AI news"— Web search via DuckDuckGo"Run a Python script that calculates fibonacci"— Sandboxed code execution"Read the file ~/.cortex/config.json"— File reading via tool"Remember that I use VS Code"— Store a fact in memory
What Happens Behind the Scenes
Your message
→ Agent retrieves relevant memories
→ Builds prompt with context
→ Sends to LLM provider
→ LLM responds (may request tool calls)
→ Tool calls are validated by Parallax security
→ Approved tools execute (file read, web search, code run)
→ Results fed back to LLM for final response
→ Response streamed back to you
→ Session history saved to SQLite
→ Episodic memory written (async)
→ Reflection performed (async)