IAToolkit

IAToolkit: Building Real Enterprise AI Assistants on Your Own Data

A practical guide for CTOs and developers who want to build real AI assistants connected to corporate data.

Over the last two years, many teams have experimented with “AI chatbots” for their business. Some early prototypes appeared promising during internal reviews, but very few held up once confronted with production expectations—authentication, data accuracy, security controls, and real users with unpredictable questions.

The core lesson from early experiments is clear: LLMs often work beautifully in theory, but fail in real-world scenarios unless they are connected to reliable data, structure, context, and tools. IAToolkit was built precisely to solve that gap.

IAToolkit is an open-source framework designed specifically for that gap. It gives you a complete, production-ready base for building AI assistants that: connect to your corporate databases, run custom tools, query private documents using RAG, and serve multiple companies or business units from a single, clean architecture.

This article is written for technical founders, developers, and CTOs who want to understand what IAToolkit offers, how it’s architected, how multi-tenancy works, and what a small real-world implementation project looks like.


1. The Problem IAToolkit Solves

In simple terms, an AI assistant is like an internal ChatGPT for your company: a private, secure interface where people can ask questions and run tasks in natural language. It plays a role similar to the intranet in the 2000s—a central gateway to internal knowledge and processes.

If you’ve tried to build an internal AI assistant, you’ve probably run into some of these issues:

  • Chatbots disconnected from real data. Many “LLM chatbots” only work with a simple vector store or a few uploaded PDFs and cannot query real business databases.
  • One-off architectures for every POC. Each proof of concept becomes its own fragile stack with duplicated logic.
  • No real workflow integration. Prototypes rarely evolve into assistants that send emails, call APIs, or trigger internal processes.
  • Vendor lock-in. Closed platforms limit customization and transparency.
  • Multi-client deployments are painful. Forking code for each client or department does not scale.

IAToolkit solves these issues by providing a framework built specifically for real-world scenarios: a full web app, multi-tenant architecture, SQL access, RAG, tool calling, logging, extensibility, and a clean Python API.


2. Inside the Architecture: A Framework You Can Trust

IAToolkit is designed with a clear, layered architecture that keeps concerns separated and makes the system easy to maintain, extend, and reason about. Each part of the framework plays a specific role, ensuring that your assistant remains robust as it grows in complexity.

Users
Internal teams · Customers · Agents
IAToolkit Core
Interface & Chat
Intelligence & Services
Connectors & Tools
Company A
company.yaml
data - tools
Company B
company.yaml
data - tools
Company C
company.yaml
data - tools
Data & Systems
SQL · Documents · Business APIs

Figure: Simplified conceptual structure of IAToolkit Core and Company modules.

What the diagram illustrates is more than a visual summary — it represents the architectural contract that keeps IAToolkit predictable as it grows. Rather than mixing prompts, business logic, SQL access, and UI concerns in the same layer (a common issue in early prototypes), the framework establishes a stable separation of responsibilities between the web interface, the intelligence layer, the connectors, and each Company’s domain logic. This structure is what allows developers to onboard new tenants, add tools, introduce new data sources, or upgrade the underlying LLM without destabilizing the rest of the system.

The framework organizes its logic into well-defined layers:

  • Interfaces & Chat manage the conversational experience — how users interact with the assistant and how messages flow between the browser, the server, and the LLM.
  • Intelligence Layer is the core of the framework. It interprets user intent, reads each company’s configuration, orchestrates SQL queries, document retrieval, prompts, and tools, and ensures that responses remain accurate and aligned with each tenant’s business context.
  • Connectors & Tools Layer links the intelligence with real data and operational capabilities. It provides access to SQL databases, internal documents, APIs, and company-specific tools that allow the assistant to execute workflows—not just answer questions.
  • Data Access Layer provides structured and predictable access to internal databases using SQLAlchemy, enabling consistent data retrieval across all companies.

Under the hood, IAToolkit is a cleanly structured Flask application where each component is isolated, testable, and easy to extend. The architecture allows new companies, tools, and workflows to be added simply by updating configuration and domain-specific logic, without changing the core of the system.


3. Building a Multi-Tenant Assistant

One of the most powerful ideas in IAToolkit is the concept of a Company. A Company is a self-contained module that defines everything the AI needs to operate within a single business domain or client: data sources, prompts, tools, documents, branding, and context.

3.1 The Company Module: A Clean Boundary per Tenant

In IAToolkit, a Company represents a fully isolated tenant inside the shared Core. It is not just a folder, but a complete definition of how an assistant should behave for a specific business unit or client: which data it can access, which tools it can execute, how it describes its domain, and how it presents itself to users.

This separation gives each tenant its own identity and capabilities while keeping the Core untouched. In practice, this means you can host multiple assistants—each with its own workflows, prompts, branding, and APIs—without duplicating code or spinning up multiple deployments. Agencies can manage multiple clients. Large companies can support multiple departments. Developers can keep their logic clean and testable.

3.2 The Dispatcher: Connecting the LLM to Your Custom Python Logic

In a multi-tenant system, the key architectural challenge is routing: when a user sends a message or an LLM triggers a tool, the framework must decide which Company should respond. The Dispatcher is the component that solves this problem. It sits at the center of the system, acting as the execution hub that connects the LLM to each Company’s configuration and Python logic.

While company.yaml defines what tools exist, the Dispatcher is the component that makes them actually work. It acts as a bridge between the LLM and each Company’s custom Python code.

