Skip to main content

Open-source orchestration framework for agentic AI systems with multi-agent coordination, tool integration, and workflow management

Project description

AgentCore

Production-ready orchestration framework for agentic AI systems implementing Google's A2A (Agent-to-Agent) protocol v0.2.

Python License Tests


Features

A2A Protocol Implementation

  • JSON-RPC 2.0 compliant API for standardized agent communication
  • Agent discovery via /.well-known/agent.json endpoints
  • Task coordination with full lifecycle management
  • Real-time messaging via WebSocket and Server-Sent Events (SSE)
  • Distributed tracing with A2A context propagation

Agent Runtime

  • Chain-of-Thought (CoT) reasoning engine
  • ReAct pattern for iterative reasoning and action
  • Autonomous execution mode for complex multi-step tasks
  • Multi-tool integration with API connectors, code execution, and file operations
  • Plugin system with version management and validation
  • State persistence with backup and recovery
  • Sandbox execution with security profiles

Memory Service

  • Hierarchical memory with working, episodic, and semantic layers
  • Entity-Centric Learning (ECL) pipeline for knowledge extraction
  • Graph-based memory with Neo4j integration
  • Hybrid search combining vector similarity and graph traversal
  • MEMify optimization for memory consolidation and pruning
  • Context compression and expansion for efficient token usage

LLM Client Service

  • Multi-provider support: OpenAI, Anthropic, Google Gemini
  • Intelligent model selection based on task requirements
  • Automatic failover with provider health monitoring
  • Cost tracking and budget management
  • Response caching for optimization

ACE (Adaptive Capability Engine)

  • Performance monitoring with baseline tracking
  • Capability evaluation and fitness scoring
  • Intervention engine with trigger-based decisions
  • Playbook management for automated responses
  • Delta generation for capability improvements

DSPy Optimization

  • MIPROv2 and GEPA optimization algorithms
  • MLflow integration for experiment tracking
  • A/B testing framework for prompt variants
  • Continuous learning with drift detection
  • GPU acceleration support

Coordination Service

  • Multi-agent coordination with consensus protocols
  • Workflow orchestration with graph-based execution
  • CQRS pattern with event sourcing
  • Saga pattern for distributed transactions
  • Parallel execution with dependency resolution

Integration Layer

  • Cloud storage: S3, GCS, Azure Blob
  • Database connectors: PostgreSQL with async support
  • Webhook management with delivery tracking
  • Resilience patterns: Circuit breaker, bulkhead, timeout
  • Security: Credential management, compliance scanning

Training System

  • GRPO (Group Relative Policy Optimization)
  • Trajectory recording and replay
  • Custom reward registry
  • Credit assignment algorithms
  • Job management with budget controls

CLI

  • 4-layer architecture: CLI, Service, Protocol, Transport
  • Agent management: register, list, info, remove
  • Task operations: create, list, status tracking
  • Session management: create, list, pause
  • Workflow control: start, monitor, manage
  • Configuration: show, set, validate

Quick Start

Prerequisites

  • Python 3.12+
  • PostgreSQL 14+
  • Redis 7+
  • Neo4j 5+ (optional, for graph memory)

Installation

# Clone the repository
git clone https://github.com/Mathews-Tom/AgentCore.git
cd AgentCore

# Install dependencies using uv
uv sync

# Set up environment
cp .env.test.template .env

Running with Docker Compose

# Start all services
docker compose -f docker-compose.dev.yml up

# API available at http://localhost:8001
# API docs at http://localhost:8001/docs

Running Locally

# Start database and Redis
docker compose -f docker-compose.dev.yml up postgres redis

# Apply migrations
uv run alembic upgrade head

# Start development server
uv run uvicorn agentcore.a2a_protocol.main:app --host 0.0.0.0 --port 8001 --reload

CLI Usage

# Register an agent
agentcore agent register --name "my-agent" --capabilities "text_generation,analysis"

