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
- Python 3.13+
- Azure OpenAI API credentials
- uv package manager
5-Minute Setup
-
Install and Initialize:
# From your project directory uv add ingenious uv run ingen init
-
Configure Credentials:
For Linux-based Environments
# 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
# 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
-
Validate Setup (Recommended):
For Linux-based Environments
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
$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
-
Start the Server:
uv run ingen serve
-
Verify Health:
# Check server health curl http://localhost:80/api/v1/health
-
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:
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 runingen 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 codeapi/: API endpoints and routeschainlit/: Web UI componentsconfig/: Configuration managementcore/: Core logging and utilitiesdataprep/: Data preparation utilitiesdb/: Database integrationdocument_processing/: Document analysis and processingerrors/: Error handling and custom exceptionsexternal_services/: External service integrationsfiles/: File storage utilitiesmodels/: Data models and schemasservices/: Core services including chat and agent servicestemplates/: Prompt templates and HTML templatesutils/: Utility functionsingenious_extensions_template/: Template for custom extensionsapi/: Custom API routesmodels/: Custom data modelssample_data/: Sample data for testingservices/: Custom agent servicestemplates/: Custom prompt templatestests/: 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ingenious-0.1.2.tar.gz.
File metadata
- Download URL: ingenious-0.1.2.tar.gz
- Upload date:
- Size: 269.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce3ee82f08e1313232b75335270e10f363fff69a05e7bfe11ce94ee3c4cbe181
|
|
| MD5 |
1d247fa2042fbe9469037675c2281f4b
|
|
| BLAKE2b-256 |
e5cfa0aded2ab5c8a2253dfc2013a5c94f6cb9b2e0e54058df9e4c52478d809f
|
Provenance
The following attestation bundles were made for ingenious-0.1.2.tar.gz:
Publisher:
publish.yml on Insight-Services-APAC/ingenious
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ingenious-0.1.2.tar.gz -
Subject digest:
ce3ee82f08e1313232b75335270e10f363fff69a05e7bfe11ce94ee3c4cbe181 - Sigstore transparency entry: 266783321
- Sigstore integration time:
-
Permalink:
Insight-Services-APAC/ingenious@85cf0e305435b451fb46d6164a0ed267a442bcd0 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Insight-Services-APAC
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@85cf0e305435b451fb46d6164a0ed267a442bcd0 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file ingenious-0.1.2-py3-none-any.whl.
File metadata
- Download URL: ingenious-0.1.2-py3-none-any.whl
- Upload date:
- Size: 336.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d1fc77c5129945a7d9ef15f07fc48e4e13e1866c69bf5472cff004c93efc859b
|
|
| MD5 |
85a4fa5a79b57ae0e16360260dca38ab
|
|
| BLAKE2b-256 |
34e23729e4b205d505348c5b0e6518e96842ab0abe57f3c0d92fc6a9dabc66c1
|
Provenance
The following attestation bundles were made for ingenious-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on Insight-Services-APAC/ingenious
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ingenious-0.1.2-py3-none-any.whl -
Subject digest:
d1fc77c5129945a7d9ef15f07fc48e4e13e1866c69bf5472cff004c93efc859b - Sigstore transparency entry: 266783346
- Sigstore integration time:
-
Permalink:
Insight-Services-APAC/ingenious@85cf0e305435b451fb46d6164a0ed267a442bcd0 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Insight-Services-APAC
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@85cf0e305435b451fb46d6164a0ed267a442bcd0 -
Trigger Event:
workflow_dispatch
-
Statement type: