---
title: Supported frameworks
summary: Every TypeScript and Python adapter, the entrypoint for each, and the versions it accepts.
canonical: https://docs.caveman.so/docs/sdk/middleware/frameworks
license: MIT
capability: sdk-ts
updated: 2026-09-16T21:32:40-07:00
basis: inferred
---

# Supported frameworks

> Every TypeScript and Python adapter, the entrypoint for each, and the versions it accepts.
Every Caveman middleware adapter, the module it is imported from, and the framework versions it accepts. Outside the accepted range an adapter reports `unsupported_version` and leaves the call unchanged. Every range below is the literal pair of bounds in the published package's own version gate.

## TypeScript

`@caveman-ai/middleware` 0.1.0-alpha.2.

| Adapter | Import | Accepted versions | Example |
|---|---|---|---|
| Vercel AI SDK | `@caveman-ai/middleware/ai-sdk` | `ai >=7.0.94 <8`, `@ai-sdk/provider >=4.0.11 <5` | [ai-sdk.mjs](/examples/middleware/typescript/ai-sdk.mjs) |
| OpenAI | `@caveman-ai/middleware/openai` | `openai >=7.12 <8` | [openai.mjs](/examples/middleware/typescript/openai.mjs) |
| Anthropic | `@caveman-ai/middleware/anthropic` | `@anthropic-ai/sdk >=0.124 <1` | [anthropic.mjs](/examples/middleware/typescript/anthropic.mjs) |
| Google Gen AI | `@caveman-ai/middleware/google` | `@google/genai >=2.21 <3` | [google.mjs](/examples/middleware/typescript/google.mjs) |
| LangChain | `@caveman-ai/middleware/langchain` | `langchain >=1.5 <2`, `@langchain/core >=1.2 <2`, `@langchain/langgraph >=1.4 <2` | [langchain.mjs](/examples/middleware/typescript/langchain.mjs) |
| Strands | `@caveman-ai/middleware/strands` | `@strands-agents/sdk >=1.17 <2` | [strands.mjs](/examples/middleware/typescript/strands.mjs) |
| Mastra | `@caveman-ai/middleware/mastra` | `@mastra/core >=1.65 <2` | [mastra.mjs](/examples/middleware/typescript/mastra.mjs) |
| MCP | `@caveman-ai/middleware/mcp` | `@modelcontextprotocol/sdk >=1.30 <2` | [mcp.mjs](/examples/middleware/typescript/mcp.mjs) |

`@caveman-ai/middleware` declares no dependency on any of them, so `npm install @caveman-ai/middleware` brings in the adapters and nothing else. Install the framework the adapter wraps yourself. One import picks the adapter:

```ts
import { withCaveman } from "@caveman-ai/middleware/ai-sdk";
import { withCavemanOpenAI } from "@caveman-ai/middleware/openai";
import { withCavemanAnthropic } from "@caveman-ai/middleware/anthropic";
import { CavemanGoogleGenAI } from "@caveman-ai/middleware/google";
import { withCavemanAgent } from "@caveman-ai/middleware/langchain";
import { withCavemanStrands } from "@caveman-ai/middleware/strands";
import { withCavemanMastra } from "@caveman-ai/middleware/mastra";
import { CavemanMCPHost } from "@caveman-ai/middleware/mcp";
```

Each line needs its own framework resolvable. Import one adapter, not the eight together.

## Python

`caveman-middleware` 0.1.0a1, on Python 3.13 or newer. The extra in brackets installs that family's frameworks.

| Adapter | Import | Accepted versions | Example |
|---|---|---|---|
| OpenAI `[openai]` | `caveman_middleware.openai` | `openai >=3.10 <4` | [openai.py](/examples/middleware/python/openai.py) |
| Anthropic `[anthropic]` | `caveman_middleware.anthropic` | `anthropic >=1.4 <2` | [anthropic.py](/examples/middleware/python/anthropic.py) |
| Google Gen AI `[google]` | `caveman_middleware.google` | `google-genai >=2.22 <3` | [google.py](/examples/middleware/python/google.py) |
| LangChain `[langchain]` | `caveman_middleware.langchain` | `langchain >=1.4 <2`, `langchain-core >=1.6 <2`, `langgraph >=1.2 <2` | [langchain.py](/examples/middleware/python/langchain.py) |
| LiteLLM `[litellm]` | `caveman_middleware.litellm` | `litellm >=1.100 <2` | [litellm.py](/examples/middleware/python/litellm.py) |
| Strands `[strands]` | `caveman_middleware.strands` | `strands-agents >=1.55 <2` | [strands.py](/examples/middleware/python/strands.py) |
| Agno `[agno]` | `caveman_middleware.agno` | `agno >=3.0 <4` | [agno.py](/examples/middleware/python/agno.py) |
| CrewAI `[crewai]` | `caveman_middleware.crewai` | `crewai >=1.15 <2` | [crewai.py](/examples/middleware/python/crewai.py) |
| Pydantic AI `[pydantic-ai]` | `caveman_middleware.pydantic_ai` | `pydantic-ai-slim >=2.42 <3` | [pydantic_ai.py](/examples/middleware/python/pydantic_ai.py) |
| AutoGen `[autogen]` | `caveman_middleware.autogen` | `autogen-core`, `autogen-agentchat` and `autogen-ext`, each `>=0.7 <0.8` | [autogen.py](/examples/middleware/python/autogen.py) |
| LlamaIndex `[llama-index]` | `caveman_middleware.llama_index` | `llama-index-core >=0.14 <0.15` | [llama_index.py](/examples/middleware/python/llama_index.py) |
| MCP `[mcp]` | `caveman_middleware.mcp` | `mcp >=2.2 <3` | [mcp.py](/examples/middleware/python/mcp.py) |
| ASGI `[asgi]` | `caveman_middleware.asgi` | `fastapi >=0.141 <1`, `starlette >=1.6 <2` | [asgi.py](/examples/middleware/python/asgi.py) |

The LlamaIndex adapter gates the LLM integration it finds as well: `llama-index-llms-openai >=0.8 <1` with `openai >=2.54 <4`, or `llama-index-llms-anthropic >=0.12 <1` with `anthropic >=0.125 <2`.

Both gates read the leading numeric release segments and drop anything after them, so a prerelease or build suffix is compared as its release: `1.5.0rc1` and `1.5.0-beta.2` both count as `1.5.0`.

## What a version outside the range looks like

An adapter checks its gate before it touches history, tools or the transport. Outside the range it declines locally, sends nothing to the runtime, and passes the call through untouched. This is the `onReport` line from a run with `@caveman-ai/middleware` 0.1.0-alpha.2 against `ai` reporting 6.9.0, with the per-run ids shortened:

```json
{"schema_version":1,"status":"skipped","reason":"unsupported_version","transform_ids":[],"replacement_count":0,"reused_count":0,"adapter":"ai-sdk","logical_call_id":"a209549d…","attempt_id":"8af13b65…"}
```

`adapter` names which one declined, which is the field to read when an application wraps more than one call.
