Integration Guide

Connect any AI agent to TameFlare with zero code changes. TameFlare works at the transport layer - it intercepts HTTP traffic via a proxy, so it works with any language, framework, or tool.


Step 1: Create a gateway

Go to tameflare.com/dashboard/gateways and click Create gateway. Name your gateway (e.g. "dev-bot", "ci-agent"), then the wizard walks you through:

  1. Connectors - select which APIs this gateway can access (GitHub, OpenAI, Stripe, etc.), paste API keys, test connection
  2. Access Rules - per connector: toggle action categories on/off, set per-action overrides (allow / deny / require approval)
  3. Notifications - TameFlare dashboard (always on) + optional Slack
  4. Review - pre-flight checklist, then click Create gateway

After creation, the dashboard shows your Gateway ID and Gateway Token.


Step 2: Log in and initialize

tf login    # Opens browser - authorize the CLI (one-time per machine)
tf init     # Auto-detects your gateway, saves config

tf login opens your browser to tameflare.com where you click Authorize. Credentials are saved to ~/.tameflare/credentials.json. Then tf init fetches your gateways and selects one (or prompts you to pick if you have multiple).

For CI/CD (headless environments), use the manual approach instead:

tf init --gateway-id gw_xxx --gateway-token gwtk_xxx

Step 3: Run your agent

tf run -- python my_agent.py
tf run -- node my_agent.js
tf run -- ./my_agent

That's it. All outbound HTTP traffic is now routed through proxy.tameflare.com. The agent never sees real API keys.


Step 4: Monitor

Use the CLI or dashboard:

tf status                     # Gateway config + connectivity
tf logs                       # Opens dashboard traffic view

Or use the dashboard at tameflare.com/dashboard for a full view of traffic, approvals, and audit history.


Available connectors

ConnectorDomainsActions
githubapi.github.com20+ (PRs, issues, branches, releases, files, repos)
openaiapi.openai.com24+ (chat, embeddings, images, audio, files, fine-tuning)
anthropicapi.anthropic.com2+ (messages, models)
stripeapi.stripe.com40+ (charges, refunds, payments, subscriptions, invoices)
slackslack.com, api.slack.com35+ (messages, channels, files, users, admin)
mcpConfigurableJSON-RPC tool calls (tools/call, tools/list)
webhookAny domainGeneric HTTP (POST, GET, PUT, PATCH, DELETE)
genericAny domainMethod-based (GET, POST, PUT, DELETE)

See Connectors for full details on each connector.


Why proxy mode works

  • Zero code changes - works with any agent, any language
  • Deny-all default - no connector = no access
  • Credential isolation - agent never sees real API keys
  • Hold-connection approvals - proxy holds HTTP request until human approves
  • Strong enforcement - all HTTP/HTTPS traffic is routed through the proxy; for full bypass-resistance, pair with OS-level egress restrictions

Credential vault

When you create a gateway in the dashboard wizard, you paste API keys into the encrypted vault. The gateway injects these credentials into allowed requests at proxy time.

CredentialWhere to add it
GitHub PATGateway wizard > GitHub connector > API key field
OpenAI API keyGateway wizard > OpenAI connector > API key field
Stripe secret keyGateway wizard > Stripe connector > API key field
Slack bot tokenGateway wizard > Slack connector > API key field
Any HTTP API keyGateway wizard > Generic HTTP or Webhook connector > API key field
Note
Credentials are encrypted at rest with AES-256-GCM. The agent process only sees the proxy URL - never the real API keys. Remove API keys from your agent's environment variables.

How framework interception works

TameFlare intercepts HTTP traffic at the transport layer, not the framework layer. This means it works with any agent framework without plugins or adapters.

ApproachHow it worksLimitation
Framework pluginHook into LangChain/CrewAI tool systemOnly works with that framework. Requires code changes.
SDK wrapperWrap each tool call with a checkRequires code changes per tool. Agent can skip the check.
Transport interception (TameFlare)Set HTTP_PROXY / HTTPS_PROXY env vars. All HTTP calls go through the proxy.Works with everything. Strong enforcement for HTTP/HTTPS; pair with egress rules for full isolation.

When you run tf run -- python my_agent.py, TameFlare sets HTTP_PROXY / HTTPS_PROXY (and lowercase variants) to https://{token}@proxy.tameflare.com for the child process. Most HTTP libraries respect these variables automatically (see compatibility table below). For full bypass-resistance, pair with OS-level egress controls.

Framework compatibility

FrameworkProxy supportNotes
LangChainAutomaticUses requests/httpx which respect HTTP_PROXY
CrewAIAutomaticUses requests under the hood
n8nAutomaticNode.js fetch/axios respect proxy env vars
OpenClawAutomaticStandard HTTP client
Claude CodeAutomaticUses Node.js HTTP client
Custom PythonAutomaticrequests, httpx, urllib3 all respect proxy
Custom Node.jsAutomaticfetch, axios, node-fetch all respect proxy
Custom GoAutomaticnet/http respects HTTP_PROXY by default
Shell scripts (curl)Automaticcurl respects proxy env vars
Tip
The proxy works with Python, Node.js, Go, shell scripts, LangChain, CrewAI, OpenClaw, n8n, and any tool that makes HTTP calls.

Multiple gateways

Create separate gateways in the dashboard for different agents or environments, each with their own connectors and permissions:

# Dev directory - full access gateway
cd ~/dev-agent && tf init --list && tf run -- python dev_agent.py
 
# CI directory - read-only GitHub gateway
cd ~/ci-agent && tf init --gateway-id gw_ci --gateway-token gwtk_xxx && tf run -- ./deploy.sh
 
# Prod directory - approval required for writes
cd ~/prod-agent && tf init --list && tf run -- python prod_agent.py

Each directory has its own .tf/config.yaml pointing to a different gateway. Each gateway has its own token, connectors, and permissions.


Recommended rollout

StepActionEnforcement
1Create gateway in dashboard, add connectors, set permissions-
2tf run with monitor enforcement levelAll traffic forwarded, decisions logged but not enforced
3Review traffic in dashboard for 1-2 weeks, tune permissionsStill monitor
4Switch to soft_enforce in dashboardDenies logged as would_deny, still forwarded
5Switch to full_enforceDenied requests return 403
Tip
Start with monitor mode to observe real agent behavior before enforcing. This prevents false positives that block legitimate work.

Troubleshooting

ProblemSolution
Agent traffic not proxiedEnsure you used tf run - it sets HTTP_PROXY / HTTPS_PROXY (and lowercase variants)
Agent gets 403 from proxyCheck the dashboard traffic view for the denied action. Add a permission rule or switch to monitor mode
Approval never resolvesCheck the dashboard approvals page. Approvals expire after 5 minutes
Kill switch blocking everythingDisable the kill switch in the dashboard
Agent gets 407 Proxy Auth RequiredCheck that the gateway token is correct (tf status) and the gateway is active in the dashboard
tf init failsEnsure you've run tf login first, or pass --gateway-id and --gateway-token for CI/CD
Approval never arrives in SlackCheck Slack integration in Settings (bot token, signing secret, channel ID)

Next steps