ingenious


Nameingenious JSON
Version 0.1.3 PyPI version JSON
download
home_pageNone
SummaryAn enterprise-grade Python library for quickly setting up APIs to interact with AI Agents
upload_time2025-07-10 05:25:41
maintainerNone
docs_urlNone
authorNone
requires_python>=3.13
licenseMIT
keywords agent autogen azure fastapi
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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
- Python 3.13+
- Azure OpenAI API credentials
- [uv package manager](https://docs.astral.sh/uv/)

### 5-Minute Setup

1. **Install and Initialize**:
    ```bash
    # From your project directory
    uv add ingenious
    uv run ingen init
    ```

2. **Configure Credentials**:
    #### For Linux-based Environments
    ```bash
    # Edit .env with your Azure OpenAI credentials
    cp .env.example .env
    nano .env  # Add AZURE_OPENAI_API_KEY and AZURE_OPENAI_BASE_URL
    ```
    #### For Windows-based Environments
    ```bash
    # Edit .env with your Azure OpenAI credentials
    cp .env.example .env
    # Assuming you have VSCode installation. If none, open .env file with your favorite editor
    # and add  AZURE_OPENAI_API_KEY and AZURE_OPENAI_BASE_URL to it.
    code .env  # Add AZURE_OPENAI_API_KEY and AZURE_OPENAI_BASE_URL
    ```

3. **Validate Setup** (Recommended):
    #### For Linux-based Environments
    ```bash
    export INGENIOUS_PROJECT_PATH=$(pwd)/config.yml
    export INGENIOUS_PROFILE_PATH=$(pwd)/profiles.yml
    uv run ingen validate  # Check configuration before starting
    ```

    #### For Windows-based Environments
    ```bash
    $env:INGENIOUS_PROJECT_PATH = "{your_project_folder}/config.yml"
    $env:INGENIOUS_PROFILE_PATH = "{profile_folder_location}/profiles.yml"                        
    uv run ingen validate  # Check configuration before starting
    ```

4. **Start the Server**:
    ```bash
    uv run ingen serve
    ```

5. **Verify Health**:
    ```bash
    # Check server health
    curl http://localhost:80/api/v1/health
    ```

6. **Test the API**:
    ```bash
    # 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:

### Core Workflows (Available in library)
- `classification-agent` - Route input to specialized agents based on content (Azure OpenAI only)
- `knowledge-base-agent` - Search knowledge bases using local ChromaDB (stable local implementation)
- `sql-manipulation-agent` - Execute SQL queries using local SQLite (stable local implementation)

### Extension Template Workflows (Available via project template)
- `bike-insights` - Comprehensive bike sales analysis showcasing multi-agent coordination (created when you run `ingen init`)

> **Note**: Only local implementations (ChromaDB for knowledge-base-agent, SQLite for sql-manipulation-agent) are currently stable. Azure Search and Azure SQL integrations are experimental and may contain bugs.


## 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](https://blog.insight-services-apac.dev/ingenious/):

## Contributing

Contributions are welcome! Please see [CONTRIBUTING.md](https://github.com/Insight-Services-APAC/ingenious/blob/main/CONTRIBUTING.md) for guidelines.

## License

This project is licensed under the terms specified in the [LICENSE](https://github.com/Insight-Services-APAC/ingenious/blob/main/LICENSE) file.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ingenious",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.13",
    "maintainer_email": null,
    "keywords": "agent, autogen, azure, fastapi",
    "author": null,
    "author_email": "John Rampono <john.rampono@insight.com>, Kokko Ng <kokko.ng@insight.com>, Elliot Zhu <elliot.zhu@insight.com>",
    "download_url": "https://files.pythonhosted.org/packages/5c/3a/b9773a46a508ca19ee3a3394128cd5619df3dc66d75f630732b47e39a1d7/ingenious-0.1.3.tar.gz",
    "platform": null,
    "description": "# Insight Ingenious\n\nAn 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.\n\n## Quick Start\n\nGet up and running in 5 minutes with Azure OpenAI!\n\n### Prerequisites\n- Python 3.13+\n- Azure OpenAI API credentials\n- [uv package manager](https://docs.astral.sh/uv/)\n\n### 5-Minute Setup\n\n1. **Install and Initialize**:\n    ```bash\n    # From your project directory\n    uv add ingenious\n    uv run ingen init\n    ```\n\n2. **Configure Credentials**:\n    #### For Linux-based Environments\n    ```bash\n    # Edit .env with your Azure OpenAI credentials\n    cp .env.example .env\n    nano .env  # Add AZURE_OPENAI_API_KEY and AZURE_OPENAI_BASE_URL\n    ```\n    #### For Windows-based Environments\n    ```bash\n    # Edit .env with your Azure OpenAI credentials\n    cp .env.example .env\n    # Assuming you have VSCode installation. If none, open .env file with your favorite editor\n    # and add  AZURE_OPENAI_API_KEY and AZURE_OPENAI_BASE_URL to it.\n    code .env  # Add AZURE_OPENAI_API_KEY and AZURE_OPENAI_BASE_URL\n    ```\n\n3. **Validate Setup** (Recommended):\n    #### For Linux-based Environments\n    ```bash\n    export INGENIOUS_PROJECT_PATH=$(pwd)/config.yml\n    export INGENIOUS_PROFILE_PATH=$(pwd)/profiles.yml\n    uv run ingen validate  # Check configuration before starting\n    ```\n\n    #### For Windows-based Environments\n    ```bash\n    $env:INGENIOUS_PROJECT_PATH = \"{your_project_folder}/config.yml\"\n    $env:INGENIOUS_PROFILE_PATH = \"{profile_folder_location}/profiles.yml\"                        \n    uv run ingen validate  # Check configuration before starting\n    ```\n\n4. **Start the Server**:\n    ```bash\n    uv run ingen serve\n    ```\n\n5. **Verify Health**:\n    ```bash\n    # Check server health\n    curl http://localhost:80/api/v1/health\n    ```\n\n6. **Test the API**:\n    ```bash\n    # Test bike insights workflow (the \"Hello World\" of Ingenious)\n    curl -X POST http://localhost:80/api/v1/chat \\\n      -H \"Content-Type: application/json\" \\\n      -d '{\n        \"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\\\"}\",\n        \"conversation_flow\": \"bike-insights\"\n      }'\n    ```\n\nThat's it! You should see a comprehensive JSON response with insights from multiple AI agents analyzing the bike sales data.\n\n**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.\n\n## Workflow Categories\n\nInsight Ingenious provides multiple conversation workflows with different configuration requirements:\n\n### Core Workflows (Available in library)\n- `classification-agent` - Route input to specialized agents based on content (Azure OpenAI only)\n- `knowledge-base-agent` - Search knowledge bases using local ChromaDB (stable local implementation)\n- `sql-manipulation-agent` - Execute SQL queries using local SQLite (stable local implementation)\n\n### Extension Template Workflows (Available via project template)\n- `bike-insights` - Comprehensive bike sales analysis showcasing multi-agent coordination (created when you run `ingen init`)\n\n> **Note**: Only local implementations (ChromaDB for knowledge-base-agent, SQLite for sql-manipulation-agent) are currently stable. Azure Search and Azure SQL integrations are experimental and may contain bugs.\n\n\n## Project Structure\n\n- `ingenious/`: Core framework code\n  - `api/`: API endpoints and routes\n  - `chainlit/`: Web UI components\n  - `config/`: Configuration management\n  - `core/`: Core logging and utilities\n  - `dataprep/`: Data preparation utilities\n  - `db/`: Database integration\n  - `document_processing/`: Document analysis and processing\n  - `errors/`: Error handling and custom exceptions\n  - `external_services/`: External service integrations\n  - `files/`: File storage utilities\n  - `models/`: Data models and schemas\n  - `services/`: Core services including chat and agent services\n  - `templates/`: Prompt templates and HTML templates\n  - `utils/`: Utility functions\n  - `ingenious_extensions_template/`: Template for custom extensions\n    - `api/`: Custom API routes\n    - `models/`: Custom data models\n    - `sample_data/`: Sample data for testing\n    - `services/`: Custom agent services\n    - `templates/`: Custom prompt templates\n    - `tests/`: Test harness for agent prompts\n\n- `ingenious_prompt_tuner/`: Tool for tuning and testing prompts\n\n## Documentation\n\nFor detailed documentation, see the [docs](https://blog.insight-services-apac.dev/ingenious/):\n\n## Contributing\n\nContributions are welcome! Please see [CONTRIBUTING.md](https://github.com/Insight-Services-APAC/ingenious/blob/main/CONTRIBUTING.md) for guidelines.\n\n## License\n\nThis project is licensed under the terms specified in the [LICENSE](https://github.com/Insight-Services-APAC/ingenious/blob/main/LICENSE) file.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "An enterprise-grade Python library for quickly setting up APIs to interact with AI Agents",
    "version": "0.1.3",
    "project_urls": {
        "Documentation": "https://insight-services-apac.github.io/ingenious/",
        "Homepage": "https://github.com/Insight-Services-APAC/ingenious",
        "Issues": "https://github.com/Insight-Services-APAC/ingenious/issues",
        "Repository": "https://github.com/Insight-Services-APAC/ingenious"
    },
    "split_keywords": [
        "agent",
        " autogen",
        " azure",
        " fastapi"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "be5111778874afe581c130dea16f63bbb6f3dbca7796c52ecdab02544c2fcfb0",
                "md5": "74209ea00a4a4d8ef0e5dd590709a6a8",
                "sha256": "5965952514fc677e234ca3ed0dd6d1bb29d13ea90c7a75061d0884b1144f6a15"
            },
            "downloads": -1,
            "filename": "ingenious-0.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "74209ea00a4a4d8ef0e5dd590709a6a8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.13",
            "size": 339126,
            "upload_time": "2025-07-10T05:25:39",
            "upload_time_iso_8601": "2025-07-10T05:25:39.812594Z",
            "url": "https://files.pythonhosted.org/packages/be/51/11778874afe581c130dea16f63bbb6f3dbca7796c52ecdab02544c2fcfb0/ingenious-0.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "5c3ab9773a46a508ca19ee3a3394128cd5619df3dc66d75f630732b47e39a1d7",
                "md5": "595f36414377b15d5d7e05c0a7e8995d",
                "sha256": "45161716037bca1263b80c79520d94fd75d32d023eb7d1827bb56b55fc1dd977"
            },
            "downloads": -1,
            "filename": "ingenious-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "595f36414377b15d5d7e05c0a7e8995d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.13",
            "size": 271716,
            "upload_time": "2025-07-10T05:25:41",
            "upload_time_iso_8601": "2025-07-10T05:25:41.436579Z",
            "url": "https://files.pythonhosted.org/packages/5c/3a/b9773a46a508ca19ee3a3394128cd5619df3dc66d75f630732b47e39a1d7/ingenious-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-10 05:25:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Insight-Services-APAC",
    "github_project": "ingenious",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "ingenious"
}
        
Elapsed time: 1.76509s