When the LLM decides to call a tool (for example: get_customer_summary or generate_invoice), the Dispatcher:

  • Detects which Company the user belongs to
  • Loads that Company’s Python class (e.g. AcmeCompany)
  • Maps the LLM tool call to a Python method inside that Company
  • Validates inputs, executes the method, and returns structured output to the LLM

The diagram below shows how the Dispatcher connects the LLM tool calls to the correct Company, loading its configuration, context, and Python code to execute company-specific behaviors.

Dispatcher
Company A
Config & schema
Company B
Docs & tools

This separation is what allows IAToolkit to scale cleanly. The Core never contains client-specific logic; all of it lives inside each Company. The Dispatcher ensures that every request is routed to the correct environment, enabling large deployments where dozens or hundreds of tenants share the same Core while remaining fully isolated.

This design gives each Company full power to implement its own logic:

“Every Company gets its own business logic, its own functions, its own workflow automation — all without touching the core framework.”

For agencies, this means each client can have custom behaviors. For enterprises, each business unit can integrate with its own APIs and processes. For developers, it creates a clean and safe extension point that avoids code duplication.

3.3 company.yaml: Declarative Control Over Each Assistant

At the heart of each Company lies a single file: company.yaml. This file is essentially the “brain” of each Company. Among other things, it defines:

  • Identity: company ID, display name, default locale.
  • LLM configuration: which model to use and which environment variable stores its API key.
  • Data sources: SQL databases, connection strings (via env vars), table inclusion/exclusion rules, and natural-language descriptions.
  • Knowledge base options: document connectors (local, S3) and logical document sources for RAG.
  • Tools: the functions the LLM can call, with OpenAPI-style schemas for parameters.
  • Prompts & categories: pre-configured prompts with descriptions and custom fields for the UI.
  • Branding: header colors, primary and secondary brand colors, and visual tweaks.
  • Embedding provider: model and key for semantic search.

Instead of hard-coding any of this in Python, you configure it declaratively. That makes it much easier to spin up a new tenant, tweak a single client’s branding, or point a new assistant to a different database without modifying core code.

3.4 Company Resources: Context, Schema, Prompts, Tools

Each Company has several dedicated directories:

  • context/: Markdown files with static knowledge – business rules, procedures, FAQs, company overview. These become part of the system context for that assistant.
  • schema/: YAML descriptions of each table or entity in your business database. They document column names, types, relationships, and natural-language explanations, helping the LLM generate high-quality SQL.
  • prompts/: Jinja2 prompt templates for predefined complex questions, such as sales analysis, supplier reports, or risk summaries. The UI can expose these as one-click prompts.
  • your_company.py: A Python class that extends a base Company class and can register custom tools or company-specific logic.

The result is a powerful multi-tenant pattern: the core IAToolkit framework is shared, but each Company folder encapsulates a complete AI assistant tailored to a specific domain or client. Adding a new client becomes a matter of copying a template Company, editing some YAML files, and implementing whatever custom tools are needed.

3.5 IAToolkit Licensing Model

IAToolkit follows an open-core model. The Community Edition (MIT) provides one Company and includes the entire Core: Intelligence Layer, interfaces, SQL orchestration, basic RAG, Connectors, and Python tool execution.

The Enterprise Edition unlocks the features that matter for multi-tenant and production deployments: unlimited Companies, advanced retrieval logic, governance, auditing, external connectors, and SSO. The Core remains fully transparent and open source; enterprise capabilities are activated only when a valid license key is present.


4. From Idea to Production: A Mini Implementation Project

A realistic IAToolkit implementation for a single business unit or client usually unfolds as a structured mini-project. Based on real deployments, a full cycle of analysis, setup, configuration, tooling, testing, and rollout takes approximately three months.

4.1 What You Need

  • One Python developer familiar with SQL and APIs
  • One domain expert who understands key business questions
  • Access to a SQL database (ideally a read-only replica)
  • A small set of internal documents for RAG
  • A cloud environment for hosting (Python + PostgreSQL + Redis)

4.2 Project Phases

The mini-project advances through four clear phases:

  • Phase 1 — Setup, Exploration, and Company Creation
    Running IAToolkit locally, understanding the sample Company. Defining the Company’s identity, configuring company.yaml, connecting SQL databases, applying basic branding, and enabling authentication.
  • Phase 2 — Modeling Knowledge and Data
    Creating schema YAML files, writing context documents, aligning terminology with domain experts, and iterating until SQL and RAG answers become consistent and useful.
  • Phase 3 — Tools, Workflows, and Documents
    Adding Python tools the LLM can call, integrating APIs, loading documents into the vector store, and building structured prompts for recurrent analyses.
  • Phase 4 — Pilot and Production Rollout
    Deploying a pilot version to real users, collecting feedback, refining prompts and schemas, and finally deploying the production assistant with monitoring and logs.

Closing Thoughts

If your goal is to move beyond demos and into robust, secure, extensible systems, IAToolkit gives you a strong and transparent foundation. Its multi-tenant design, declarative configuration, and extensible Python tools make it ideal for organizations taking their first serious steps into AI.

Because IAToolkit is fully open source, anyone can explore it, test it, adapt it, and deploy it freely. The easiest way to understand its power is to use it in a focused mini-project: a three-month initiative where your team gains hands-on experience with prompts, SQL modeling, document integration, and custom tools in a real, high-learning environment.

Whether you're a CTO evaluating platforms or a developer curious about enterprise AI patterns, IAToolkit is an accessible, transparent, and practical place to start. You're invited to download it, clone the repo, and experiment with your own data.