Directories
¶
| Path | Synopsis |
|---|---|
|
Package ai defines Genkit's AI primitives: models, prompts, tools, embedders, retrievers, and evaluators, and the options that configure a request to them.
|
Package ai defines Genkit's AI primitives: models, prompts, tools, embedders, retrievers, and evaluators, and the options that configure a request to them. |
|
exp
Package exp provides experimental AI primitives for Genkit.
|
Package exp provides experimental AI primitives for Genkit. |
|
exp/localstore
Package localstore provides single-process exp.SessionStore implementations suitable for local development, tests, and single-instance apps (CLI tools, desktop apps, local web services).
|
Package localstore provides single-process exp.SessionStore implementations suitable for local development, tests, and single-instance apps (CLI tools, desktop apps, local web services). |
|
exp/tool
Package tool provides runtime helpers for use inside tool functions.
|
Package tool provides runtime helpers for use inside tool functions. |
|
Package core implements Genkit actions and other essential machinery.
|
Package core implements Genkit actions and other essential machinery. |
|
logger
Package logger provides context-scoped structured logging for Genkit.
|
Package logger provides context-scoped structured logging for Genkit. |
|
status
Package status defines Genkit's canonical status codes and the error type that carries them.
|
Package status defines Genkit's canonical status codes and the error type that carries them. |
|
tracing
Package tracing provides execution trace support for Genkit operations.
|
Package tracing provides execution trace support for Genkit operations. |
|
x/streaming
Package streaming provides experimental durable streaming APIs for Genkit.
|
Package streaming provides experimental durable streaming APIs for Genkit. |
|
Package genkit provides a framework for building AI-powered applications in Go.
|
Package genkit provides a framework for building AI-powered applications in Go. |
|
exp
Package exp holds experimental Genkit concepts that are still taking shape.
|
Package exp holds experimental Genkit concepts that are still taking shape. |
|
cmd/copy
command
copy is a tool for copying parts of files.
|
copy is a tool for copying parts of files. |
|
cmd/jsonschemagen
command
A simple, self-contained code generator for JSON Schema.
|
A simple, self-contained code generator for JSON Schema. |
|
cmd/weave
command
The weave command is a simple preprocessor for markdown files.
|
The weave command is a simple preprocessor for markdown files. |
|
fakeembedder
Package fakeembedder provides a fake implementation of genkit.Embedder for testing purposes.
|
Package fakeembedder provides a fake implementation of genkit.Embedder for testing purposes. |
|
genkitbridge
Package genkitbridge is an internal bridge that lets first-party Genkit subpackages (notably genkit/exp) reach the api.Registry backing a *genkit.Genkit without the genkit package exposing a public accessor.
|
Package genkitbridge is an internal bridge that lets first-party Genkit subpackages (notably genkit/exp) reach the api.Registry backing a *genkit.Genkit without the genkit package exposing a public accessor. |
|
plugins
|
|
|
compat_oai/anthropic
Package anthropic provides a Genkit plugin for Claude models through Anthropic's OpenAI-compatible endpoint.
|
Package anthropic provides a Genkit plugin for Claude models through Anthropic's OpenAI-compatible endpoint. |
|
compat_oai/dashscope
Package dashscope provides a Genkit plugin for Alibaba Cloud's Qwen models, served through DashScope's OpenAI-compatible mode.
|
Package dashscope provides a Genkit plugin for Alibaba Cloud's Qwen models, served through DashScope's OpenAI-compatible mode. |
|
compat_oai/deepseek
Package deepseek provides a Genkit plugin for DeepSeek's models.
|
Package deepseek provides a Genkit plugin for DeepSeek's models. |
|
compat_oai/internal/livetest
Package livetest drives an OpenAI-compatible plugin through the core Genkit generate features against the provider's real API: generation, history, system prompts, streaming, tool calling, structured output, reasoning, vision, and the extra config passthrough.
|
Package livetest drives an OpenAI-compatible plugin through the core Genkit generate features against the provider's real API: generation, history, system prompts, streaming, tool calling, structured output, reasoning, vision, and the extra config passthrough. |
|
compat_oai/kimi
Package kimi provides a Genkit plugin for Moonshot AI's Kimi models.
|
Package kimi provides a Genkit plugin for Moonshot AI's Kimi models. |
|
compat_oai/openai
Package openai provides a Genkit plugin for OpenAI's models and embedders.
|
Package openai provides a Genkit plugin for OpenAI's models and embedders. |
|
compat_oai/openrouter
Package openrouter provides a Genkit plugin for OpenRouter, a gateway that serves models from many providers behind one OpenAI-compatible endpoint.
|
Package openrouter provides a Genkit plugin for OpenRouter, a gateway that serves models from many providers behind one OpenAI-compatible endpoint. |
|
compat_oai/xai
Package xai provides a Genkit plugin for xAI's Grok models.
|
Package xai provides a Genkit plugin for xAI's Grok models. |
|
compat_oai/zai
Package zai provides a Genkit plugin for Z.ai's GLM models.
|
Package zai provides a Genkit plugin for Z.ai's GLM models. |
|
evaluators
Package evaluators defines a set of Genkit Evaluators for popular use-cases
|
Package evaluators defines a set of Genkit Evaluators for popular use-cases |
|
firebase/exp
Package exp provides experimental Firebase integrations for Genkit's agent runtime (see github.com/firebase/genkit/go/ai/exp).
|
Package exp provides experimental Firebase integrations for Genkit's agent runtime (see github.com/firebase/genkit/go/ai/exp). |
|
googlecloud
The googlecloud package supports telemetry (tracing, metrics and logging) using Google Cloud services.
|
The googlecloud package supports telemetry (tracing, metrics and logging) using Google Cloud services. |
|
internal
Package internal contains code that is common to all models
|
Package internal contains code that is common to all models |
|
internal/jsonschema
Package jsonschema contains JSON Schema helpers shared by Genkit provider plugins.
|
Package jsonschema contains JSON Schema helpers shared by Genkit provider plugins. |
|
internal/uri
Package uri extracts the content-type and data from a media part.
|
Package uri extracts the content-type and data from a media part. |
|
localvec
Package localvec is a local vector database for development and testing.
|
Package localvec is a local vector database for development and testing. |
|
mcp
Package mcp provides a client for integration with the Model Context Protocol.
|
Package mcp provides a client for integration with the Model Context Protocol. |
|
mcp/fixtures/basic_server
command
|
|
|
mcp/fixtures/content_server
command
|
|
|
mcp/fixtures/policy_server
command
|
|
|
mcp/fixtures/server_a
command
|
|
|
mcp/fixtures/server_b
command
|
|
|
middleware
Package middleware provides reusable middleware for Genkit model generation, including retry with exponential backoff and model fallback.
|
Package middleware provides reusable middleware for Genkit model generation, including retry with exponential backoff and model fallback. |
|
middleware/exp
Package exp provides experimental middleware for the agent APIs in github.com/firebase/genkit/go/ai/exp: Agents for sub-agent delegation and Artifacts for session artifact access.
|
Package exp provides experimental middleware for the agent APIs in github.com/firebase/genkit/go/ai/exp: Agents for sub-agent delegation and Artifacts for session artifact access. |
|
pinecone
Package pinecone implements a genkit plugin for the Pinecone vector database.
|
Package pinecone implements a genkit plugin for the Pinecone vector database. |
|
samples
|
|
|
anthropic
command
This sample demonstrates the Anthropic plugin, which speaks Anthropic's native Messages API: a streaming flow that generates a joke with a model pinned through anthropic.ModelRef and the Anthropic SDK's own request type as its config.
|
This sample demonstrates the Anthropic plugin, which speaks Anthropic's native Messages API: a streaming flow that generates a joke with a model pinned through anthropic.ModelRef and the Anthropic SDK's own request type as its config. |
|
basic
command
This sample demonstrates the two kinds of flow:
|
This sample demonstrates the two kinds of flow: |
|
basic-agents
command
This sample demonstrates the agent APIs by defining six agents in different styles, one per file, behind a single CLI:
|
This sample demonstrates the agent APIs by defining six agents in different styles, one per file, behind a single CLI: |
|
basic-agents-server
command
This sample demonstrates serving agents as plain HTTP endpoints.
|
This sample demonstrates serving agents as plain HTTP endpoints. |
|
basic-durable-streaming-exp
command
This sample demonstrates durable streaming: a stream a caller can rejoin, whether it is still running or already finished.
|
This sample demonstrates durable streaming: a stream a caller can rejoin, whether it is still running or already finished. |
|
basic-errors
command
This sample demonstrates error handling with the core/status package.
|
This sample demonstrates error handling with the core/status package. |
|
basic-formats
command
This sample demonstrates output formats: the setting that decides how a model's text is parsed back into Go values, and what a streamed chunk means along the way.
|
This sample demonstrates output formats: the setting that decides how a model's text is parsed back into Go values, and what a streamed chunk means along the way. |
|
basic-media
command
This sample demonstrates media: reading a picture, making one, and making a video from one.
|
This sample demonstrates media: reading a picture, making one, and making a video from one. |
|
basic-middleware/filesystem
command
This sample demonstrates the Filesystem middleware, which grants the model scoped file access through list_files, read_file, write_file, and search_and_replace tools.
|
This sample demonstrates the Filesystem middleware, which grants the model scoped file access through list_files, read_file, write_file, and search_and_replace tools. |
|
basic-middleware/retry-fallback
command
This sample demonstrates composing the Retry and Fallback middlewares into a resilient model pipeline.
|
This sample demonstrates composing the Retry and Fallback middlewares into a resilient model pipeline. |
|
basic-middleware/skills
command
This sample demonstrates the Skills middleware, which offers the model a local library of specialised instructions stored as SKILL.md files.
|
This sample demonstrates the Skills middleware, which offers the model a local library of specialised instructions stored as SKILL.md files. |
|
basic-prompt-content
command
This sample demonstrates how a prompt turns your own data into a request.
|
This sample demonstrates how a prompt turns your own data into a request. |
|
basic-prompts
command
This sample demonstrates prompts, each defined twice: once inline in code with DefinePrompt, and once in a .prompt file (Dotprompt) looked up by name.
|
This sample demonstrates prompts, each defined twice: once inline in code with DefinePrompt, and once in a .prompt file (Dotprompt) looked up by name. |
|
basic-structured
command
This sample demonstrates typed output: the Go type you ask for is the schema the model is held to, so the answer comes back as a struct, not a string.
|
This sample demonstrates typed output: the Go type you ask for is the schema the model is held to, so the answer comes back as a struct, not a string. |
|
basic-tool-interrupts
command
This sample demonstrates tool interrupts, which are how Genkit does human in the loop (HITL): a tool pauses generation to ask a person, and resumes with their answer.
|
This sample demonstrates tool interrupts, which are how Genkit does human in the loop (HITL): a tool pauses generation to ask a person, and resumes with their answer. |
|
basic-tool-interrupts-exp
command
This sample is basic-tool-interrupts, written against the in-preview tools API in genkit/exp.
|
This sample is basic-tool-interrupts, written against the in-preview tools API in genkit/exp. |
|
basic-tools
command
This sample demonstrates tools: Go functions the model may call mid-answer, and what a tool hands back when its answer is more than one value.
|
This sample demonstrates tools: Go functions the model may call mid-answer, and what a tool hands back when its answer is more than one value. |
|
basic-tools-exp
command
This sample is basic-tools, written against the in-preview tools API in genkit/exp.
|
This sample is basic-tools, written against the in-preview tools API in genkit/exp. |
|
compat_oai/anthropic
command
This sample demonstrates the Anthropic plugin for the OpenAI-compatible endpoint: a streaming flow that generates a joke with a model pinned through anthropic.ModelRef and its typed config.
|
This sample demonstrates the Anthropic plugin for the OpenAI-compatible endpoint: a streaming flow that generates a joke with a model pinned through anthropic.ModelRef and its typed config. |
|
compat_oai/custom
command
This sample demonstrates the base compat_oai plugin pointed at a custom OpenAI-compatible provider, here OpenRouter: a streaming flow that generates a joke with a model that resolves dynamically by name and takes the OpenAI SDK's own request type as its config.
|
This sample demonstrates the base compat_oai plugin pointed at a custom OpenAI-compatible provider, here OpenRouter: a streaming flow that generates a joke with a model that resolves dynamically by name and takes the OpenAI SDK's own request type as its config. |
|
compat_oai/dashscope
command
This sample demonstrates the DashScope plugin for Alibaba Cloud's Qwen models: a streaming flow that generates a joke with a model pinned through dashscope.ModelRef and its typed config.
|
This sample demonstrates the DashScope plugin for Alibaba Cloud's Qwen models: a streaming flow that generates a joke with a model pinned through dashscope.ModelRef and its typed config. |
|
compat_oai/deepseek
command
This sample demonstrates the DeepSeek plugin: a streaming flow that generates a joke with a model pinned through deepseek.ModelRef and its typed config.
|
This sample demonstrates the DeepSeek plugin: a streaming flow that generates a joke with a model pinned through deepseek.ModelRef and its typed config. |
|
compat_oai/kimi
command
This sample demonstrates the Kimi plugin for Moonshot AI's models: a streaming flow that generates a joke with a model pinned through kimi.ModelRef and its typed config.
|
This sample demonstrates the Kimi plugin for Moonshot AI's models: a streaming flow that generates a joke with a model pinned through kimi.ModelRef and its typed config. |
|
compat_oai/openai
command
This sample demonstrates the OpenAI plugin: a streaming flow that generates a joke with a model pinned through oai.ModelRef and the OpenAI SDK's own request type as its config.
|
This sample demonstrates the OpenAI plugin: a streaming flow that generates a joke with a model pinned through oai.ModelRef and the OpenAI SDK's own request type as its config. |
|
compat_oai/openrouter
command
This sample demonstrates the OpenRouter plugin: a streaming flow that generates a joke through a model named with its upstream vendor's prefix, routed to the cheapest provider serving it, with a second model to fall back to.
|
This sample demonstrates the OpenRouter plugin: a streaming flow that generates a joke through a model named with its upstream vendor's prefix, routed to the cheapest provider serving it, with a second model to fall back to. |
|
compat_oai/xai
command
This sample demonstrates the xAI plugin for the Grok models: a streaming flow that generates a joke with a model pinned through xai.ModelRef and its typed config.
|
This sample demonstrates the xAI plugin for the Grok models: a streaming flow that generates a joke with a model pinned through xai.ModelRef and its typed config. |
|
compat_oai/zai
command
This sample demonstrates the Z.ai plugin for the GLM models: a streaming flow that generates a joke with a model pinned through zai.ModelRef and its typed config.
|
This sample demonstrates the Z.ai plugin for the GLM models: a streaming flow that generates a joke with a model pinned through zai.ModelRef and its typed config. |
|
durable-streaming-firestore
command
This sample demonstrates durable streaming with Firestore backend.
|
This sample demonstrates durable streaming with Firestore backend. |
|
firebase-retrievers
command
|
|
|
mcp-ception
command
|
|
|
mcp-client
command
|
|
|
mcp-server
command
|
|
|
menu
command
|
|
|
modelgarden
command
|
|
|
modelgarden-llama
command
|
|
|
modelgarden-mistral
command
|
|
|
ollama-tools
command
|
|
|
ollama-vision
command
|
|
|
pgvector
command
This program can be manually tested like so:
|
This program can be manually tested like so: |
|
rag
command
|
|
|
vectorsearch-biqguery
command
|
|
|
vectorsearch-firestore
command
|
|
|
tests
|
|
|
test_app
command
This program doesn't do anything interesting.
|
This program doesn't do anything interesting. |
Click to show internal directories.
Click to hide internal directories.