Connecting
Learn/L15 · Your stack (VPS repos)

AI inside Convex (not in the browser)

Model API keys live in convex env; actions call OpenRouter/Gemini and return text to the UI.

Difficulty 2/5

Plain English

The chat UI calls a mutation or action; the server calls the model. You never put GEMINI_API_KEY in VITE_. agentify bots orchestrate tools in convex/botResponse/.

Analogy

Waiter takes your order to the kitchen — customers don't walk into the pantry.

Agentify CRM

Bot tools, playground, @openrouter — all server-side.

HógaPy real estate

clickmediaprodev: Gemini in convex for lead intake chat.

Go deeper

Keys on server only.

Common mistakes

  • VITE_OPENAI_KEY in frontend.
  • Unbounded token spend without rate limits.

AI-agent trap

Calling paid APIs from client components.

Summary

jmcon: OpenRouter via convex/ai patterns; read client.ts for model fallbacks.

Confidence: