Skip to content

Conversation

@adrianpuiu
Copy link

  1. 🔍 Code Review Agent (code_review_agent.py)
    Reviews code for security vulnerabilities and best practices:

SQL injection detection
Resource leak identification
Exception handling analysis
Mutable default arguments
XSS vulnerabilities
Race conditions
Learns: Team-specific coding patterns and security standards

  1. 📊 Data Analysis Agent (data_analysis_agent.py)
    Analyzes data and generates actionable insights:

Sales trend analysis
Anomaly detection
User engagement metrics
System performance monitoring
Customer satisfaction patterns
Learns: What types of insights are valuable for different data domains

  1. 🗄️ SQL Query Generator (sql_query_agent.py)
    Translates natural language to SQL queries:

Complex joins and aggregations
Subqueries and window functions
Query optimization patterns
Database-specific syntax
Learns: Schema-specific patterns and business query requirements

  1. 🔧 Troubleshooting Assistant (troubleshooting_agent.py)
    Diagnoses system issues from logs and symptoms:

Memory leaks and resource exhaustion
Network timeouts and connectivity issues
Configuration problems
Performance bottlenecks
Learns: Environment-specific issues and resolution patterns

  1. 📝 Technical Writer Agent (technical_writer_agent.py)
    Converts technical content to clear documentation:

API documentation
README files
Changelog entries
Configuration guides
Tutorial introductions
Learns: Company documentation style and best practices

Development & DevOps (5 agents)
🔍 Code Review Agent - Security vulnerabilities and best practices
🧪 Test Case Generator ⭐ NEW - Comprehensive unit test generation
🗄️ SQL Query Generator - Natural language to SQL
📝 Git Commit Message Generator ⭐ NEW - Conventional commit messages
🔧 Troubleshooting Assistant - System diagnostics
Operations & Support (2 agents)
📧 Email/Ticket Classifier ⭐ NEW - Support ticket automation
🐛 Bug Report Analyzer ⭐ NEW - Issue triage and severity
Data & Analytics (1 agent)
📊 Data Analysis Agent - Data insights and patterns
Security (1 agent)
🔐 Security Log Analyzer ⭐ NEW - Threat detection and response
Documentation (1 agent)
📝 Technical Writer Agent - Code to documentation
📊 What Each New Agent Does

  1. 🧪 Test Case Generator

Learns:

  • Edge cases (empty input, null, boundary values)
  • Pytest patterns (@pytest.mark, fixtures)
  • Mocking strategies (unittest.mock, responses)
  • Team testing conventions

Training: 6 code samples covering various scenarios

  1. 📧 Email/Ticket Classifier

Learns:

  • Priority: critical → low
  • Categories: bug, feature, billing, security
  • Department routing rules
  • False alarm detection (spam)

Training: 7 real support tickets

  1. 🐛 Bug Report Analyzer

Learns:

  • Severity: blocker → trivial
  • Component assignment (ui, api, backend)
  • Required information extraction
  • Duplicate detection patterns

Training: 6 bug reports with various severities

  1. 📝 Git Commit Message Generator

Learns:

  • Conventional commit format (feat/fix/docs/etc)
  • Scope detection from diff
  • Breaking change identification
  • 72-character limit compliance

Training: 6 code diffs with commits

  1. 🔐 Security Log Analyzer

Learns:

  • Threat types: brute force, SQL injection, data exfil
  • Severity: critical → none
  • False positive reduction
  • Attack pattern signatures

Training: 7 security log scenarios

🎯 Quick Start

Run individual agent

uv run python examples/ollama/test_generator_agent.py
uv run python examples/ollama/email_classifier_agent.py
uv run python examples/ollama/bug_report_agent.py
uv run python examples/ollama/commit_message_agent.py
uv run python examples/ollama/security_log_agent.py

Or run all 10 agents sequentially (20-30 minutes)

uv run python examples/ollama/run_all_demos.py

Add comprehensive, production-ready agent examples using local Ollama models:

1. Code Review Agent - Reviews code for bugs, security issues, and best practices
   - SQL injection, resource leaks, exception handling
   - Learns team-specific coding patterns

2. Data Analysis Agent - Analyzes data and generates actionable insights
   - Sales trends, anomaly detection, business metrics
   - Learns domain-specific analysis patterns

3. SQL Query Generator - Natural language to SQL translation
   - Complex joins, aggregations, subqueries
   - Learns database-specific query patterns

4. Troubleshooting Assistant - Diagnoses system issues
   - Memory leaks, performance issues, network problems
   - Learns environment-specific issues

5. Technical Writer Agent - Converts code to documentation
   - API docs, README files, changelogs
   - Learns company documentation style

Features:
- Each agent includes 6+ training samples
- Custom TaskEnvironment for domain-specific evaluation
- Before/after learning comparisons
- Real-world test cases
- Persistent playbooks for knowledge reuse
- Comprehensive README with setup and best practices

All examples use ACE learning to improve over time, demonstrating:
- Offline training with evaluation
- Learned strategy persistence
- Model recommendations (qwen2.5:7b, llama3.1:8b)
- Production-ready error handling

Run all demos: uv run python examples/ollama/run_all_demos.py
Add 5 additional production-ready agent examples using Ollama:

**New Agents:**

1. Test Case Generator (test_generator_agent.py) - Generates unit tests
   - Edge case detection
   - Pytest patterns
   - Mocking strategies
   - Learns team testing conventions

2. Email/Ticket Classifier (email_classifier_agent.py) - Support automation
   - Priority classification
   - Department routing
   - Intent recognition
   - Learns routing rules

3. Bug Report Analyzer (bug_report_agent.py) - Issue triage
   - Severity classification
   - Component assignment
   - Duplicate detection
   - Required information extraction

4. Git Commit Message Generator (commit_message_agent.py) - Conventional commits
   - Semantic versioning
   - Scope detection
   - Breaking change identification
   - Learns project conventions

5. Security Log Analyzer (security_log_agent.py) - Threat detection
   - Attack pattern recognition
   - False positive reduction
   - Incident severity
   - Response procedures

**Updates:**
- README now organized by category (Dev/Ops/Data/Security/Docs)
- run_all_demos.py updated to run all 10 agents
- All agents include 6-7 training samples
- Custom evaluation environments for each domain
- Real-world test cases demonstrating practical usage

**Total Agent Collection:**
- 10 production-ready agents across 5 domains
- Comprehensive examples for different industries
- ACE learning patterns for various use cases
- Complete with persistent playbooks

Run all: uv run python examples/ollama/run_all_demos.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants