Skip to content

Framework Integrations

TapPass works with any framework that uses the OpenAI or Anthropic SDK. Set the base URL and every call routes through governance.

Terminal window
# OpenAI-compatible tools (Copilot, Cursor, CrewAI, LangChain, LlamaIndex)
export OPENAI_BASE_URL=http://localhost:9620/v1
export OPENAI_API_KEY=tp_...
# Anthropic tools (Claude Code, Cline)
export ANTHROPIC_BASE_URL=http://localhost:9620
export ANTHROPIC_API_KEY=tp_...

Your existing tools work unchanged. Every call routes through governance.

FrameworkIntegrationExample
OpenAI SDKbase_url="http://tappass:9620/v1"openai_basic.py
OpenAI streamingSame: streaming works out of the boxopenai_streaming.py
LangChainChatOpenAI(base_url=agent.gateway_url)langchain_agent.py
CrewAIagent.configure_environment()crewai_research.py
LlamaIndexOpenAI(api_base=agent.gateway_url)llamaindex_rag.py
Pydantic AIOpenAIModel(base_url=agent.gateway_url)pydantic_ai_agent.py
Anthropic / ClaudeANTHROPIC_BASE_URL=http://tappass:9620anthropic_claude.py
FastAPIInject Agent as a dependencyfastapi_service.py
Any HTTP clientPOST /v1/chat/completionsplain_httpx.py
VS Code / CursorSet base URL in extension settingsenv_vars_only.md
from tappass import Agent
agent = Agent("http://localhost:9620", "tp_...")
# Governed chat
response = agent.chat("What are the GDPR requirements?")
print(response.content)
# Streaming
for 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])

See the OpenFang integration guide for governing OpenFang agents with TapPass.