Akordi Agents SDK¶
Build intelligent agents with LangGraph-enhanced workflows, guardrails, and multi-agent orchestration.
Overview¶
Akordi Agents SDK is a Python framework for building production-ready AI agents with AWS Bedrock. It provides:
- Intelligent Agents - Create agents with built-in validation, tool use, and LLM integration
- LangGraph Workflows - Advanced state management and conditional routing
- Guardrails - AWS Bedrock guardrails integration for safe AI
- Tool Orchestration - Intelligent tool selection and execution
- Multi-Agent Systems - Coordinate multiple specialized agents
- Chat History - DynamoDB-backed conversation persistence
- Token Tracking - Monitor and analyze LLM usage
Minimal Working Example¶
This is the simplest way to create a working agent:
import os
from akordi_agents.core import create_langgraph_agent
from akordi_agents.services import AWSBedrockService
# Required: Set AWS region
os.environ["AWS_REGION"] = "us-east-1"
# Step 1: Create LLM service
llm_service = AWSBedrockService()
# Step 2: Create agent
agent = create_langgraph_agent(
name="my_agent",
llm_service=llm_service,
)
# Step 3: Process request
response = agent.process_request({
"query": "What is machine learning?",
"system_message": "You are a helpful assistant.",
"max_tokens": 1000,
})
# Step 4: Get response
if response.get("success"):
print(response["llm_response"]["response"])
Agent with Tools Example¶
Add custom tools to extend agent capabilities:
import os
from akordi_agents.core import create_langgraph_agent
from akordi_agents.services import AWSBedrockService
from akordi_agents.tools import Tool
os.environ["AWS_REGION"] = "us-east-1"
# Define a custom tool
class WeatherTool(Tool):
def get_name(self) -> str:
return "get_weather"
def get_description(self) -> str:
return "Get current weather for a location"
def get_input_schema(self) -> dict:
return {
"type": "object",
"properties": {
"location": {"type": "string", "description": "City name"}
},
"required": ["location"]
}
def execute(self, **kwargs) -> dict:
location = kwargs.get("location", "Unknown")
return {"location": location, "temperature": "22°C", "conditions": "Sunny"}
# Create agent with tool
agent = create_langgraph_agent(
name="weather_agent",
llm_service=AWSBedrockService(),
tools=[WeatherTool()],
config={"enable_tools": True, "temperature": 0.1}
)
# Agent will automatically use tool when needed
response = agent.process_request({
"query": "What's the weather in London?",
"system_message": "You are a weather assistant. Use the weather tool to get current conditions.",
})
Features at a Glance¶
-
:material-robot:{ .lg .middle } Agent Builder
Fluent API for constructing agents with validators, tools, and LLM services.
-
:material-graph:{ .lg .middle } LangGraph Integration
Sophisticated workflow orchestration with state management and conditional routing.
-
:material-shield-check:{ .lg .middle } Guardrails
Content safety with AWS Bedrock guardrails for production deployments.
-
:material-tools:{ .lg .middle } Tool System
Create custom tools for LLM agents with automatic schema generation.
Installation¶
Or with Poetry:
:octicons-arrow-right-24: Full Installation Guide
Architecture¶
graph TB
subgraph "Akordi Agents SDK"
A[AgentBuilder] --> B[CustomAgent]
A --> C[LangGraphAgent]
C --> D[ToolUseWorkflow]
C --> E[MultiAgentWorkflow]
D --> F[ValidationNode]
D --> G[ToolDecisionNode]
D --> H[ToolExecutionNode]
D --> I[ResponseNode]
B --> J[LLM Service]
B --> K[Search Handler]
B --> L[Validator]
J --> M[AWS Bedrock]
K --> N[Knowledge Base]
end
O[User Request] --> A
I --> P[Response]
What's Next?¶
-
:material-rocket-launch:{ .lg .middle } Get Started
Set up your environment and create your first agent.
-
:material-chef-hat:{ .lg .middle } Recipes
Complete, copy-paste code examples for all common agent patterns.
-
:material-book-open-variant:{ .lg .middle } Examples
Explore working examples for common use cases.
-
:material-api:{ .lg .middle } API Reference
Complete API documentation for all components.
Requirements¶
- Python 3.9+
- AWS credentials (for Bedrock integration)
- Poetry (recommended) or pip
License¶
MIT License - see LICENSE for details.