Welcome to AgentScale, the next-generation microservices-based agent orchestration framework. With its intelligent routing, stateful conversation management, and scalable architecture, AgentScale stands out as a paradigm shift in how we conceptualize, build, and deploy the AI agents ecosystem.
- Stateful Conversation Management: Separates stateful conversations from stateless agent services, enabling personalized and context-aware interactions.
- Intelligent Query Routing: Utilizes intent analysis and functionality matching to direct queries to the most appropriate agent service.
- Unified API Gateway: Provides a single point of entry for seamless interaction with various agent services.
- Microservices Architecture: Ensures scalability, resilience, and easy integration of new agent services.
- Automatic Service Registration: Simplifies the process of adding and managing new agent services.
- Pluggable Agent Services: Supports easy integration of custom agent services, including a demo RAG (Retrieval-Augmented Generation) agent currently.
- Docker
- Docker Compose
-
Clone the repository:
git clone https://github.com/M1n9X/AgentScale.git cd AgentScale
-
Add .env file:
OPENAI_API_KEY=sk-xxx
-
Build and run the services:
docker-compose up --build
-
The API Gateway will be available at
http://localhost:8000
.
Interact with AgentScale through the API Gateway:
# Health Check
curl -X GET "http://localhost:8000/health"
# Sample Query
curl -X POST "http://localhost:8000/query" \
-H "Content-Type: application/json" \
-d '{"text":"What is RAG (Retrieval-Augmented Generation)?"}'
# RAG Indexing (for demo purposes)
curl -X POST "http://localhost:9000/index_pdf" \
-H "Content-Type: application/json" \
-d '{"file_path": "data/FakeFile.pdf"}'
# RAG Query
curl -X POST "http://localhost:8000/query" \
-H "Content-Type: application/json" \
-d '{"text":"Summarize the main points of the FakeFile document."}'
AgentScale leverages a microservices architecture with the following key components:
- API Gateway: FastAPI-based entry point for all client requests.
- Orchestrator: Core component for intelligent query routing and agent management.
- Agent Services: Modular and independently scalable AI agent implementations.
- Message Queue: RabbitMQ for efficient inter-service communication.
- Service Discovery: Consul for dynamic service registration and discovery.
- Database: PostgreSQL for persistent storage of chat histories and other data.
agentscale/
โโโ src/
โ โโโ agentscale/
โ โโโ agents/ # Agent interfaces
โ โโโ api/ # API Gateway and route definitions
โ โโโ core/ # Core orchestration logic
โ โโโ db/ # Database models and utilities
โ โโโ rag/ # RAG agent implementation
โ โโโ services/ # Service discovery and message queue
โ โโโ utils/ # Helper utilities
โโโ tests/ # Test suite
โโโ data/ # Sample data for demo
โโโ docs/ # Documentation
โโโ docker-compose.yml # Docker composition file
For local development:
-
Install dependencies:
poetry install # or pip install -e .
-
Run tests:
nox
We welcome contributions! Please see our Contributing Guidelines for more details.
This project is licensed under the Apache 2.0 License - see the LICENSE file for details.