Sign In

@agentskit/adapters

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@agentskit/adapters

Provider adapters for AgentsKit.

Source
npmnpm
Version
0.4.2
Version published
Weekly downloads
323
-81.71%
Maintainers
1
Weekly downloads
 
Created
Source

@agentskit/adapters

Connect to any LLM provider — and swap between them — without touching your app code.

Why

  • Vendor independence — switch from OpenAI to Anthropic to a local Ollama model by changing one line; your hooks, runtime, and tools stay untouched
  • 10+ providers included — Anthropic, OpenAI, Gemini, Ollama, DeepSeek, Grok, Kimi, LangChain, Vercel AI SDK, and any raw ReadableStream
  • Embedder functions built in — the same adapter pattern covers text embeddings, so you can reuse provider config for both chat and RAG

Install

npm install @agentskit/adapters

Quick example

import { anthropic, openai, ollama } from '@agentskit/adapters'
import { createRuntime } from '@agentskit/runtime'

// Switch provider by swapping one import
const adapter = anthropic({ apiKey: process.env.ANTHROPIC_API_KEY, model: 'claude-sonnet-4-6' })
// const adapter = openai({ apiKey: process.env.OPENAI_API_KEY, model: 'gpt-4o' })
// const adapter = ollama({ model: 'llama3.1' })

const runtime = createRuntime({ adapter })
const result = await runtime.run('Summarize the latest AI news')
console.log(result.content)

Embeddings (for RAG)

Use the same package for vector embeddings — wire openaiEmbedder, geminiEmbedder, or ollamaEmbedder into @agentskit/rag:

import { openaiEmbedder } from '@agentskit/adapters'
import { createRAG } from '@agentskit/rag'
import { fileVectorMemory } from '@agentskit/memory'

const rag = createRAG({
  embed: openaiEmbedder({ apiKey: process.env.OPENAI_API_KEY! }),
  store: fileVectorMemory({ path: './vectors' }),
})

Next steps

Ecosystem

PackageRole
@agentskit/coreAdapter, EmbedFn, types
@agentskit/runtimeHeadless createRuntime
@agentskit/ragcreateRAG + embedders
@agentskit/memoryVector + chat memory backends

Docs

Full documentation

Keywords

agentskit

FAQs

Package last updated on 07 Apr 2026

Related posts