Ecosystem Integrations
Zero-Fork vLLM Plugin (vllm.general_plugins)
Installing dag-kv automatically registers the vllm.general_plugins entry point (dag_kv.integrations.vllm_plugin:register). When vLLM boots and runs vllm.plugins.load_general_plugins(), DAGKVvLLMConnector (subclassing KVConnectorBase_V1 on vLLM 0.8+/0.34.0 with full 7-method lifecycle and KVConnectorBase on vLLM 0.6.x) and DAGKVvLLMAttentionBackend (vllm.v1.attention.backend.AttentionBackend) are auto-registered and live GPU-verified on NVIDIA H200 (vllm 0.34.0: 0.0 KV roundtrip diff, 0.000488 attention diff):
pip install dag-kv
vllm serve Qwen/Qwen2.5-3B-Instruct \
--kv-transfer-config '{"kv_connector":"DAGKVConnector","kv_role":"kv_both"}'
Programmatic vLLM building blocks are also exposed directly:
from dag_kv.integrations.vllm import (
DAGKVvLLMBlockManagerPlugin,
DAGKVvLLMAttentionAdapter,
DAGKVvLLMKVConnector,
)
from dag_kv import DAGKVvLLMConnector
LangChain
from dag_kv.integrations.langchain import DAGKVLangChainRunnable
chain = DAGKVLangChainRunnable(engine, max_new_tokens=64)
answer = chain.invoke({"documents": retrieved_docs, "question": "Summarize the auth flow."})
LlamaIndex
from dag_kv.integrations.llamaindex import DAGKVResponseSynthesizer
synth = DAGKVResponseSynthesizer(engine)
res = synth.synthesize("What port does Postgres use?", reranked_nodes)
print(res["response"], f"cache_hit_rate={res['cache_hit_rate']:.0%}")
Model Context Protocol (MCP) for Coding Agents
Connect Claude Code, Cursor, or Cline directly to DAG-KV over stdio:
dag-kv mcp --model Qwen/Qwen2.5-3B-Instruct --quantization k8v4
Exposed MCP tools:
- dagkv_prefill_chunk
- dagkv_sync_file_ast
- dagkv_invalidate_chunk
- dagkv_cache_stats
- dagkv_query_dag