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.6b1.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.6b1-py3-none-any.whl (50.1 kB view details)

Uploaded Python 3

File details

Details for the file gentiq-0.7.6b1.tar.gz.

File metadata

  • Download URL: gentiq-0.7.6b1.tar.gz
  • Upload date:
  • Size: 140.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.4 {"installer":{"name":"uv","version":"0.11.4","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.6b1.tar.gz
Algorithm Hash digest
SHA256 8ae4a36371fc0b1d21a9de7921731c063b5e74e2a6b5fae2ea8e5ee34aac28bc
MD5 c1ac052cf0ea4f3f1033dcecad3aeaac
BLAKE2b-256 b64608745609e8cae259dc8c3d7b43c91e4b70b4552ee9e821ae9a4f772831cc

See more details on using hashes here.

File details

Details for the file gentiq-0.7.6b1-py3-none-any.whl.

File metadata

  • Download URL: gentiq-0.7.6b1-py3-none-any.whl
  • Upload date:
  • Size: 50.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.4 {"installer":{"name":"uv","version":"0.11.4","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.6b1-py3-none-any.whl
Algorithm Hash digest
SHA256 d3da134450cf5f1ca3364e9574ef97dc2e65525856049de8b8853e6ebf1ada3f
MD5 fbf95b244adfbaafaa13ea60925551be
BLAKE2b-256 fb779de32c7b647a3765d86734a3eec887076a05b8390d86eb865d44588e221e

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