Integration Overview

deepseek-kit can work alongside frameworks like AI SDK and LangChain — embedding DeepSeek agents as subagents in other frameworks, or bringing other frameworks' agents in as tools for deepseek-kit.

DeepSeek V4 currently doesn't support multimodal input (images, audio, files, etc.), while many real-world applications need to handle image understanding, voice interaction, and similar scenarios. By integrating deepseek-kit with frameworks like AI SDK and LangChain that support multimodality, you can let each framework do what it does best — deepseek-kit handles efficient text reasoning and tool calling, while other frameworks handle multimodal perception and proprietary model calls.

Why Integration?

ScenarioDescription
Multimodal InputUsers send images, PDFs, and other multimodal content that requires a multimodal model to understand before passing to DeepSeek
Complementary CapabilitiesCertain tasks require specific model capabilities (e.g., OpenAI's DALL·E for image generation, Anthropic's long-text analysis)
Progressive MigrationExisting AI SDK or LangChain projects wanting to gradually adopt DeepSeek's cost advantages
Cost OptimizationSimple tasks use DeepSeek Flash, complex multimodal tasks use other models — allocate on demand

Two Integration Patterns

Pattern 1: deepseek-kit as a Subagent

Wrap deepseek-kit's agent as a tool, embedding it in an AI SDK or LangChain main agent. The main agent handles multimodal understanding and task distribution, while the DeepSeek agent handles text reasoning and tool calling:

Rendering Chart

Use cases:

  • User input contains images, files, or other multimodal content
  • Main workflow needs multimodal understanding, subtasks only need text processing
  • Want to introduce DeepSeek into an existing AI SDK/LangChain project

Pattern 2: Other Frameworks as Subagents

Wrap AI SDK or LangChain agents as tools, embedding them in a deepseek-kit main agent. The DeepSeek agent serves as the orchestrator, calling other frameworks when multimodal capabilities are needed:

Rendering Chart

Use cases:

  • Most tasks are text reasoning, with occasional need for multimodal capabilities
  • Want deepseek-kit as the primary framework, calling other models on demand
  • Leverage DeepSeek's low-cost advantage for handling primary traffic

Choosing a Pattern

Considerationdeepseek-kit as SubagentOther Frameworks as Subagents
Primary frameworkAI SDK / LangChaindeepseek-kit
Multimodal frequencyFrequentOccasional
Cost controlMain framework bears multimodal costsDeepSeek handles primary traffic at lower cost
Code organizationMultimodal logic in main frameworkMultimodal logic encapsulated as tools
Migration costSuitable for existing projectsSuitable for new projects

Install Dependencies

Install the corresponding dependencies based on your chosen integration method:

# For AI SDK integration
pnpm add deepseek-kit ai @ai-sdk/openai

# For LangChain integration
pnpm add deepseek-kit langchain @langchain/openai

Next, choose the integration guide you need: