Skip to main content

Framework Integration Overview

AxonFlow integrates with popular AI and ML frameworks to add governance, policy enforcement, and audit logging to your existing AI applications. Add compliance guardrails without rewriting your agent code.

Supported Frameworks

LLM Orchestration Frameworks

FrameworkLanguageIntegration TypeDocumentation
LangChainPythonSDK + Raw HTTPMost comprehensive guide
LangChainGoGoGo SDKNative Go integration
LlamaIndex.TSTypeScriptTypeScript SDKNode.js/TypeScript apps
CrewAIPythonPython SDKMulti-agent crews
LyzrPythonPython SDKEnterprise AI agents

Enterprise Platforms

PlatformIntegration TypeUse CaseDocumentation
Microsoft Copilot StudioHTTP APILow-code AI appsPower Platform integration
ObotGo SDKKubernetes-native agentsCloud-native deployment

Integration Patterns

Gateway Mode

The recommended pattern for existing framework integrations (LangChain, CrewAI, LlamaIndex):

Your Framework → AxonFlow Pre-check → LLM Provider → AxonFlow Audit

Benefits:

  • Policy enforcement before LLM calls
  • Complete audit trail of all operations
  • Token usage and cost tracking
  • Works with any LLM provider

Proxy Mode

For simpler integrations:

Your Framework → AxonFlow Proxy → LLM Provider

Benefits:

  • Single API endpoint
  • Automatic policy enforcement
  • Simpler integration (one call)

SDK Coverage

SDKFrameworks Using It
Python SDKLangChain, CrewAI, Lyzr
Go SDKLangChainGo, Obot
TypeScript SDKLlamaIndex.TS, Lyzr
Raw HTTPAll frameworks (reference implementation)

Quick Start by Framework

Python Frameworks (LangChain, CrewAI, Lyzr)

from axonflow import AxonFlow

async with AxonFlow(
agent_url="http://localhost:8080",
api_key="your-api-key"
) as client:
# Pre-check before LLM call
ctx = await client.get_policy_approved_context(
user_id="user-123",
query="Your prompt here"
)

if ctx.approved:
# Make your framework's LLM call here
response = await your_framework_llm_call(ctx.query)

# Audit the result
await client.audit_llm_call(
context_id=ctx.context_id,
provider="openai",
model="gpt-4",
response=response
)

Go Frameworks (LangChainGo, Obot)

import "github.com/getaxonflow/axonflow-sdk-go"

client := axonflow.NewClient("http://localhost:8080", "your-api-key")

// Pre-check
ctx, _ := client.GetPolicyApprovedContext(context.Background(), &axonflow.PolicyRequest{
UserID: "user-123",
Query: "Your prompt here",
})

if ctx.Approved {
// Your framework LLM call
response := yourFrameworkLLMCall(ctx.Query)

// Audit
client.AuditLLMCall(context.Background(), &axonflow.AuditRequest{
ContextID: ctx.ContextID,
Provider: "openai",
Model: "gpt-4",
Response: response,
})
}

TypeScript Frameworks (LlamaIndex.TS)

import { AxonFlow } from '@axonflow/sdk';

const client = new AxonFlow({
agentUrl: 'http://localhost:8080',
apiKey: 'your-api-key'
});

// Pre-check
const ctx = await client.getPolicyApprovedContext({
userId: 'user-123',
query: 'Your prompt here'
});

if (ctx.approved) {
// Your framework LLM call
const response = await yourFrameworkLLMCall(ctx.query);

// Audit
await client.auditLLMCall({
contextId: ctx.contextId,
provider: 'openai',
model: 'gpt-4',
response
});
}

What AxonFlow Adds

CapabilityDescription
PII Detection12+ PII types automatically detected and optionally redacted
SQL Injection Scanning37+ attack patterns blocked in prompts and responses
Policy EnforcementCustom rules in Rego/OPA with single-digit ms evaluation
Audit LoggingComplete request/response logging with compliance retention
Cost TrackingToken usage and cost per request
Multi-Model RoutingRoute to different LLM providers based on policy

Community vs Enterprise

FeatureCommunityEnterprise
Framework integrationsAllAll
PII detection
SQL injection (basic)
SQL injection (advanced)
Audit logging
Policy enforcement
HITL approval queue
Compliance exports
Customer Portal

Choosing a Framework Guide

If you're using...Start with...
Python + need multi-agentCrewAI Guide
Python + RAG focusLangChain Guide
Go backendLangChainGo Guide
TypeScript/Node.jsLlamaIndex.TS Guide
Low-code/Power PlatformCopilot Studio Guide
Kubernetes-nativeObot Guide

Need a Different Framework?

AxonFlow's SDK and HTTP APIs work with any framework. Use the LangChain guide as a reference - it includes both SDK and raw HTTP examples that can be adapted to any framework.

For framework-specific integration help: