Gemini
Gemini's API and the Gemini website are not MCP clients. Unimatrix does not download Gemini chat history. The provider id in Settings is gemini. The capture gateway and the signed-in agent do not behave the same way for that id, and this page follows the code rather than the settings label alone.
Memory tools
Mint a Unimatrix API key in Settings → API Keys (umx_ plus 32 hex characters, shown once). MCP clients use https://www.deployunimatrix.com/api/mcp with an MCP token from Settings → MCP Tokens (umx_<8 hex>_<56 hex>).
GET /api/tools and POST /api/tools/call are the REST path. Pass sourceLlm: "gemini" on the tool call when you want a stored memory filed into the Gemini History location. Connecting Gemini in Settings creates the LLM Histories space and that location. unimatrix_recall accepts query. unimatrix_store_memory accepts content. Other arguments come from GET /api/tools. Nothing in the gateway injects those memories into a Gemini prompt.
What the capture gateway does not do
POST /api/llm-providers/<id>/chat loads the saved row and calls LLMProviderFactory.createProvider. The factory implements openai, deepseek, puter, and ollama. Every other id, including gemini, becomes ProprietaryProvider, whose complete method returns the fixed text Unimatrix Proprietary LLM Response: Acknowledged. and does not use the API key. The connect-time check and the Test button use that same factory, so a successful test does not mean Google accepted the key.
Do not point a client at the gateway URL expecting a Gemini completion.
Signed-in agent
apps/web/lib/agent.ts does call Gemini. callGemini posts to https://generativelanguage.googleapis.com/v1beta/models/<model>:generateContent with the decrypted key, one system instruction, and one user message. The model ids on the settings card are gemini-2.0-flash, gemini-2.5-pro, and gemini-1.5-flash. The key link is https://aistudio.google.com/app/apikey.
Open /agent while signed in, or POST /api/agent/run with the session cookie. The body needs task, providerIds (the connected row ids), and mode of parallel, sequential, or debate. saveToMemory defaults to true. When spaceId is set, the task is prefixed with semantic memory context from that space. Each provider reply can be stored under Gemini History. A separate generateText call with model id openai/gpt-4o-mini writes the synthesis and falls back to a provider reply if that call throws. The route is rate limited. It is not available to bearer-token API clients, and /agent is disallowed in robots.txt.