Skip to documentation
Docs navigation
Docs/Gemini adapter
Adapter

Gemini adapter

Connect MemoGrafter to Gemini models.

Installation

terminal
npm install memo-grafter @google/generative-ai

Configuration

adapter.ts
const agent = new MemoGrafterAgent({
  db: { connectionString: process.env.DATABASE_URL! },
  llm: GeminiLLMAdapter,
  embedder: GeminiEmbedAdapter,
});

Supported capabilities

Chat completion for response generation and memory extraction.
Embedding generation when the provider exposes a compatible embedding model.
Server-side authentication through environment variables.

Provider notes

Set GEMINI_API_KEY on the server.
Configure explicit generation and embedding models.
Confirm regional availability and quotas for the selected model.

Troubleshooting

Confirm the API key is available to the server process.
Verify the configured model supports the requested operation.
Check rate limits when ingestion succeeds intermittently.