update doc
This commit is contained in:
parent
60cd7c11ed
commit
2029b8d462
69
README.md
69
README.md
@ -82,21 +82,15 @@ export OPENAI_API_KEY="your-api-key-here"
|
||||
```
|
||||
├── simple-react-agent/ # Single ReAct agent approach
|
||||
│ ├── main.py # Main application
|
||||
│ ├── log_analyzer.py # Log analysis tool
|
||||
│ ├── loghub/ # → symlink to ../loghub
|
||||
│ ├── custom_tools/ # Custom tools for the agent
|
||||
│ └── README.md # Detailed documentation
|
||||
│
|
||||
├── multi-agent-supervisor/ # Multi-agent supervisor approach
|
||||
│ ├── 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
|
||||
│
|
||||
├── loghub/ # Sample log files
|
||||
│ ├── Apache/
|
||||
│ ├── Linux/
|
||||
│ ├── Nginx/
|
||||
│ └── ... (various system logs)
|
||||
│
|
||||
└── README.md # This file
|
||||
```
|
||||
|
||||
@ -118,34 +112,26 @@ python main-multi-agent.py
|
||||
|
||||
### 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"
|
||||
"List all available log files"
|
||||
"Find timeline patterns in Linux logs"
|
||||
"List files in the current directory"
|
||||
"Show system information"
|
||||
```
|
||||
|
||||
### Multi-Agent Supervisor Examples
|
||||
```
|
||||
"Nginx returns 502 Bad Gateway - diagnose the issue"
|
||||
"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"
|
||||
"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
|
||||
|
||||
**Choose Simple ReAct Agent if:**
|
||||
- You're new to LangGraph
|
||||
- You need basic log analysis
|
||||
- You need basic system administration tasks
|
||||
- You have limited computational resources
|
||||
- You prefer simplicity and transparency
|
||||
- You're building a proof of concept
|
||||
@ -170,8 +156,8 @@ The `loghub/` directory contains sample logs from various systems:
|
||||
|
||||
Feel free to:
|
||||
- Add new specialized agents to the multi-agent system
|
||||
- Enhance the log analysis capabilities
|
||||
- Add new tools for system administration
|
||||
- Enhance the system administration capabilities
|
||||
- Add new tools for system management
|
||||
- Improve error handling and reliability
|
||||
- Add tests and documentation
|
||||
|
||||
@ -183,26 +169,21 @@ This project is for educational and demonstration purposes. Modify and use as ne
|
||||
|
||||
**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
|
||||
|
||||
```
|
||||
langgraph-pard0x/
|
||||
├── main.py # Main LangGraph agent
|
||||
├── log_analyzer.py # Custom log analysis tool
|
||||
├── loghub/ # Git submodule with log datasets
|
||||
│ ├── Linux/
|
||||
│ ├── Apache/
|
||||
│ ├── OpenSSH/
|
||||
│ └── ...
|
||||
├── pyproject.toml # Project dependencies
|
||||
└── README.md # This file
|
||||
├── simple-react-agent/ # Single ReAct agent approach
|
||||
│ ├── main.py # Main application
|
||||
│ ├── custom_tools/ # Custom tools for the agent
|
||||
│ └── README.md # Detailed documentation
|
||||
├── multi-agent-supervisor/ # Multi-agent supervisor approach
|
||||
│ ├── 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
|
||||
└── README.md # This file
|
||||
```
|
||||
|
||||
## ⚠️ Safety Note
|
||||
@ -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
|
||||
- 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
|
||||
|
||||
This project raises several interesting technical and architectural questions worth exploring:
|
||||
|
@ -62,7 +62,10 @@ User Input → Supervisor → Specialized Agents → Aggregated Response
|
||||
## Files
|
||||
|
||||
- `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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user