Skip to main content

Production-ready AI SDK for Security Scanning, Resume Intelligence, Voice Intelligence, REST APIs, CLI, and Multi-Provider LLM Integration.

Project description

ai_verse

ai_verse banner

PyPI Version Python Version License: MIT CI Build Status Docker Build

ai_verse is an open-source, production-ready AI SDK, Command Line Interface (CLI), enterprise REST API server, and containerized microservice platform for Python.


Features

  • Multi-Provider Engine: Supports OpenRouter, OpenAI, Anthropic, Google Gemini, xAI Grok, Local Ollama, and Azure OpenAI.
  • Automatic Fallback Chain: Transparent failover across backup providers if primary models experience downtime.
  • AI Security Scanners: Integrated scanners for SMS Smishing, WhatsApp Scams, Phishing Emails, Websites, Payment Receipts, QR Codes, and Android APK Malware.
  • Document & Vision Intelligence: 4-stage PDF/OCR extraction pipeline (PyMuPDF -> pdfplumber -> pypdf -> pytesseract) for ATS Resume Analysis and Receipt Processing.
  • Voice Intelligence: Real speech-to-text audio transcription powered by faster-whisper.
  • Enterprise REST API Server: Async FastAPI server (/api/v1) with OpenAPI/Swagger documentation (/docs) and file upload endpoints.
  • Rich CLI Tool: Command-line application ai-verse powered by Typer and Rich.
  • Plugin Framework: Dynamic plugin loader, manager, and lifecycle hooks (before_request, after_request, before_scan, after_scan).
  • Caching System: High-performance in-memory (MemoryCache) and persistent disk (DiskCache) caching with TTL support.
  • Production Containerization: Multi-stage Docker image running under non-root user appuser (UID 10001) with healthchecks.

Architecture

                  ┌───────────────────────────────┐
                  │       AI Facade (AI())        │
                  └──────────────┬────────────────┘
                                 │
         ┌───────────────────────┼───────────────────────┐
         ▼                       ▼                       ▼
┌──────────────────┐   ┌──────────────────┐   ┌──────────────────┐
│  Security Scans  │   │     Doc & Vision │   │Voice Intelligence│
└──────────────────┘   └──────────────────┘   └──────────────────┘
         │                       │                       │
         └───────────────────────┼───────────────────────┘
                                 ▼
                     ┌───────────────────────┐
                     │   Provider Factory    │
                     └───────────┬───────────┘
                                 │
       ┌───────────┬───────────┼───────────┬───────────┐
       ▼           ▼           ▼           ▼           ▼
┌─────────────┐┌─────────┐┌──────────┐┌─────────┐┌───────────┐
│ OpenRouter  ││ OpenAI  ││Anthropic ││ Gemini  ││  Ollama   │
└─────────────┘└─────────┘└──────────┘└─────────┘└───────────┘

Installation & Clone

git clone https://github.com/i-amshifa-06/ai_verse.git
cd ai_verse
pip install ai_verse

For extra features:

# Install with audio processing support (faster-whisper)
pip install ai_verse[audio]

# Install with document OCR support (pytesseract & pdfplumber)
pip install ai_verse[ocr]

Environment Setup

Copy .env.example to .env or set your API key:

export OPENROUTER_API_KEY="sk-or-v1-your_openrouter_api_key_here"

For other providers:

  • OPENAI_API_KEY: OpenAI API Key
  • ANTHROPIC_API_KEY: Anthropic Claude API Key
  • GOOGLE_API_KEY: Google Gemini API Key
  • XAI_API_KEY: xAI Grok API Key
  • OLLAMA_BASE_URL: Local Ollama endpoint (default http://localhost:11434)

Quick Start Examples

1. Python SDK

from ai_verse import AI

# Initialize AI facade with OpenAI (or default OpenRouter)
ai = AI(provider="openai")

# Chat Completion
response = ai.chat("Explain zero trust network architecture in 2 sentences.")
print(response.data["text"])

# SMS Smishing Scan
sms_res = ai.scan_sms("URGENT: Your account is locked. Verify at http://bit.ly/fake")
print(f"Risk Score: {sms_res.data['risk_score']}/100 | Risk Level: {sms_res.data['risk_level']}")

# Resume Analysis
resume_res = ai.analyze_resume("resume.pdf", job_description="AppSec Engineer")
print(f"ATS Score: {resume_res.data['ats_score']}%")

2. Command Line Interface (CLI)

ai-verse chat "Explain quantum computing in simple terms."
ai-verse scan sms "Verify account at http://bit.ly/fake"
ai-verse resume analyze resume.pdf --job-description "AppSec Engineer"
ai-verse doctor

3. FastAPI REST API Server

uvicorn ai_verse.api.main:app --host 0.0.0.0 --port 8000 --reload

Visit http://localhost:8000/docs for Swagger UI.


4. Production Docker

docker build -f docker/Dockerfile -t ai-verse:latest .

docker run -d --name ai-verse-server \
  -p 8000:8000 \
  -e OPENROUTER_API_KEY="your_api_key_here" \
  ai-verse:latest

Showcase & Frontend Integrations

Complete cross-platform showcase examples available under examples/showcase/:


Documentation

Full documentation is available at https://i-amshifa-06.github.io/ai_verse or under docs/:


Contributing

We welcome community contributions! Please read CONTRIBUTING.md and CODE_OF_CONDUCT.md.


License

ai_verse is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ai_verse-1.0.2.tar.gz (86.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ai_verse-1.0.2-py3-none-any.whl (99.9 kB view details)

Uploaded Python 3

File details

Details for the file ai_verse-1.0.2.tar.gz.

File metadata

  • Download URL: ai_verse-1.0.2.tar.gz
  • Upload date:
  • Size: 86.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.4

File hashes

Hashes for ai_verse-1.0.2.tar.gz
Algorithm Hash digest
SHA256 b31053a8eeb2e32fccc709880ec06d1cdf75e0f972a382d42cae06485482f16e
MD5 c05be1db4dcd2835dd59b2428fba8f69
BLAKE2b-256 02115db3b3a88ee5c3664dd2756d84c29cf442e6605b4b2bad792a71e280c686

See more details on using hashes here.

File details

Details for the file ai_verse-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: ai_verse-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 99.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.4

File hashes

Hashes for ai_verse-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 270b9208c67bc2bc31b2d70281fce67855f597dedba9442107c04784b0f7a355
MD5 5c58b4aa30f8f34d08bc90eb8c206f35
BLAKE2b-256 3523ee6e5a9c5807203767c213e8a768c9ce91f55692a2f59b68830cb343f748

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page