# List agents
agentcore agent list

# Create a task
agentcore task create --description "Analyze customer feedback"

# Start a session
agentcore session create --name "analysis-session"

Architecture

src/agentcore/
├── a2a_protocol/          # A2A protocol implementation
│   ├── models/            # Pydantic models (AgentCard, Task, Event)
│   ├── services/          # Business logic and JSON-RPC handlers
│   ├── routers/           # FastAPI endpoints
│   └── database/          # PostgreSQL models and repositories
│
├── agent_runtime/         # Agent execution engine
│   ├── engines/           # CoT, ReAct, Autonomous engines
│   ├── services/          # Lifecycle, tools, state management
│   └── tools/             # Built-in and custom tool support
│
├── ace/                   # Adaptive Capability Engine
│   ├── capability/        # Evaluation and scoring
│   ├── intervention/      # Trigger-based decisions
│   └── monitors/          # Performance tracking
│
├── dspy_optimization/     # DSPy optimization framework
│   ├── algorithms/        # MIPROv2, GEPA
│   ├── learning/          # Continuous learning, drift detection
│   └── tracking/          # MLflow integration
│
├── gateway/               # API gateway services
├── integration/           # External service integrations
├── orchestration/         # Workflow orchestration (CQRS, Saga)
├── reasoning/             # Reasoning strategies
└── training/              # RL training system

src/agentcore_cli/         # Command-line interface
├── commands/              # CLI command handlers
├── services/              # Service layer
├── protocol/              # JSON-RPC client
└── transport/             # HTTP transport

Testing

# Run all tests
uv run pytest

# Run with coverage report
uv run pytest --cov=src --cov-report=html

# Run specific test categories
uv run pytest tests/unit/
uv run pytest tests/integration/
uv run pytest tests/cli/

# Load testing
uv run locust -f tests/load/locustfile.py

Development

# Install dev dependencies
uv sync --dev

# Run linter
uv run ruff check src/ tests/

# Auto-fix issues
uv run ruff check --fix src/ tests/

# Type checking
uv run mypy src/

Database Migrations

# Create migration
uv run alembic revision --autogenerate -m "description"

# Apply migrations
uv run alembic upgrade head

# Rollback
uv run alembic downgrade -1

Configuration

All settings via environment variables or .env:

# Database
DATABASE_URL=postgresql+asyncpg://user:pass@host:5432/agentcore

# Redis
REDIS_URL=redis://localhost:6379/0

# Security
JWT_SECRET_KEY=your-secret-key
JWT_ALGORITHM=HS256

# LLM Providers
OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-...
GOOGLE_API_KEY=AI...

# Monitoring
ENABLE_METRICS=true
LOG_LEVEL=INFO

Documentation


License

AGPL-3.0 License - see LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agentcore_sdk-0.1.1.tar.gz (3.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentcore_sdk-0.1.1-py3-none-any.whl (1.3 MB view details)

Uploaded Python 3

File details

Details for the file agentcore_sdk-0.1.1.tar.gz.

File metadata

  • Download URL: agentcore_sdk-0.1.1.tar.gz
  • Upload date:
  • Size: 3.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.14

File hashes

Hashes for agentcore_sdk-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f0fe5a244d11bd55f2a007f9a07812722fd1e738e0e5713d0b5a5061421b5458
MD5 505daed2c8e7c26b8ce2245e1042c19e
BLAKE2b-256 95ea8ff375032df843c0f7f5eb23b5e1d99418f91a8b5651b2d41fb8370d88c9

See more details on using hashes here.

File details

Details for the file agentcore_sdk-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for agentcore_sdk-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 62f51352b0517386c6236448e32209043dcc3371f5a5c82970d43db477e9e803
MD5 c359255edefd5074bd9eaf4a00ccffe6
BLAKE2b-256 bc6df72e6f7ab41c4bd27566d4199319aaa43d54b731d7b4191b57a24c79fb01

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page