Skip to main content

A world-class, modular framework for building production-ready AI chatbots.

Project description

Gentiq Backend Framework (Python)

The core Python engine for building high-performance, agentic AI backends.

gentiq-python is a modular, FastAPI-based framework built on top of PydanticAI. It handles all the infrastructure—persistence, security, and streaming—allowing you to focus entirely on defining your agents and tools.


🚀 Key Features

  • GentiqApp Factory: Rapidly initialize a production-ready FastAPI application with just an agent.
  • Deep PydanticAI Integration: Fully supports PydanticAI's type-safe agent system.
  • Dependency Injection: Automatic injection of AgentDeps containing UserStore, ChatStore, and the current User.
  • Atomic Balance Tracking: Integrated per-user token and request balance management with automatic deduction.
  • Pluggable Persistence: Switch between SQLite/MongoDB and FileSystem/MinIO with simple configuration.
  • Advanced Admin Management: Secure API endpoints for user analytics, chat history auditing, and permission-based administration.

📦 Installation

Since Gentiq is typically used as a core framework, you can install it via pip:

pip install gentiq

For monorepo development, it is recommended to install it in editable mode:

# In your app's pyproject.toml
[tool.uv.sources]
gentiq = { path = "../../../packages/gentiq-python", editable = true }

💡 Quick Start

from gentiq import GentiqApp, AgentDeps
from pydantic_ai import Agent

# Define your agent
agent = Agent[AgentDeps[dict]]('openai:gpt-4o')

# Initialize GentiqApp
app = GentiqApp(agent, app_name="MyAI")

# GentiqApp.api is a regular FastAPI instance
# Run with: uvicorn main:app.api --reload

📂 Core Modules

  • gentiq.app: The main application orchestrator (GentiqApp).
  • gentiq.stores: High-level stores for users, chat history, and administration.
  • gentiq.engines: Pluggable persistence backends (SQLite, MongoDB, S3, FileSystem).
  • gentiq.auth: Pluggable JWT-based authentication adapters.
  • gentiq.api.dependencies: Reusable FastAPI dependencies like get_user_store, get_chat_store, and get_current_user.

🛠️ Local Development

To contribute or test the package locally:

  1. Install uv: Ensure you have uv installed.
  2. Sync Dependencies:
    uv sync
    
  3. Run Tests (if applicable):
    uv run pytest
    

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

gentiq-0.7.5.tar.gz (140.9 kB view details)

Uploaded Source

Built Distribution

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

gentiq-0.7.5-py3-none-any.whl (50.0 kB view details)

Uploaded Python 3

File details

Details for the file gentiq-0.7.5.tar.gz.

File metadata

  • Download URL: gentiq-0.7.5.tar.gz
  • Upload date:
  • Size: 140.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for gentiq-0.7.5.tar.gz
Algorithm Hash digest
SHA256 f051aca40fb5d35a85e5cc9be9fd8bc9e34e4c7faa2724cddf11058df218d7f0
MD5 eb810cdc4988a19c9754982b3bfab136
BLAKE2b-256 3820fedc1dd93554f91c7371b30b1e3c31551d4f4a3050781839e8278026f1a4

See more details on using hashes here.

File details

Details for the file gentiq-0.7.5-py3-none-any.whl.

File metadata

  • Download URL: gentiq-0.7.5-py3-none-any.whl
  • Upload date:
  • Size: 50.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for gentiq-0.7.5-py3-none-any.whl
Algorithm Hash digest
SHA256 099b453dc74c031b30d39139dc56a7de062a8bc49e0f469727a94451cce113bf
MD5 6c86d07c99d5c8fdf857400f55da824a
BLAKE2b-256 d0d4a69f3022a66f5b11823087cda0b12c6cc33542dbab54ffdabab97ac2f842

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