@crewai-ts/gemini
v0.2.3
Published
Gemini native provider for CrewAI TypeScript.
Readme
@crewai-ts/gemini
Gemini native provider for CrewAI TypeScript.
Provides GeminiCompletion with full support for Google Gemini models, including tool use, file uploads, and a comprehensive model catalog.
Install
npm install @crewai-ts/geminiRequirements:
- Node.js 22 or later
@crewai-ts/core0.2.0 or later
Quick Start
import { Agent } from "@crewai-ts/core";
import { GeminiCompletion, registerGeminiProvider } from "@crewai-ts/gemini";
registerGeminiProvider();
const agent = new Agent({
role: "Researcher",
goal: "Find facts",
backstory: "A careful analyst.",
llm: new GeminiCompletion({ model: "gemini-2.5-flash" }),
});Or use the registered provider name:
const agent = new Agent({
role: "Researcher",
goal: "Find facts",
backstory: "A careful analyst.",
llm: "gemini/gemini-2.5-flash",
});Model Catalog
All Gemini models are available as constants:
import { GEMINI_MODELS, GeminiModels } from "@crewai-ts/gemini";
// GEMINI_MODELS is an array of all supported model names
// GeminiModels is the TypeScript union typePopular models include:
gemini-2.5-progemini-2.5-flashgemini-2.0-flashgemini-1.5-progemini-1.5-flash
Exports
GeminiCompletion— main LLM provider classGEMINI_MODELS,GeminiModels— model catalog constants and typesregisterGeminiProvider— register the provider with the core runtime
License
MIT
