New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

genkit

Package Overview
Dependencies
Maintainers
4
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

genkit

Genkit AI framework

  • 1.0.0-rc.19
  • next
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8.9K
increased by14.3%
Maintainers
4
Weekly downloads
 
Created
Source

Genkit

Genkit is a framework for building AI-powered applications. It provides open source libraries for Node.js and Go, along with tools to help you debug and iterate quickly.

Prerequisites

This guide assumes that you're familiar with building applications with Node.js.

To complete this quickstart, make sure that your development environment meets the following requirements:

  • Node.js v20+
  • npm

Install Genkit dependencies

Install the following Genkit dependencies to use Genkit in your project:

  • genkit provides Genkit core capabilities.
  • @genkit-ai/googleai provides access to the Google AI Gemini models. Check out other plugins: https://www.npmjs.com/search?q=keywords:genkit-plugin
npm install genkit @genkit-ai/googleai

Make your first request

Get started with Genkit in just a few lines of simple code.

// import the Genkit and Google AI plugin libraries
import { gemini15Flash, googleAI } from '@genkit-ai/googleai';
import { genkit } from 'genkit';

// configure a Genkit instance
const ai = genkit({
  plugins: [googleAI()],
  model: gemini15Flash, // set default model
});

(async () => {
  // make a generation request
  const { text } = await ai.generate('Hello, Gemini!');
  console.log(text);
})();

Next steps

Now that you’re set up to make model requests with Genkit, learn how to use more Genkit capabilities to build your AI-powered apps and workflows. To get started with additional Genkit capabilities, see the following guides:

  • Developer tools: Learn how to set up and use Genkit’s CLI and developer UI to help you locally test and debug your app.
  • Generating content: Learn how to use Genkit’s unified generation API to generate text and structured data from any supported model.
  • Creating flows: Learn how to use special Genkit functions, called flows, that provide end-to-end observability for workflows and rich debugging from Genkit tooling.
  • Managing prompts: Learn how Genkit helps you manage your prompts and configuration together as code.

License: Apache 2.0

Keywords

FAQs

Package last updated on 07 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc