Skip to main content

Integrations

TealTiger integrates with popular AI frameworks and tools to add security, cost control, and governance to your existing stack.

How integrations work

TealTiger integrations wrap your existing code to add policy enforcement: Every integration provides:
  • Policy enforcement - Control what agents can do
  • Cost tracking - Monitor and limit spending
  • Audit logging - Track all decisions
  • Zero code changes - Drop-in replacements

Agent frameworks

Integrate TealTiger with popular agent frameworks:

Observability & monitoring

Export TealTiger data to your observability stack:

Integration patterns

TealTiger supports three integration patterns:

Pattern 1: Drop-in wrapper

Replace your existing client with a TealTiger-wrapped version:
// Before
import { ChatOpenAI } from 'langchain/chat_models/openai';
const model = new ChatOpenAI();

// After
import { TealTiger } from 'tealtiger';
import { ChatOpenAI } from 'langchain/chat_models/openai';

const teal = new TealTiger({ policies: { /* ... */ } });
const model = teal.wrap(new ChatOpenAI());

Pattern 2: Pre-action hook

Intercept actions before they execute:
import { TealTiger } from 'tealtiger';

const teal = new TealTiger({ policies: { /* ... */ } });

// Intercept tool calls
agent.onToolCall(async (tool, args) => {
  const decision = await teal.evaluate({
    action: 'tool.execute',
    tool: tool.name,
    arguments: args
  });
  
  if (decision.action === 'DENY') {
    throw new Error('Tool blocked by policy');
  }
  
  return tool.execute(args);
});

Pattern 3: Telemetry export

Export TealTiger decisions to your observability stack:
import { TealTiger } from 'tealtiger';

const teal = new TealTiger({
  policies: { /* ... */ },
  audit: {
    outputs: ['opentelemetry', 'langfuse']
  }
});

Quick start

Here’s a complete example integrating TealTiger with LangChain:
import { TealTiger, PolicyMode } from 'tealtiger';
import { ChatOpenAI } from 'langchain/chat_models/openai';
import { initializeAgentExecutorWithOptions } from 'langchain/agents';
import { Calculator } from 'langchain/tools/calculator';

// Initialize TealTiger
const teal = new TealTiger({
  policies: {
    tools: {
      calculator: { allowed: true },
      web_search: { allowed: false }
    },
    budget: {
      maxCostPerRequest: 0.50,
      maxCostPerDay: 100.00
    }
  },
  mode: {
    defaultMode: PolicyMode.ENFORCE
  }
});

// Wrap the model
const model = teal.wrap(new ChatOpenAI({
  modelName: 'gpt-4',
  temperature: 0
}));

// Create agent with wrapped model
const tools = [new Calculator()];
const agent = await initializeAgentExecutorWithOptions(
  tools,
  model,
  {
    agentType: 'zero-shot-react-description'
  }
);

// Use the agent (now with governance)
const result = await agent.call({
  input: 'What is 25 * 4?'
});

console.log(result.output);
// TealTiger automatically:
// - Checks policies before each tool call
// - Tracks costs
// - Logs all decisions

What integrations provide

Every TealTiger integration gives you:

Security controls

  • Block dangerous tools
  • Enforce role-based access
  • Detect prompt injection
  • Redact sensitive data

Cost management

  • Set budget limits
  • Track spending per request
  • Prevent runaway costs
  • Downgrade expensive models

Compliance

  • Audit all decisions
  • Redact PII automatically
  • Maintain evidence trails
  • Meet regulatory requirements

Reliability

  • Circuit breakers
  • Rate limiting
  • Timeout controls
  • Graceful degradation

Integration status

IntegrationStatusDocumentation
LangChain✅ AvailableView docs
CrewAI✅ AvailableView docs
OpenClaw✅ AvailableView docs
MCP✅ AvailableView docs
OpenTelemetry🚧 Coming soonView docs
Langfuse🚧 Coming soonView docs
LangSmith🚧 Coming soonView docs
Helicone🚧 Coming soonView docs

Need a custom integration?

Building a custom integration is straightforward:
  1. Identify the boundary - Where do you want to enforce policies? (model calls, tool execution, etc.)
  2. Wrap the call - Add teal.evaluate() before the action
  3. Handle the decision - Act on ALLOW, DENY, TRANSFORM, etc.
  4. Log the event - TealTiger handles audit logging automatically
Example custom integration:
class CustomTool {
  constructor(private teal: TealTiger) {}
  
  async execute(action: string, args: any) {
    // Evaluate policy
    const decision = await this.teal.evaluate({
      action: 'tool.execute',
      tool: action,
      arguments: args
    });
    
    // Handle decision
    if (decision.action === 'DENY') {
      throw new Error(`Blocked: ${decision.reason_codes.join(', ')}`);
    }
    
    // Execute the action
    return await this.performAction(action, args);
  }
}

Get help

Need help with an integration?

Next steps