cortex-agent 0.2.1

Self-learning AI agent with persistent memory, tools, plugins, and a beautiful terminal UI
# Cortex Agent — configuration
# ${ENV_VAR} references are resolved from the environment.

# --- Active selection ---
active_provider: opencode
active_model: deepseek-v4-flash-free

# --- Multiple providers ---
# Define as many as you want. Switch via /provider in chat.
providers:
  opencode:
    api_key: sk-L9VrLh2TV2eOytpe1qZ2CvWx7mKcdjiVgQi35tNFINBapyZ4crUwM5ad2mVqEwgu
    model: deepseek-v4-flash-free
    model: deepseek-v4-flash-free
    model: deepseek-v4-flash-free
    base_url: https://opencode.ai/zen/v1
  openai:
    api_key: ${OPENAI_API_KEY}
    base_url: https://api.openai.com/v1
  openrouter:
    api_key: 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
    model: deepseek/deepseek-v4-flash
    base_url: https://openrouter.ai/api/v1
  deepseek:
    api_key: ${DEEPSEEK_API_KEY}
    base_url: https://api.deepseek.com/v1
  groq:
    api_key: ${GROQ_API_KEY}
    base_url: https://api.groq.com/openai/v1
  together:
    api_key: ${TOGETHER_API_KEY}
    base_url: https://api.together.xyz/v1
  mistral:
    api_key: ${MISTRAL_API_KEY}
    base_url: https://api.mistral.ai/v1
  nvidia:
    api_key: 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
    model: deepseek-ai/deepseek-v4-flash
    model: deepseek-ai/deepseek-v4-flash
    model: deepseek-ai/deepseek-v4-flash
    base_url: https://integrate.api.nvidia.com/v1

# --- Legacy fallback (used if 'providers' map is empty) ---
api_key: ""
base_url: https://api.openai.com/v1

# --- Agent Behaviour ---
system_prompt: >
  You are Cortex, an autonomous agent. Answer from your own knowledge first.
  Only use tools when genuinely needed (time, URLs, code, memory, skills).

  CONCISENESS:
  - Be BRIEF. Short answers, no fluff, no emoji parades.
  - When the user just says "hi" or "hello", respond with a single short line.
  - Don't introduce yourself unless asked. No bullet lists of capabilities.
  - Let the user drive the conversation — don't over-explain.

  Your configuration:
  - Model: deepseek-v4-flash-free
  - Provider: opencode.ai/zen/v1
  - Tools: 17 tools including memory, skills, code execution, web fetching

  SELF-LEARNING (proactive — do this automatically):
  - After learning something useful about the user (name, preferences, projects,
    tools they use), IMMEDIATELY save it with save_memory(target='user', ...).
    Don't wait to be asked — be proactive.
  - Before answering questions that might involve prior facts, use search_memory.
  - Extract and save lessons from errors you encounter.
  - For multi-step workflows, offer to save as a skill.

  CRITICAL: Never use self_inspect, self_read, or self_patch for curiosity.
  Only use them to fix actual bugs.

max_tokens: 4096
max_iterations: 10
temperature: 0.7

# --- Memory ---
memory_enabled: true
memory_dir: ~/.cortex/memory
memory_db: cortex.db

# --- Tools ---
tool_modules: cortex.tools.core,cortex.tools.memory_tools,cortex.tools.skill_tools,cortex.tools.self_tools

# --- Diagnostics ---
verbose: false