8000 GitHub - rohittcodes/autoagentdesk: an AI agent designed to assist with log analytics and querying.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

an AI agent designed to assist with log analytics and querying.

License

Notifications You must be signed in to change notification settings

rohittcodes/autoagentdesk

Repository files navigation

github-submission-banner

πŸš€ AutoAgentDesk

An AI agent for log analytics and querying.


πŸ“Œ Problem Statement

Problem Statement 3 – Real-Time Data Experiences with Fluvio


🎯 Objective

AutoAgentDesk addresses the challenges of log analytics and querying by providing an AI-powered solution that simplifies the process. It enables users to interact with logs in natural language, analyze them in real-time, and generate actionable insights.

  • Problem:
    • Log analytics is time-consuming and complex, especially with large datasets from multiple sources.
    • Traditional tools lack real-time capabilities and require manual intervention.
  • Solution:
    • AutoAgentDesk automates log analytics and querying with an AI agent that supports natural language interaction.
    • It provides real-time insights, report generation, and multi-source log integration.
  • Target Audience:
    • Developers, DevOps engineers, and data analysts.
    • Organizations needing real-time log monitoring and analytics.
  • Value Proposition:
    • Saves time and reduces complexity in log analysis.
    • Makes log querying accessible to non-technical users.
    • Enables faster issue resolution with real-time capabilities.

🧠 Team & Approach

Team Name:

AutoAgentDesk (Solo hacker)

Team Members:

  • Rohith Singh (Team Lead)

Approach:

  • Researched existing tools and identified gaps.
  • Designed a scalable architecture for real-time log processing and natural language interaction.
  • Built the core functionality using Python, FastAPI, LangChain, and Fluvio.
  • Integrated Chromadb for log storage and trained the AI on diverse log queries.
  • Created a web interface for user-friendly interaction.
  • Iteratively improved the agent based on feedback.

πŸ› οΈ Tech Stack

Core Technologies:

  • Frontend: HTML, CSS, JavaScript (ReactJS)
  • Backend: Python, FastAPI
  • Database: Chromadb, PostgreSQL
  • APIs: Fluvio (log streaming), LangChain (NLP)
  • AI Models: Groq AI, Gemini AI, OpenAI, Anthropic
  • Hosting: Docker (containerization), Redis (caching) - not yet implemented
  • Other Tools: GitHub (version control), Postman (API testing)

✨ Key Features

  • βœ… Multi-model AI support (Groq AI, Gemini AI, OpenAI, Anthropic)
  • βœ… Real-time log streaming with Fluvio
  • βœ… Natural language querying for logs
  • βœ… Multi-source log integration (frontend, backend, database)
  • βœ… RESTful API and web interface
  • βœ… Plugin system for extensibility
  • βœ… Support for JSON, XML, and other log formats
  • βœ… Timeline tracking and state management
  • βœ… Report generation and batch processing

πŸ“½οΈ Demo & Deliverables


πŸ§ͺ How to Run the Project

Requirements:

  • Python 3.8+: Ensure Python is installed on your system.
  • Node.js: Required for the frontend (if applicable).
  • Docker: For containerization (optional, not yet implemented).
  • Fluvio: For real-time log streaming.
  • API Keys: Required for AI models and services:
    • GROQ_API_KEY
    • OPENAI_API_KEY
    • ANTHROPIC_API_KEY
    • GOOGLE_API_KEY
  • Environment Variables: Set up a .env file in the root directory. Refer to the .env_sample file for required variables.
  • Chromadb: For log storage.
  • PostgreSQL: For database storage (optional, not yet implemented).
  • Redis: For caching (optional, not yet implemented).

Local Setup:

git clone https://github.com/rohittcodes/autoagentdesk

cd autoagentdesk
pip install -r requirements.txt

python main.py

Access the API at http://localhost:8000.


🧬 Architecture Diagrams & Snapshots

Click to view architecture diagrams and snapshots

Architecture Diagrams

llm-groq
fluvio
architecture
dataflow

Snapshots

File ingestion

file-ingestion

Analysis Report

analysis-report

Timeline

timeline

Agent state

agent-state


🧬 Future Scope

  • πŸ“ˆ Add more integrations and advanced analytics features.
  • πŸ›‘οΈ Enhance security and scalability.
  • 🌐 Support localization and multi-language capabilities.
  • πŸ”” Implement alerting and notification systems.
  • πŸ–₯️ Improve the web interface with ReactJS.

πŸ“Ž Resources / Credits

  • APIs: Fluvio, LangChain, Groq AI, OpenAI, Anthropic
  • Tools: Chromadb, FastAPI, Docker, Redis
  • Acknowledgements: HackHazards team and community

🏁 Final Words

My hackathon journey building AutoAgentDesk has been both challenging and rewarding! Here's a glimpse into my experience:

Challenges & Learnings

  • Working with ChromaDB's query format was a significant hurdle. When implementing filters, I discovered that ChromaDB has specific requirements for field names and operators. After debugging the "Invalid where clause" errors, I learned the importance of proper field name mapping and using the correct query operators ($in vs $eq).
  • The context variable definition bug in the LogAnalysisAgent class taught me to be more careful about variable scoping in asynchronous Python code. Always capture return values!
  • Balancing token limits with comprehensive log analysis was tricky. I developed a smart log prioritization system that ensures critical database and memory-related errors are never truncated, even when dealing with thousands of logs.

Technical Insights

  • Integrating Groq's API was seamless once I understood its token limitations. The performance improvement over other models for this specific use case was impressive - responses are noticeably faster.
  • Fluvio's streaming capabilities transformed the project from a basic log analysis tool into a real-time monitoring platform. The producer-consumer architecture enables complex real-time pipelines that traditional log systems can't match.
  • Building a context-aware AI agent that maintains conversation history and previous findings created a more natural and insightful user experience than I initially expected.

Community & Inspiration

  • Special thanks to the Groq and InfinyOn teams for their documentation and sample projects that helped make integration smoother.

I'm excited to continue developing AutoAgentDesk beyond this hackathon, with plans to implement the alerting system and ReactJS frontend improvements next. This project has deepened my understanding of AI-assisted observability tools and real-time data processing architectures.


API Endpoints

  • /logs: Endpoint for analyzing logs. You can access this endpoint to send log data to the AI agent for analysis. The agent will process the logs and return insights based on the data.
  • /queries: Endpoint for querying logs. You can send a query to this endpoint, and the AI agent will return the relevant log data. curl -X POST "http://localhost:8000/queries/" -H "Content-Type: application/json" -d '{"query": "What WARN level logs occurred in the API service in the last 24 hours?", "max_logs": 789B 100}'
  • /report: Endpoint for generating reports. You can send a request to this endpoint, and the AI agent will generate a report based on the log data. (yet to be implemented)

Roadmap

  • Implement visualization capabilities
  • Add support for more log sources
  • Improve natural language understanding
  • Enhance performance and scalability
  • Add more advanced analytics features
  • Implement user authentication and authorization
  • Create a web interface for easier interaction
  • Update the web interface to use ReactJS
  • Add support for real-time log monitoring
  • Implement alerting and notification features
  • Add support for more languages
  • Improve documentation and examples
  • Add more test cases and improve test coverage
  • Implement a plugin system for extensibility
  • Add support for more log formats (e.g., JSON, XML)

Contributing

We welcome contributions to AutoAgentDesk! If you have ideas for new features, improvements, or bug fixes, please open an issue or submit a pull request. Please make sure to follow the contribution guidelines when contributing to the project.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

an AI agent designed to assist with log analytics and querying.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0