Multi-agent system that automates and structures the customer incident management flow, from receiving the message to automatically creating tickets in Linear when necessary.
This project implements a multi-agent system that processes Customer Experience (CX) incidents through six specialized agents that work in coordination:
- Interpreter: Analyzes customer text and extracts key information
- Classifier: Classifies the incident by type and affected area
- Validator: Evaluates if there is sufficient information to process
- Prioritizer: Calculates priority based on impact, urgency, and severity
- Decision Maker: Decides whether to escalate to development or manage from CX
- Linear Writer: Automatically creates tickets in Linear when necessary
- ✅ Automatic incident processing with multi-agent system
- ✅ Complete web interface for ticket management
- ✅ Linear integration for automatic issue creation
- ✅ Support for multiple AI providers (Anthropic, OpenAI, Gemini, Mistral, Ollama)
- ✅ Flexible configuration: use AI or predefined rules per agent
- ✅ Real-time processing with visual feedback
- ✅ Batch processing of multiple tickets
- ✅ Complete traceability of all decisions made
- PHP 8.4.16 or higher
- Composer
- Node.js and NPM
- Database (MySQL, PostgreSQL, SQLite)
- (Optional) API keys for AI services
- (Optional) Linear API key
- Clone the repository:
git clone <repository-url>
cd agents- Install dependencies:
composer install
npm install- Configure the environment:
cp .env.example .env
php artisan key:generate- Configure the database in
.env:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=your_database
DB_USERNAME=your_username
DB_PASSWORD=your_password- Run migrations:
php artisan migrate- (Optional) Configure AI services in
.env:
Global AI Configuration:
# Enable/disable LLM processing globally (default: false)
AI_USE_LLM=true
# Select the default AI provider (anthropic, openai, gemini, mistral, ollama)
NEURON_AI_PROVIDER=anthropic
# Timeout and retry settings
NEURON_AI_TIMEOUT=30
NEURON_AI_RETRIES=2Anthropic (Claude) Configuration:
ANTHROPIC_KEY=your_api_key
ANTHROPIC_MODEL=claude-3-5-sonnet-20241022OpenAI Configuration:
OPENAI_KEY=your_api_key
OPENAI_MODEL=gpt-4Google Gemini Configuration:
GEMINI_API_KEY=your_api_key
GEMINI_MODEL=gemini-2.5-flashMistral AI Configuration:
MISTRAL_KEY=your_api_key
MISTRAL_MODEL=mistral-small-latestOllama (Local) Configuration:
OLLAMA_BASE_URL=http://localhost:11434
OLLAMA_MODEL=llama2- (Optional) Configure Linear in
.env:
LINEAR_API_KEY=your_api_key
LINEAR_TEAM_ID=your_team_id- Build assets:
npm run build- Start the server:
php artisan serveOnce the server is started, access the URL shown by Laravel (default http://localhost:8000) in your browser.
- View tickets: Navigate to
/supportto see the ticket list - Process ticket: Click on a ticket and select "Process" to run the multi-agent workflow
- Real-time processing: Use the "Process with streaming" button to see progress in real-time
- Batch processing: Select multiple tickets and process them all at once
Access /settings to configure:
Agent Activation:
- Enable/disable individual agents in the workflow
- Disabled agents will be bypassed during processing
LLM Configuration per Agent: Each agent can be configured individually to use:
- Global: Uses the default configuration from
AI_USE_LLMenvironment variable - LLM: Always uses AI processing for this agent (requires API keys)
- Heuristic: Always uses predefined rules (faster, no API keys needed)
This allows you to:
- Use AI only for complex agents while using heuristics for simpler ones
- Test different configurations without changing environment variables
- Optimize costs by using AI selectively
External Services:
- Configure AI provider API keys in
.env(see Installation section) - Configure Linear integration (API key and team ID)
The system uses a multi-agent architecture where:
- Each agent has a specific responsibility
- Agents work sequentially, passing information between them
- A central orchestrator coordinates the complete flow
- The entire process is recorded for traceability
- Laravel 12: PHP web framework
- Neuron AI: Language model integration
- Linear API: Automatic ticket creation
- Tailwind CSS: Interface styling
- Pest: Testing framework
app/
├── AI/
│ ├── Agents/ # Agent implementations
│ ├── Neuron/ # AI-powered agents
│ ├── Orchestrator/ # Orchestrator and shared state
│ └── Prompts/ # Prompts for AI agents
├── Http/
│ └── Controllers/ # Application controllers
├── Integrations/
│ └── Linear/ # Linear integration
└── Models/ # Data models
resources/
└── views/ # Blade views
routes/
└── web.php # Application routes
Run tests:
php artisan testFor more details about the project, see PROJECTE.md.
This project is licensed under the MIT license.
Eduard Altimiras Duocastella