Supported Frameworks
AIM integrates with popular AI agent frameworks in both Python and Java. Secure your agents regardless of the framework you choose.
Why Framework Integration Matters
Unified Security
Same security model across all frameworks
Auto-Detection
SDK detects framework from imports
Minimal Code
Add security with decorators/annotations
Choose Your Framework
LangChain
PythonPopular Python framework for building LLM applications with chains, agents, and tools.
LangChain4j
JavaJava port of LangChain for enterprise JVM applications.
CrewAI
PythonFramework for orchestrating role-playing autonomous AI agents.
Anthropic Claude
Python / JavaDirect integration with Anthropic Claude API for custom implementations.
OpenAI
Python / JavaDirect integration with OpenAI GPT models.
Spring AI
JavaSpring framework for AI applications with native Spring Boot integration.
Quick Comparison
| Framework | Language | SDK | Best For |
|---|---|---|---|
| LangChain | Python | aim-sdk | Chain-based AI apps, RAG |
| LangChain4j | Java | aim-sdk | Enterprise JVM apps |
| CrewAI | Python | aim-sdk | Multi-agent orchestration |
| Anthropic / OpenAI | Python / Java | aim-sdk | Direct LLM integrations |
| Spring AI | Java | aim-sdk | Spring Boot microservices |
Integration Examples
LangChain (Python) with aim-core
from aim_sdk import secure, AgentType
from langchain.agents import AgentExecutor
# AIM auto-detects LangChain from your imports
agent = secure("research-agent", agent_type=AgentType.LANGCHAIN)
@agent.perform_action(capability="web:search", resource="search-api")
def search_web(query: str):
"""AIM verifies capability before execution"""
return search_tool.run(query)
# All actions are logged to the tamper-evident audit trail
executor = AgentExecutor(agent=llm_agent, tools=[search_web])CrewAI with Multi-Agent Monitoring
from aim_sdk import secure, AgentType
from crewai import Agent, Crew, Task
# Each crew member gets its own identity and trust score
researcher = secure("researcher", agent_type=AgentType.CREWAI)
writer = secure("writer", agent_type=AgentType.CREWAI)
# AIM tracks inter-agent communication and capability usage
crew = Crew(
agents=[researcher_agent, writer_agent],
tasks=[research_task, write_task]
)
# Crew-level trust score aggregates individual agent scoresNode.js / TypeScript with @opena2a/aim-core
import { createIdentity, signPayload, verifySignature } from '@opena2a/aim-core';
// Create a new agent identity (Ed25519 key pair)
const identity = await createIdentity({ name: 'my-agent' });
// Sign an action payload
const payload = { action: 'db:read', resource: 'users', timestamp: Date.now() };
const signature = await signPayload(payload, identity.privateKey);
// Verify the signature (on the receiving end)
const valid = await verifySignature(payload, signature, identity.publicKey);
console.log('Verified:', valid); // trueCustom Framework Integration
For frameworks not listed above, use the aim-core library directly. The core library provides identity management, policy evaluation, trust scoring, and audit logging without any framework coupling. Wrap your agent's action methods with AIM's capability checks to enforce access control regardless of the underlying framework.
from aim_sdk import secure
# Works with any Python agent framework
agent = secure("custom-agent")
# Manually check capabilities before executing actions
if agent.has_capability("file:write"):
write_to_file(data)
else:
agent.request_capability("file:write", reason="Need to save results")