Framework Integrations
TapPass works with any framework that uses the OpenAI or Anthropic SDK. Set the base URL and every call routes through governance.
Zero-code (environment variables)
Section titled “Zero-code (environment variables)”# OpenAI-compatible tools (Copilot, Cursor, CrewAI, LangChain, LlamaIndex)export OPENAI_BASE_URL=http://localhost:9620/v1export OPENAI_API_KEY=tp_...
# Anthropic tools (Claude Code, Cline)export ANTHROPIC_BASE_URL=http://localhost:9620export ANTHROPIC_API_KEY=tp_...Your existing tools work unchanged. Every call routes through governance.
Supported frameworks
Section titled “Supported frameworks”| Framework | Integration | Example |
|---|---|---|
| OpenAI SDK | base_url="http://tappass:9620/v1" | openai_basic.py |
| OpenAI streaming | Same: streaming works out of the box | openai_streaming.py |
| LangChain | ChatOpenAI(base_url=agent.gateway_url) | langchain_agent.py |
| CrewAI | agent.configure_environment() | crewai_research.py |
| LlamaIndex | OpenAI(api_base=agent.gateway_url) | llamaindex_rag.py |
| Pydantic AI | OpenAIModel(base_url=agent.gateway_url) | pydantic_ai_agent.py |
| Anthropic / Claude | ANTHROPIC_BASE_URL=http://tappass:9620 | anthropic_claude.py |
| FastAPI | Inject Agent as a dependency | fastapi_service.py |
| Any HTTP client | POST /v1/chat/completions | plain_httpx.py |
| VS Code / Cursor | Set base URL in extension settings | env_vars_only.md |
Python SDK
Section titled “Python SDK”from tappass import Agent
agent = Agent("http://localhost:9620", "tp_...")
# Governed chatresponse = agent.chat("What are the GDPR requirements?")print(response.content)
# Streamingfor chunk in agent.stream("Write a compliance report"): print(chunk, end="", flush=True)
# Govern existing tools (CrewAI, LangChain, LlamaIndex)tools = agent.govern([search, send_email])OpenFang agents
Section titled “OpenFang agents”See the OpenFang integration guide for governing OpenFang agents with TapPass.