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
GentiqAppFactory: 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
AgentDepscontainingUserStore,ChatStore, and the currentUser. - 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 likeget_user_store,get_chat_store, andget_current_user.
🛠️ Local Development
To contribute or test the package locally:
- Install uv: Ensure you have
uvinstalled. - Sync Dependencies:
uv sync - Run Tests (if applicable):
uv run pytest
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f051aca40fb5d35a85e5cc9be9fd8bc9e34e4c7faa2724cddf11058df218d7f0
|
|
| MD5 |
eb810cdc4988a19c9754982b3bfab136
|
|
| BLAKE2b-256 |
3820fedc1dd93554f91c7371b30b1e3c31551d4f4a3050781839e8278026f1a4
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
099b453dc74c031b30d39139dc56a7de062a8bc49e0f469727a94451cce113bf
|
|
| MD5 |
6c86d07c99d5c8fdf857400f55da824a
|
|
| BLAKE2b-256 |
d0d4a69f3022a66f5b11823087cda0b12c6cc33542dbab54ffdabab97ac2f842
|