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

Uploaded Python 3

File details

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

File metadata

  • Download URL: gentiq-0.7.6.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.6.tar.gz
Algorithm Hash digest
SHA256 e0281bbda116e3ad1f8fd8ff5b4f7b54c5011c322d0e9fef1f7c239156a1b8f6
MD5 7957326f60df2dedbd68ed9d45503c49
BLAKE2b-256 8fce5fce0cbccf85856967508077bbcff73ce0768ee2a7493ee30f11a472ccb5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gentiq-0.7.6-py3-none-any.whl
  • Upload date:
  • Size: 50.0 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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 2e14d9d289e5a59ed815f8708393128f116867a669b2dc744eb22e060c26db71
MD5 f127944d5d0e25caecc32713f7a2e1d6
BLAKE2b-256 3fb8d9161b4054a8f36ae9061ab31ca2c0e83b3bf68a15a07a22e2bc1b7a12b0

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