Skip to content

Examples & Showcase

Real-world ANSAI implementations. Learn by example.


๐ŸŽฏ Quick Navigation


๐Ÿค– AI-Powered Workflows

Intelligent automation that thinks, not just executes.

1. ansai-log-analyzer - AI Log Analysis ๐Ÿ”

What it does: Uses AI to analyze logs and identify root causes, patterns, and recommendations.

Perfect for: - Post-incident analysis - Performance troubleshooting - Security investigations - Anomaly detection

Example:

# Analyze service logs
ansai-log-analyzer --service nginx --since "1 hour ago"

# Focus on security issues
ansai-log-analyzer --focus security /var/log/auth.log

# Pipe logs directly
journalctl -u myapp.service | ansai-log-analyzer

Real Output:

โœ… Analysis Complete

## Root Cause Analysis

Primary Issue: Database connection pool exhausted
- Connection pool: 100/100 (100% utilization)
- Peak traffic: 15:30-15:45 (300% above baseline)
- Trigger: Marketing campaign launch

Contributing Factors:
- No connection timeout configured
- Missing rate limiting
- Insufficient pool size for peak load

## Recommendations

Immediate:
1. Increase connection pool to 200
2. Add connection timeout (30s)
3. Implement rate limiting

Long-term:
1. Add connection pool monitoring
2. Auto-scaling based on pool utilization
3. Load testing for marketing campaigns

Download Workflow โ†’


2. ansai-incident-report - AI Incident Reports ๐Ÿ“

What it does: Generates comprehensive incident reports and post-mortems using AI.

Perfect for: - Post-mortem documentation - Executive summaries - Blameless retrospectives - Root cause analysis

Example:

# Interactive mode (easiest)
ansai-incident-report --interactive

# Generate post-mortem
ansai-incident-report \
    --service "web-api" \
    --start "2025-11-18 14:30" \
    --severity critical \
    --template postmortem \
    --output incident-report.md

Real Output: Full post-mortem with: - Executive summary - Timeline of events - Root cause (5 Whys) - Action items with owners - Prevention measures - Lessons learned

Download Workflow โ†’


3. ansai-deploy-safe - AI Deployment Safety โœ…

What it does: AI reviews deployments for safety issues before production.

Perfect for: - Pre-deployment validation - Security review automation - Production safety checks - Configuration validation

Example:

# Check Kubernetes manifest
ansai-deploy-safe --type kubernetes deployment.yaml

# Strict mode (fail on warnings)
ansai-deploy-safe --type kubernetes --env production --strict deployment.yaml

# Analyze git diff
git diff main..HEAD | ansai-deploy-safe --type kubernetes --env production

Real Output:

## Overall Risk Assessment: MEDIUM

โŒ Resource Limits: FAIL
   - No CPU limits defined
   - Memory request too low (128Mi)
   - Recommendation: Add resource limits

โŒ Health Checks: FAIL
   - Missing readiness probe
   - Risk: Traffic to unhealthy pods
   - Recommendation: Add readiness probe

๐Ÿšจ NO-GO: Fix critical issues before deployment

Download Workflow โ†’


4. More AI Workflows

Available now: - ansai-context-switch - Context-aware development environments - ansai-progress-tracker - Visual CLI progress tracking - ansai-vault-read - Secure secrets management

Coming soon: - ansai-cost-optimizer - AI-powered cloud cost optimization - ansai-security-audit - Intelligent security scanning - ansai-capacity-planner - Predictive capacity planning

Browse All Workflows โ†’


๐Ÿ“ฆ Real-World Use Cases

Inspired by Ansible Galaxy, enhanced with AI.

Database Management (Galaxy-Inspired) ๐Ÿ—„๏ธ

Traditional: geerlingguy.postgresql
ANSAI Enhancement: AI query optimization, predictive maintenance

What you get: - AI analyzes slow queries โ†’ suggests indexes - Configuration auto-tuning based on workload - Predictive alerts (connection pool exhaustion in 3 days) - Natural language ops ("Why is the database slow?")

Results: - Query performance: +95% (AI-optimized indexes) - Configuration: Auto-tuned for workload - Incidents: Predicted 3 days in advance

Full Case Study โ†’


Web Server Optimization (Galaxy-Inspired) ๐ŸŒ

Traditional: geerlingguy.nginx
ANSAI Enhancement: AI performance tuning, intelligent caching

What you get: - AI optimizes worker processes, connections, buffers - Cache intelligence (AI determines optimal settings) - Security hardening (AI recommends SSL/TLS configs) - Traffic analysis (AI detects anomalies, DDoS)

Results: - Latency: 120ms โ†’ 35ms (-71%) - Throughput: 500 req/s โ†’ 1200 req/s (+140%) - Cache hit rate: 45% โ†’ 85%

