How genkit-ai/genkit works
Genkit is a cross-language framework for building and deploying AI-powered applications. An application initializes an SDK with provider plugins, then uses generation, prompts, tools/agents, retrieval, and workflows to produce results; the SDK also supports client integration and deployment. The CLI and Developer UI help developers run and evaluate flows and inspect traces, while telemetry supports production monitoring. The README documents these product capabilities; source excerpts are partial, so some subsystem links are documented rather than verified call paths.
Main entry points: cli.ts Genkit CLI · manager.ts Runtime Manager · genkit.ts Genkit JS SDK · generate.ts Generation
Components 20
AI SDK
- Genkit JS SDK
js/genkit/src/genkit.ts - Generation
js/ai/src/generate.ts - Prompt Templates
js/ai/src/prompt.ts - Agents
js/ai/src/agent.ts - AI Workflows
js/core/src/flow.ts - RAG Retrieval
js/ai/src/retriever.ts - Tool Calling
js/ai/src/tool.ts
Model Providers
- Provider Plugins
js/plugins/google-genai/src/index.ts
App Integration
- Client SDK
js/genkit/src/client/client.ts - Web Framework Adapters
js/plugins/express/src/index.ts
Developer Tools
- Genkit CLI
genkit-tools/cli/src/cli.ts - Developer UI Server
genkit-tools/common/src/server/server.ts - Runtime Manager
genkit-tools/common/src/manager/manager.ts - Process Manager
genkit-tools/common/src/manager/process-manager.ts - MCP Server
genkit-tools/cli/src/mcp/server.ts - Flow Evaluation
genkit-tools/common/src/eval/evaluate.ts
Observability
- Telemetry Server
genkit-tools/telemetry-server/src/index.ts - Tracing
js/core/src/tracing.ts
Other components
- Application Developer
- External Model Providers
Connections 21
- Application Developer → Genkit JS SDK: initializes
README.md - Application Developer → Provider Plugins: chooses provider
README.md - Genkit JS SDK → Generation: provides API
README.md - Generation → External Model Providers: requests generation
README.md - Provider Plugins → External Model Providers: integrates
README.md - Application Developer → Prompt Templates: templates prompts
README.md - Application Developer → Agents: builds agents
README.md - Agents → Tool Calling: calls tools
README.md - Application Developer → AI Workflows: defines workflows
README.md - Application Developer → RAG Retrieval: adds context
README.md - Application Developer → Client SDK: integrates client
README.md - Application Developer → Web Framework Adapters: serves application
README.md - Application Developer → Genkit CLI: runs commands
README.md - Genkit CLI → Developer UI Server: starts UI
README.md - Developer UI Server → Runtime Manager: routes runtime actions
genkit-tools/common/src/server/server.ts - Genkit CLI → Runtime Manager: starts manager
- Runtime Manager → Process Manager: manages process
genkit-tools/common/src/manager/manager.ts - Application Developer → MCP Server: uses MCP tools
genkit-tools/cli/src/mcp/server.ts - Application Developer → Flow Evaluation: evaluates flows
README.md - Application Developer → Tracing: instruments runtime
README.md - Tracing → Telemetry Server: exports telemetry