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
| Framework | Language | Integration Type | Documentation |
|---|---|---|---|
| LangChain | Python | SDK + Raw HTTP | Most comprehensive guide |
| LangChainGo | Go | Go SDK | Native Go integration |
| LlamaIndex.TS | TypeScript | TypeScript SDK | Node.js/TypeScript apps |
| CrewAI | Python | Python SDK | Multi-agent crews |
| Lyzr | Python | Python SDK | Enterprise AI agents |
Enterprise Platforms
| Platform | Integration Type | Use Case | Documentation |
|---|---|---|---|
| Microsoft Copilot Studio | HTTP API | Low-code AI apps | Power Platform integration |
| Obot | Go SDK | Kubernetes-native agents | Cloud-native deployment |
Integration Patterns
Gateway Mode (Recommended)
The recommended pattern for framework integration:
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
| SDK | Frameworks Using It |
|---|---|
| Python SDK | LangChain, CrewAI, Lyzr |
| Go SDK | LangChainGo, Obot |
| TypeScript SDK | LlamaIndex.TS, Lyzr |
| Raw HTTP | All 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
| Capability | Description |
|---|---|
| PII Detection | 12+ PII types automatically detected and optionally redacted |
| SQL Injection Scanning | 37+ attack patterns blocked in prompts and responses |
| Policy Enforcement | Custom rules in Rego/OPA with single-digit ms evaluation |
| Audit Logging | Complete request/response logging with compliance retention |
| Cost Tracking | Token usage and cost per request |
| Multi-Model Routing | Route to different LLM providers based on policy |
Community vs Enterprise
| Feature | Community | Enterprise |
|---|---|---|
| Framework integrations | All | All |
| 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-agent | CrewAI Guide |
| Python + RAG focus | LangChain Guide |
| Go backend | LangChainGo Guide |
| TypeScript/Node.js | LlamaIndex.TS Guide |
| Low-code/Power Platform | Copilot Studio Guide |
| Kubernetes-native | Obot 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:
- Community: GitHub Discussions
- Enterprise: support@getaxonflow.com