Full Case Study โ†’


Kubernetes Management (Galaxy-Inspired) โ˜ธ๏ธ

Traditional: community.kubernetes
ANSAI Enhancement: AI resource sizing, predictive scaling

What you get: - AI right-sizes resources (saves 62% on costs) - Intelligent pod scheduling - Predictive scaling (40% faster response) - Cost optimization while meeting SLAs

Results: - Cost savings: $245/month (-62%) - Pods per node: 12 โ†’ 28 (better density) - Traffic spike response: +40% faster

Full Case Study โ†’


Monitoring & Alerting (Galaxy-Inspired) ๐Ÿ“Š

Traditional: cloudalchemy.prometheus + cloudalchemy.grafana
ANSAI Enhancement: AI anomaly detection, alert correlation

What you get: - AI learns "normal" โ†’ alerts on anomalies - Alert correlation (groups 12 alerts โ†’ 1 root cause) - Predictive alerts (disk full in 3.2 days) - Smart thresholds (dynamically adjusted)

Results: - Alert noise: Reduced 85% - Root cause time: 15min โ†’ 2min - False positives: -90%

Full Case Study โ†’


Security Hardening (Galaxy-Inspired) ๐Ÿ”’

Traditional: dev-sec.os-hardening
ANSAI Enhancement: AI threat intelligence, behavioral analysis

What you get: - AI prioritizes vulnerabilities by actual risk - Behavioral anomaly detection - Compliance checking (CIS, PCI-DSS, SOC 2) - Intelligent firewall rules

Results: - Vulnerabilities: 47 found, AI-prioritized - Anomalies: Detected unusual SSH activity (87% confidence) - Compliance: 87% CIS, with 8 quick wins identified

Full Case Study โ†’


๐ŸŽฌ Video Tutorials

Coming Soon!

Planned tutorials: 1. ANSAI Quick Start (5 minutes)
Install โ†’ Deploy โ†’ First AI analysis

  1. AI Log Analysis Demo (8 minutes)
    Real incident, AI root cause, resolution

  2. Deployment Safety Demo (6 minutes)
    Kubernetes manifest review, AI recommendations

  3. Building Your First Workflow (15 minutes)
    Step-by-step workflow creation

Want to contribute a video? Let us know โ†’


๐Ÿ—๏ธ Contributing

Share Your Workflows!

Built something cool with ANSAI? Share it with the community!

What we're looking for: - AI-powered automation workflows - Real-world use cases - Galaxy role enhancements - Integration examples - Creative solutions

How to contribute:

  1. Create your workflow

    # Follow our template
    cp examples/workflows/TEMPLATE.sh my-workflow.sh
    

  2. Test it thoroughly

    # Test with multiple AI backends
    # Document edge cases
    # Add error handling
    

  3. Document it well

    # What it does
    # Why it's useful
    # How to use it
    # Example output
    

  4. Share it

  5. Submit PR to GitHub
  6. Share in Discussions
  7. Add to Showcase

Full Contribution Guide โ†’


๐Ÿ’ก Get Inspired

Community Creations

Coming soon: Showcase of community-built workflows

Examples we want to see: - ChatOps integrations - Cost optimization tools - Compliance automation - Disaster recovery - Multi-cloud orchestration - Developer productivity tools

Share yours โ†’


๐Ÿ“Š By the Numbers

ANSAI Examples: - ๐Ÿค– AI Workflows: 6+ available - ๐Ÿ“ฆ Use Cases: 5+ documented - ๐Ÿ’ฐ Cost Savings: Up to 70% - โšก Performance: Up to 140% improvement - ๐ŸŽฏ Accuracy: 87%+ confidence in AI analysis


๐Ÿš€ Get Started

1. Install ANSAI

curl -sSL https://raw.githubusercontent.com/thebyrdman-git/ansai/main/install.sh | bash

2. Set up AI Backend

export OPENAI_API_KEY="your-key"
litellm --config ~/.config/ansai/litellm_config.yaml --port 4000 &

3. Try an Example

# Download a workflow
curl -o ansai-log-analyzer https://raw.githubusercontent.com/thebyrdman-git/ansai/main/examples/workflows/ai-powered/ansai-log-analyzer
chmod +x ansai-log-analyzer

# Test it
echo "ERROR: Connection refused" | ./ansai-log-analyzer

4. Build Your Own

# Start with our template
cp examples/workflows/TEMPLATE.sh my-workflow.sh

# Customize it
# Test it
# Share it!

Full Getting Started Guide โ†’


๐Ÿ’ฌ Community

Get Help & Share Ideas


๐Ÿ“š Learn More


Part of the ANSAI Framework
Learn more: https://ansai.dev

Build intelligent automation. Share what you create. ๐Ÿš€