update doc

This commit is contained in:
Gaetan Hurel 2025-06-27 09:39:01 +02:00
parent 60cd7c11ed
commit 2029b8d462
No known key found for this signature in database
2 changed files with 27 additions and 47 deletions

View File

@ -82,21 +82,15 @@ export OPENAI_API_KEY="your-api-key-here"
``` ```
├── simple-react-agent/ # Single ReAct agent approach ├── simple-react-agent/ # Single ReAct agent approach
│ ├── main.py # Main application │ ├── main.py # Main application
│ ├── log_analyzer.py # Log analysis tool │ ├── custom_tools/ # Custom tools for the agent
│ ├── loghub/ # → symlink to ../loghub
│ └── README.md # Detailed documentation │ └── README.md # Detailed documentation
├── multi-agent-supervisor/ # Multi-agent supervisor approach ├── multi-agent-supervisor/ # Multi-agent supervisor approach
│ ├── main-multi-agent.py # Multi-agent implementation │ ├── main-multi-agent.py # Multi-agent implementation
│ ├── loghub/ # → symlink to ../loghub │ ├── agents/ # Specialized agent implementations
│ ├── custom_tools/ # Custom tools for agents
│ └── README.md # Detailed documentation │ └── README.md # Detailed documentation
├── loghub/ # Sample log files
│ ├── Apache/
│ ├── Linux/
│ ├── Nginx/
│ └── ... (various system logs)
└── README.md # This file └── README.md # This file
``` ```
@ -118,34 +112,26 @@ python main-multi-agent.py
### Simple ReAct Agent Examples ### Simple ReAct Agent Examples
``` ```
"Analyze the Apache logs for error patterns" "Write me a motivational poem"
"Generate a tech poem about programming"
"Check disk usage on the system" "Check disk usage on the system"
"List all available log files" "List files in the current directory"
"Find timeline patterns in Linux logs" "Show system information"
``` ```
### Multi-Agent Supervisor Examples ### Multi-Agent Supervisor Examples
``` ```
"Nginx returns 502 Bad Gateway - diagnose the issue"
"Perform a comprehensive system health check" "Perform a comprehensive system health check"
"Analyze all services and provide a risk assessment" "Analyze system performance and provide recommendations"
"Check for security vulnerabilities and suggest hardening" "Check for security vulnerabilities and suggest hardening"
"Monitor system resources and alert on issues"
``` ```
## 🧪 Sample Logs Available
The `loghub/` directory contains sample logs from various systems:
- **Web Servers**: Apache, Nginx
- **Operating Systems**: Linux, Mac, Windows
- **Big Data**: Hadoop, HDFS, Spark
- **Databases**: Various database logs
- **Applications**: Health apps, mobile apps
- **Security**: SSH, authentication logs
## 🔍 Decision Guide ## 🔍 Decision Guide
**Choose Simple ReAct Agent if:** **Choose Simple ReAct Agent if:**
- You're new to LangGraph - You're new to LangGraph
- You need basic log analysis - You need basic system administration tasks
- You have limited computational resources - You have limited computational resources
- You prefer simplicity and transparency - You prefer simplicity and transparency
- You're building a proof of concept - You're building a proof of concept
@ -170,8 +156,8 @@ The `loghub/` directory contains sample logs from various systems:
Feel free to: Feel free to:
- Add new specialized agents to the multi-agent system - Add new specialized agents to the multi-agent system
- Enhance the log analysis capabilities - Enhance the system administration capabilities
- Add new tools for system administration - Add new tools for system management
- Improve error handling and reliability - Improve error handling and reliability
- Add tests and documentation - Add tests and documentation
@ -183,24 +169,19 @@ This project is for educational and demonstration purposes. Modify and use as ne
**Happy system administration with AI! 🤖🔧** **Happy system administration with AI! 🤖🔧**
The custom `log_analyzer` tool supports:
- **error_patterns**: Detects error keywords (error, fail, exception, critical, fatal, denied, refused, timeout)
- **frequency**: Identifies most common log patterns by normalizing timestamps, IPs, and UUIDs
- **timeline**: Extracts and analyzes timestamp patterns for chronological debugging
- **summary**: Provides basic statistics and sample content overview
## 📁 Project Structure ## 📁 Project Structure
``` ```
langgraph-pard0x/ langgraph-pard0x/
├── main.py # Main LangGraph agent ├── simple-react-agent/ # Single ReAct agent approach
├── log_analyzer.py # Custom log analysis tool │ ├── main.py # Main application
├── loghub/ # Git submodule with log datasets │ ├── custom_tools/ # Custom tools for the agent
│ ├── Linux/ │ └── README.md # Detailed documentation
│ ├── Apache/ ├── multi-agent-supervisor/ # Multi-agent supervisor approach
│ ├── OpenSSH/ │ ├── main-multi-agent.py # Multi-agent implementation
│ └── ... │ ├── agents/ # Specialized agent implementations
│ ├── custom_tools/ # Custom tools for agents
│ └── README.md # Detailed documentation
├── pyproject.toml # Project dependencies ├── pyproject.toml # Project dependencies
└── README.md # This file └── README.md # This file
``` ```
@ -220,10 +201,6 @@ This agent has shell access for diagnostic purposes. Use with caution and only i
- Verify your OpenAI API key has sufficient credits - Verify your OpenAI API key has sufficient credits
- Make sure all dependencies are installed correctly - Make sure all dependencies are installed correctly
### Loghub submodule not found
- Run `git submodule update --init --recursive` to initialize the submodule
- Ensure you have proper git access to the loghub repository
## 🤔 Open Questions ## 🤔 Open Questions
This project raises several interesting technical and architectural questions worth exploring: This project raises several interesting technical and architectural questions worth exploring:

View File

@ -62,7 +62,10 @@ User Input → Supervisor → Specialized Agents → Aggregated Response
## Files ## Files
- `main-multi-agent.py`: Complete multi-agent supervisor implementation - `main-multi-agent.py`: Complete multi-agent supervisor implementation
- `loghub/`: Symbolic link to log files directory - `agents/`: Directory containing specialized agent implementations
- `custom_tools/`: Custom tools used by the agents
- `supervisor.py`: Supervisor agent coordination logic
- `utils.py`: Utility functions and configurations
## Usage ## Usage