A dynamic AI platform enabling users to interact with agents individually or in groups, create workflows, and integrate MCP tools for seamless task automation.
- π€ AI Agents: Create and manage AI agents with customizable system prompts
- π LLM Integration: Connect to various LLM providers (Only Gemini for Now!)
- π’ Organizations: Create and manage organizations with multiple members
- π§ MCP Tools: Integrate external tools via MCP servers
- π₯ Multi-User: Collaborative environment with user management
- π Secure: API keys stored securely in HashiCorp Vault
- π API Documentation: Comprehensive API documentation with Swagger/ReDoc
- π Scalable: Built with Docker for easy deployment and scaling
- π¨ Modern UI: Clean, responsive interface built with Next.js and Tailwind CSS
- π Dark Mode: Full support for light and dark themes
- π¬ Real-time Chat: WebSocket-powered conversations with AI agents
- π± Responsive Design: Works seamlessly on desktop, tablet, and mobile devices
- π Secure Authentication: JWT-based authentication with secure cookie storage
- β‘ Fast Performance: Optimized for speed with Next.js App Router
- π§© Component Library: Built with shadcn/ui and Radix UI primitives
- π State Management: Centralized state management with Redux Toolkit
- Framework: Django 5.0, Django REST Framework
- Database: PostgreSQL
- Cache & Message Broker: Redis
- Task Queue: Celery
- Secret Management: HashiCorp Vault
- Storage: MinIO (S3-compatible)
- Documentation: drf-spectacular (OpenAPI)
- Monitoring: Sentry, Django Silk
- Email: Mailpit (development)
- Framework: Next.js 15.3, React 19, TypeScript 5
- UI Components: Tailwind CSS 4, shadcn/ui, Radix UI
- State Management: Redux Toolkit
- Form Handling: React Hook Form, Zod
- Animations: Framer Motion
- HTTP Client: Native fetch API
- WebSockets: Native WebSocket API
- Containerization: Docker, Docker Compose
- Package Manager: pnpm (frontend), pip (backend)
- Docker and Docker Compose
- Git
git clone https://github.com/DataRohit/AgentSphere.git
cd AgentSphere
- Copy the example environment files:
cp .envs/.django.env.example .envs/.django.env
cp .envs/.postgres.env.example .envs/.postgres.env
cp .envs/.minio.env.example .envs/.minio.env
cp .envs/.vault.env.example .envs/.vault.env
cp .envs/.pgadmin.env.example .envs/.pgadmin.env
- Update the environment files with your settings
make up
This will start all services defined in the docker-compose.yml file.
- Django Admin: http://localhost:8080/admin/
- API Documentation:
- PgAdmin: http://localhost:8080/pgadmin/
- Mailpit: http://localhost:8080/mailpit/
- Vault UI: http://localhost:8080/vault/ui/
- Flower (Celery monitoring): http://localhost:8080/flower/
For frontend development, you can run the Next.js development server separately:
# Navigate to the frontend directory
cd frontend
# Install dependencies with pnpm
pnpm install
# Start the development server
pnpm dev
The frontend development server will be available at http://localhost:3000.
You can also use the Makefile command:
make nextjs-dev
AgentSphere comes with a colorful Makefile that provides convenient commands for development:
# Docker Commands
make help # π Show help message
make up # π Start all containers
make down # π Stop all containers
make infra-up # ποΈ Start infrastructure services only
make app-up # π± Start application services only
make ps # π List running containers
make logs # π View logs from all containers
make logs-app # π View logs from application containers
make logs-infra # π View logs from infrastructure containers
make build # π¨ Build all containers
make clean # π§Ή Remove all containers, networks, and volumes
make restart # π Restart all containers
make restart-app # π Restart application containers
make restart-infra # π Restart infrastructure containers
# Python Code Quality Commands
make lint # π Run ruff linter on Python code
make format # π
Format Python code with ruff
make fix # π§ Fix auto-fixable issues with ruff
# Frontend Development Commands
make nextjs-dev # π Start NextJS development server
make nextjs-build # π¨ Build NextJS application
AgentSphere/
βββ .envs/ # Environment variable files
βββ backend/ # Django backend code
β βββ apps/ # Django applications
β β βββ agents/ # AI agents functionality
β β βββ chats/ # Chat management (single & group)
β β βββ common/ # Shared utilities and models
β β βββ contrib/ # Contributed Django extensions
β β βββ conversation/ # Conversation sessions & websockets
β β βββ llms/ # LLM configurations & integrations
β β βββ organization/ # Organization management
β β βββ templates/ # Email and HTML templates
β β βββ tools/ # MCP tools integration
β β βββ users/ # User management & authentication
β βββ config/ # Django settings and configuration
β βββ requirements.txt # Python dependencies
βββ frontend/ # Next.js frontend code
β βββ app/ # App router pages and layouts
β β βββ auth/ # Authentication pages
β β βββ dashboard/ # Dashboard pages
β β βββ organizations/ # Organization management
β β βββ agents/ # Agent management
β β βββ chats/ # Chat interfaces
β β βββ group-chats/ # Group chat interfaces
β β βββ store/ # Redux store configuration
β β βββ globals.css # Global CSS styles
β βββ components/ # Reusable React components
β β βββ ui/ # UI components (shadcn/ui)
β β βββ ... # Feature-specific components
β βββ lib/ # Utility functions and helpers
β βββ public/ # Static assets
β βββ package.json # Frontend dependencies
βββ compose/ # Docker compose configuration
β βββ django/ # Django service configuration
β βββ nginx/ # Nginx service configuration
β βββ postgres/ # PostgreSQL service configuration
β βββ nextjs/ # Next.js service configuration
βββ docker-compose.yml # Docker compose services definition
βββ makefile # Development commands
AI agents are the core of AgentSphere. Each agent has:
- A name and description
- A system prompt that defines its behavior
- A connection to an LLM for generating responses
- An automatically generated avatar using DiceBear
- Public or private visibility within an organization
- A limit of 5 agents per user per organization
Language Model configurations that can be connected to agents:
- Support for multiple API providers (Currently Gemini 2.5 Pro/Flash)
- Secure API key storage in HashiCorp Vault
- Configurable token limits
- Organization-based access control
AgentSphere supports two types of chat interactions:
- Single Chats: One-to-one conversations between a user and an agent
- Group Chats: Multi-agent conversations where a user can interact with multiple agents
- Both chat types support message history, editing, and deletion
Conversation sessions manage the flow of interactions:
- Link to either single or group chats
- Track active/inactive status
- Can use a selector prompt for routing to appropriate agents/tools
- Associate with specific LLM models for processing
Organizations provide a way to group users and resources:
- Each user can create up to 3 organizations
- Organizations can have up to 8 members
- Resources (Agents, LLMs, MCP tools) are associated with organizations
- Public/private visibility controls for resources
MCP (Multi-Agent Communication Protocol) tools allow integration with external services:
- Each user can add up to 5 MCP tools per organization
- Tools are defined by name, description, URL, and optional tags
- Secure authentication with external services
The frontend of AgentSphere is built with Next.js 15.3 using the App Router, providing a modern, type-safe, and performant user interface.
- Authentication: JWT-based authentication with secure cookie storage
- State Management: Redux Toolkit for global state management
- UI Components: Built with shadcn/ui, a collection of reusable components built on Radix UI
- Real-time Communication: WebSocket connections for live chat functionality
- Form Handling: React Hook Form with Zod schema validation
- Animations: Framer Motion for smooth transitions and interactions
- Landing Page: Introduction to AgentSphere with feature showcase
- Authentication: Login, signup, account activation, and password reset
- Dashboard: Organization management and overview
- Agent Studio: Create and manage AI agents
- Chat Interfaces: Single and group chat conversations with agents
- Organization Management: Member management, settings, and permissions
The chat functionality uses WebSockets for real-time communication:
- Secure authentication via JWT tokens
- Automatic reconnection handling
- Real-time typing indicators
- Support for both single-agent and multi-agent conversations
The API is documented using OpenAPI 3.0 (via drf-spectacular). You can explore the API using:
- Swagger UI: http://localhost:8080/api/v1/swagger/ui/
- ReDoc: http://localhost:8080/api/v1/swagger/redoc/
- User authentication via JWT tokens
- API keys stored securely in HashiCorp Vault
- CSRF protection
- Secure cookie settings
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
Rohit Ingole - rohit.vilas.ingole@gmail.com
Project Link: https://github.com/DataRohit/AgentSphere
AgentSphere uses a robust CI/CD pipeline to ensure code quality and automated deployments:
- Linting: Automated code quality checks using Ruff
- Testing: Automated tests run on each pull request
- Docker: Containerized builds for consistent deployment
- Deployment: Automated deployment to staging and production environments
AgentSphere is currently in active development. The core functionality is implemented, but we're continuously adding new features and improvements.
- Gemini (Currently supported)
- OpenAI (Coming soon)
- Anthropic (Coming soon)
If you need help with AgentSphere, you can:
- Open an Issue: For bugs or feature requests
- Discussions: For general questions and discussions
- Email: Contact the maintainer directly at rohit.vilas.ingole@gmail.com
We welcome all feedback and contributions!