genkit_skill
- Shell
24
GitHub Stars
2
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill supercent-io/skills-template --skill genkit- SKILL.md17.0 KB
- SKILL.toon3.1 KB
Overview
This skill helps you build production-ready AI workflows using Firebase Genkit. It provides primitives for type-safe flows, streaming, tool-calling agents, RAG pipelines, and deployment to Firebase or Cloud Run. It supports TypeScript, Go, and Python and integrates model plugins like Gemini, OpenAI, Anthropic, Ollama, and Vertex AI.
How this skill works
You define flows with input/output schemas (Zod or equivalent) and implement AI logic via genkit's generate, generateStream, and tool primitives. Flows are observable and deployable: the Dev UI traces model calls, embeddings, retrievals, and tool executions. Genkit integrates vector stores, prompt files (.prompt), session-backed chat, streaming chunk delivery, and wrappers for Firebase/Express/Cloud Run deployment.
When to use it
- Orchestrating multi-step AI pipelines with strict input/output types.
- Wrapping LLM interactions into deployable HTTP endpoints or Cloud Functions.
- Implementing tool-calling agents and multi-agent coordination for complex tasks.
- Building RAG systems with Pinecone, pgvector, Chroma, Firestore, or local dev stores.
- Streaming token-by-token responses for chat or long-form generation.
Best practices
- Always declare input and output schemas to ensure safety and Dev UI labeling.
- Wrap AI logic in flows so you get tracing, observability, and easy deployment.
- Keep API keys out of source; use env vars and Firebase Secrets in production.
- Handle null outputs from generate() by throwing meaningful errors.
- Use streamSchema and sendChunk for long outputs to improve client UX.
- Separate responsibilities into specialist agents rather than one monolith.
Example use cases
- A summarization API: define a summarizeFlow with input/output schemas and deploy to Cloud Run.
- A RAG Q&A endpoint that indexes docs, retrieves top-k results, then generates grounded answers.
- An agent that calls web search and a weather tool, then composes a user-facing reply.
- A streaming essay generator that pushes tokens to clients while saving the final output.
- A multi-agent content pipeline where researchAgent gathers facts and writerAgent drafts articles.
FAQ
Genkit supports TypeScript, Go, and Python and plugins for Google AI (Gemini), OpenAI, Anthropic, Ollama, Vertex AI, and others.
How do I deploy flows to production?
Export flows as Firebase onCallGenkit functions, attach secrets, or expose them via expressHandler and deploy to Cloud Run or any HTTP server.
How do I handle long-form or real-time outputs?
Define a flow with streamSchema and use ai.generateStream plus sendChunk to push token chunks to clients, then return the final assembled output.