Index of every page on this site: llms.txt
All skills
genkit-ai avatar

/developing-genkit-dart

@d12c988
by Genkitgenkit-ai/skills40 stars
13
Run it yourself

Provides guidance on developing AI-powered applications using the Genkit Dart SDK. Use when the user asks to build AI agents in Dart, use Genkit flows, or integrate LLMs into Dart/Flutter applications. Don't use for Genkit in JavaScript/TypeScript, Go, or Python.

Use this Skill: https://skilld.dev/gh/genkit-ai/skills/developing-genkit-dart

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesgenkit_vertexai.md

≈675 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Genkit Vertex AI Plugin (genkit_vertexai)

Gemini models and embedders through Vertex AI (Gemini Enterprise API), with Google Cloud authentication instead of an API key. Same model surface and option types as genkit_google_genai, which it re-exports (GeminiOptions, GeminiThinkingConfig, GoogleGenAiEmbedderOptions, ...).

dart pub add genkit genkit_vertexai

Setup

import 'package:genkit/genkit.dart';
import 'package:genkit_vertexai/genkit_vertexai.dart';

void main() async {
  final ai = Genkit(
    plugins: [
      vertexAI(
        projectId: 'my-project', // default: $GOOGLE_CLOUD_PROJECT / $GCLOUD_PROJECT
        location: 'us-central1', // default: 'global'
      ),
    ],
  );

  final response = await ai.generate(
    model: vertexAI.gemini('gemini-3.6-flash'),
    prompt: 'Tell me a joke about a developer.',
    use: [retry()],
  );
  print(response.text);
}
  • Auth: Application Default Credentials. Locally run gcloud auth application-default login; on Cloud Run and other Google Cloud runtimes it is automatic. The account needs roles/aiplatform.user.
  • No API key. For API-key access use genkit_google_genai (googleAI()).
  • authClient: takes your own authenticated http.Client; the plugin never closes it.

Model IDs

Use versioned Vertex model IDs (gemini-3.6-flash, gemini-3.1-pro-preview, gemini-3.5-flash-lite, ...). The Gemini API's -latest aliases (gemini-flash-latest, gemini-pro-latest) do not exist on Vertex and fail at request time. Vertex TTS models use their own IDs (e.g. gemini-2.5-flash-tts), not the Gemini API TTS names.

final response = await ai.generate(
  model: vertexAI.gemini('gemini-3.6-flash'),
  prompt: 'What are the top tech news stories this week?',
  config: GeminiOptions(
    thinkingConfig: GeminiThinkingConfig(thinkingLevel: 'LOW'),
    googleSearch: GeminiGoogleSearch(),
  ),
);

Embeddings

text-embedding-*, gemini-embedding-* and multimodalembedding all go through vertexAI.textEmbedding:

final embeddings = await ai.embed(
  embedder: vertexAI.textEmbedding('gemini-embedding-001'),
  documents: [DocumentData(content: [TextPart(text: 'Hello world')])],
  options: GoogleGenAiEmbedderOptions(
    outputDimensionality: 256,
    taskType: 'RETRIEVAL_DOCUMENT',
  ),
);

multimodalembedding embeds text, images and video (MediaPart with a data:, gs:// or https URL plus contentType). One document can yield several embeddings (one per modality / video segment); map them back with embedding.metadata?['documentIndex'], ['modality'], ['partIndex'], ['segmentIndex'].

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 alert2d4 checks · Risk SAFE
  • Gen Agent Trust Hub3d

    The Genkit Dart skill provides comprehensive documentation and examples for building AI agents and flows using the Genkit framework. It includes guidance on using A2UI for interactive interfaces, managing agent sessions, and implementing middleware for filesystem access and multi-agent orchestration. While the skill includes instructions for installing the Genkit CLI from a vendor-controlled domain, its primary security considerations involve the attack surface for indirect prompt injection created by agents that ingest external data while possessing capabilities such as file modification and command execution.

  • Socket2d

    No alerts

  • Snyk3d

    Risk: CRITICAL · 2 issues

  • Runlayer8mo

    2/11 files flagged

Signed by skilld at d12c988. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 4 days ago.

Activeupdated 5 days ago
metadata
{
  "version": "1.0.0",
  "category": "AiAndMachineLearning"
}

README badge

README badge for genkit-ai/skills/developing-genkit-dart