跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
AI 与知识库

ai-llm-integration-expert

Expert guide for integrating Large Language Models (LLMs), Model Context Protocol (MCP v1.x), hybrid reasoning models, RAG architecture, vector databases, and AI agents / Panduan ahli untuk integrasi LLM, Model Context Protocol (MCP), model hybrid reasoning, arsitektur RAG, vector database, dan agen AI.

roedyrustam · 已有静态检查记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add roedyrustam/vibes-plug --skill ai-llm-integration-expert

技能说明


name: ai-llm-integration-expert description: "Expert guide for integrating Large Language Models (LLMs), Model Context Protocol (MCP v1.x), hybrid reasoning models, RAG architecture, vector databases, and AI agents / Panduan ahli untuk integrasi LLM, Model Context Protocol (MCP), model hybrid reasoning, arsitektur RAG, vector database, dan agen AI." author: "Roedy Rustam"

version: "3.0.0"

AI & LLM Integration Expert (2026 Edition)

English | Bahasa Indonesia


English

Description

Production-grade guidelines for integrating AI, Model Context Protocol (MCP), hybrid reasoning models, and Large Language Models (LLMs) into modern software architectures. Covers hybrid reasoning token streaming, Streamable HTTP MCP transports, agentic memory architectures, native context caching, RAG pipelines, and multi-model orchestration.

Trigger Conditions

  • Integrating frontier reasoning models: Anthropic Claude 3.7 Sonnet (Hybrid/Extended Thinking), Google Gemini 3.8 Flash / 3.1 Pro (Thinking Mode), OpenAI o1 / o3 / o3-mini / GPT-4.5 / GPT-4o, DeepSeek-R1 / V3, or open-source weights (Llama 4, Qwen 2.5/3 Coder).
  • Implementing Model Context Protocol (MCP) server or client integrations with Streamable HTTP transport or MCP Sampling.
  • Building AI chatbots, copilots, or autonomous AI agent workflows (LangGraph, OpenAI Agents SDK, Google ADK, Mastra.ai, Vercel AI SDK 5.x/6.x).
  • Managing streaming reasoning tokens (<think> chunks) separately from final output in user interfaces.
  • Implementing hybrid RAG with vector databases (Supabase pgvector HNSW, Qdrant, Pinecone) and cross-encoder rerankers.
  • Building agentic memory systems (short-term, long-term semantic, episodic) using Mem0 or vector stores.
  • Implementing cost optimization with provider-native Context Caching (Gemini cachedContent, Anthropic ephemeral prompt cache, OpenAI prefix cache).

Model Capability Matrix (2026)

ProviderModelContextReasoning TypePrimary Strength
AnthropicClaude 3.7 Sonnet200KHybrid Thinking (Standard + Extended)Code generation, complex reasoning, Computer Use
AnthropicClaude 3.5 / 4 Opus200KDeep DeliberationDeep architectural synthesis, policy analysis
GoogleGemini 3.8 Flash1M–2MFlash Thinking (Configurable Budget)Ultra-low latency, multimodal live, high-frequency loops
GoogleGemini 3.1 / 3.5 Pro2MExtended ReasoningNeedle-in-a-haystack, long-context repos, deep research
OpenAIo3 / o3-mini200KNative Test-Time ReasoningMath, competitive coding, formal logic verification
OpenAIGPT-4.5 / GPT-4o128KDirect Instruction & Fast ToolingLow-latency voice, structured JSON, tool-calling
DeepSeekDeepSeek-R1128KOpen Reasoning (Distill & MoE)State-of-the-art open weights reasoning, math, coding
DeepSeekDeepSeek-V3128KGeneral Multimodal / TextHigh throughput, extremely cost-efficient coding
QwenQwen 2.5 / 3 Coder128KOpen Source Code SpecialistSelf-hosted coding agent, local copilot integration

Core Architecture Guidelines

1. Hybrid Reasoning & Streaming Token Handling

Modern frontier models emit internal thinking/reasoning tokens during test-time compute:

  • Thinking Token Separation: Separate internal <think> or reasoning chunks from conversational output. Stream reasoning into collapsible UI accordion blocks while presenting clean output to the user.
  • Vercel AI SDK 5.x/6.x Integration:
    import { streamText } from 'ai';
    import { anthropic } from '@ai-sdk/anthropic';
    
    const result = streamText({
      model: anthropic('claude-3-7-sonnet-20250219'),
      providerOptions: {
        anthropic: {
          thinking: { type: 'enabled', budgetTokens: 4096 },
        },
      },
      prompt: 'Refactor this distributed consensus engine...',
    });
    
    // Access reasoning stream alongside main text
    for await (const part of result.fullStream) {
      if (part.type === 'reasoning') {
        process.stdout.write(`[Thinking]: ${part.textDelta}`);
      } else if (part.type === 'text-delta') {
        process.stdout.write(part.textDelta);
      }
    }
    
  • Thinking Token Overflow Handling: If max_tokens cuts off reasoning before output generation (e.g., <think> block doesn't close), detect missing closing tags and dynamically increase budget/retry or append a forceful closing prompt block.
  • Multi-Provider Thinking Configuration: Use Anthropic thinking parameter (budgetTokens), Google thinkingConfig (set to true with budget logic), and OpenAI reasoning tokens (via reasoning_effort: "high").

2. Model Context Protocol (MCP) — Streamable HTTP & Sampling

Standardize all agent-tool and agent-host communications using MCP specifications:

  • Streamable HTTP Transport: Modern cloud deployments use Streamable HTTP (bidirectional JSON-RPC streaming over HTTP POST/SSE hybrid) instead of fragile stdio connections.
  • MCP Sampling: Allow MCP servers to request LLM completions back from the host client, enabling nested agentic tools without distributing API keys to tool servers.
  • Authorization & Security: Enforce OAuth 2.1 scoped bearer tokens on remote MCP endpoints. Validate all incoming tool inputs using strict Zod schemas.

3. Agentic Memory Architecture

Production AI agents require multi-layered memory:

  • In-Context Working Memory: Pass recent turn messages within the prompt window.
  • Long-Term Semantic Memory: Embed user preferences and facts using pgvector (HNSW index) or Qdrant; perform cosine similarity searches.
  • Episodic Memory (Mem0 / Letta (formerly MemGPT)): Automatically synthesize session checkpoints and index past user decisions for human-like recall.
  • Knowledge Graph Memory: Maintain structured entity-relationship t
阅读完整来源 ↗