Skip to main content

An enterprise-grade Python library for quickly setting up APIs to interact with AI Agents

Project description

Insight Ingenious

An enterprise-grade Python library for quickly setting up APIs to interact with AI Agents, featuring tight integrations with Microsoft Azure services and comprehensive utilities for debugging and customization.

Quick Start

Get up and running in 5 minutes with Azure OpenAI!

Prerequisites

5-Minute Setup

  1. Install and Initialize:

    # From your project directory
    uv add ingenious
    uv run ingen init
    
  2. Configure Credentials:

    # Edit .env with your Azure OpenAI credentials
    cp .env.example .env
    nano .env  # Add AZURE_OPENAI_API_KEY and AZURE_OPENAI_BASE_URL
    
  3. Validate Setup (Recommended):

    export INGENIOUS_PROJECT_PATH=$(pwd)/config.yml
    export INGENIOUS_PROFILE_PATH=$(pwd)/profiles.yml
    uv run ingen validate  # Check configuration before starting
    
  4. Start the Server:

    uv run ingen serve
    
  5. Verify Health:

    # Check server health
    curl http://localhost:80/api/v1/health
    
  6. Test the API:

    # Test bike insights workflow (the "Hello World" of Ingenious)
    curl -X POST http://localhost:80/api/v1/chat \
      -H "Content-Type: application/json" \
      -d '{
        "user_prompt": "{\"stores\": [{\"name\": \"QuickStart Store\", \"location\": \"NSW\", \"bike_sales\": [{\"product_code\": \"QS-001\", \"quantity_sold\": 1, \"sale_date\": \"2023-04-15\", \"year\": 2023, \"month\": \"April\", \"customer_review\": {\"rating\": 5.0, \"comment\": \"Perfect bike for getting started!\"}}], \"bike_stock\": []}], \"revision_id\": \"quickstart-1\", \"identifier\": \"hello-world\"}",
        "conversation_flow": "bike-insights"
      }'
    

🎉 That's it! You should see a comprehensive JSON response with insights from multiple AI agents analyzing the bike sales data.

Note: The bike-insights workflow is created when you run ingen init - it's part of the project template setup, not included in the core library. You can now build on bike-insights as a template for your specific use case.

Workflow Categories

Insight Ingenious provides multiple conversation workflows with different configuration requirements:

"Hello World" Workflow (Available via project template)

  • bike-insights - The recommended starting point - Comprehensive bike sales analysis showcasing multi-agent coordination (created when you run ingen init)

Core Workflows (Azure OpenAI only)

  • classification-agent - Route input to specialized agents based on content

EXPERIMENTAL/MAY CONTAIN BUGS: Other Core Workflows (Require Additional Services)

  • knowledge-base-agent - Search knowledge bases (requires Azure Search Service)
  • sql-manipulation-agent - Execute SQL queries (requires database connection)

Project Structure

  • ingenious/: Core framework code

    • api/: API endpoints and routes
    • chainlit/: Web UI components
    • config/: Configuration management
    • core/: Core logging and utilities
    • dataprep/: Data preparation utilities
    • db/: Database integration
    • document_processing/: Document analysis and processing
    • errors/: Error handling and custom exceptions
    • external_services/: External service integrations
    • files/: File storage utilities
    • models/: Data models and schemas
    • services/: Core services including chat and agent services
    • templates/: Prompt templates and HTML templates
    • utils/: Utility functions
    • ingenious_extensions_template/: Template for custom extensions
      • api/: Custom API routes
      • models/: Custom data models
      • sample_data/: Sample data for testing
      • services/: Custom agent services
      • templates/: Custom prompt templates
      • tests/: Test harness for agent prompts
  • ingenious_prompt_tuner/: Tool for tuning and testing prompts

Documentation

For detailed documentation, see the docs:

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

License

This project is licensed under the terms specified in the LICENSE file.

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

ingenious-0.1.1.tar.gz (267.7 kB view details)

Uploaded Source

Built Distribution

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

ingenious-0.1.1-py3-none-any.whl (337.7 kB view details)

Uploaded Python 3

File details

Details for the file ingenious-0.1.1.tar.gz.

File metadata

  • Download URL: ingenious-0.1.1.tar.gz
  • Upload date:
  • Size: 267.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ingenious-0.1.1.tar.gz
Algorithm Hash digest
SHA256 bea867443d65be4edcbe41044ffb63eb316e9808ba051862f399995a5966ac8b
MD5 145b04df3d42efeaf2a5c498441d923d
BLAKE2b-256 e3bb1ab2c340d1dc394251ab58202feea9a4113fd4340bdd93e53c13c6c957fa

See more details on using hashes here.

Provenance

The following attestation bundles were made for ingenious-0.1.1.tar.gz:

Publisher: publish.yml on Insight-Services-APAC/ingenious

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ingenious-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: ingenious-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 337.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ingenious-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 677f2a3ed35eda30df66a69e3065e4d93ab43975860415707b23cd92c0a1457d
MD5 9823d9f0896718cfcf1c3e74b5000c73
BLAKE2b-256 a69dc295ddab8cfcce580d169ea922d1c520a1d7ebc06075c7ff36a76f887aec

See more details on using hashes here.

Provenance

The following attestation bundles were made for ingenious-0.1.1-py3-none-any.whl:

Publisher: publish.yml on Insight-Services-APAC/ingenious

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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