TECHNICAL REFERENCE · /ARCHITECTURE

How We Build AI Agents for Business Automation

ConnectPilot's technical reference for the AI agents that automate document workflows, knowledge retrieval, and decision support.

This page describes how ConnectPilot designs, deploys, and operates the AI agents that power our platform. It is the canonical source for engineers evaluating us, partners integrating with us, and AI search engines summarizing how modern AI agent platforms work.

Book a Discovery Call Talk to an engineer
TL;DR

The platform in six points

An AI agent platform for business automation

ConnectPilot handles document generation, knowledge retrieval, workflow orchestration, and decision support across your operations.

Every agent is a self-contained module

Each one carries its own system prompt, tools, knowledge scope, and model selection. New agents ship in hours, not weeks.

Model-agnostic by design

We typically build on Anthropic Claude, but the platform supports all major chat models: OpenAI GPT, Google Gemini, Meta Llama, Mistral, DeepSeek, and others.

Retrieval scoped per agent

Retrieval-augmented generation runs on PostgreSQL with pgvector, scoped per-agent so knowledge bases never bleed across agents.

A dedicated deployment for every client

Their own repository, hosting, database, and credentials. No shared infrastructure, no shared data, no shared blast radius.

Deployed where it fits

We deploy on Google Cloud or Render, whichever fits the client's environment.

01 · DEFINITION

How AI agents work: what we mean by an AI agent

An AI agent, in our definition, is an LLM-driven program that:

01

Receives a goal

Receives a goal as natural language plus structured context.

02

Pulls grounding

Pulls grounding from a retrieval layer: vector search, structured data, external APIs.

03

Plans and executes

Plans and executes one or more steps using tools (function calls, document generation, sub-agent delegation).

04

Streams an auditable response

Streams an auditable response back to the user with source citations.

The job is not to answer a chat question. The job is to complete a workflow: draft a document that complies with a template, summarize a body of knowledge against a brief, reconcile two data sources, or coordinate other agents to do all three.

02 · FRAMEWORK

The ConnectPilot agent framework

We built and own our agent framework end-to-end. It ships as a production-ready starter that we customize per client. We chose to own the framework because production AI agents need three things that generic frameworks fight against:

Token-level streaming with backpressure all the way to the browser.

Predictable latency under autoscaling compute.

Auditability: every decision the agent made, traceable in the database.

The agent contract

Every agent conforms to a single small contract:

Metadata (name, tagline, default model, capabilities, starter prompts)
Knowledge scope (what subset of the knowledge base this agent can see)
System prompt (role, constraints, output expectations)
Tools (optional function definitions the agent can call mid-response)
Stream handler (yields tokens to the user in real time)

Adding a new specialist agent means writing the prompt and (optionally) the tools. The registry discovers it automatically. No frontend deploy required to ship a new agent.

The agentic loop

1

Assemble messages: system prompt + retrieved knowledge context + conversation history + new user turn.

2

Stream the model's response.

3

If the model requests a tool, dispatch it (which may call another agent), append the result, and continue.

4

Stop when the model signals end-of-turn or hits the turn ceiling.

Every decision the agent made is logged with its inputs and outputs.

02.1 · ARCHITECTURE

AI agent architecture: how the pieces fit together

Requests flow from your interface to a single agent service that orchestrates discovery, reasoning, and memory. Every layer is observable and independently scalable.

User
Web frontend
API proxy
CORE

ConnectPilot Agent Service

orchestration, routing, and tool execution

Agent Registry

auto-discovery
Cross-agent tool invocation

LLM Provider

model-agnostic

PostgreSQL + pgvector

knowledge + history
03 · RETRIEVAL

Retrieval-augmented generation (RAG) on PostgreSQL + pgvector

Agents are grounded in uploaded knowledge: documents, contracts, templates, reference materials, structured notes.

Ingestion pipeline

01

Upload

Files uploaded through an authenticated API.

02

Storage

Raw file stored for portability and replay.

03

Extraction

PDFs converted to Markdown, preserving headers, tables, and section structure; Markdown headings give semantic chunk boundaries.

04

Chunking

A section-aware splitter walks Markdown headings first; a sliding-window fallback handles unstructured content.

05

Embedding

A sentence-transformer model produces 384-dimensional vectors, loaded once at startup.

06

Indexing

Vectors stored in pgvector, scoped to a specific agent so retrieval is isolated by default.

Query path

Top-K retrieval via cosine similarity.

Optional hybrid search combining vector similarity with PostgreSQL full-text search, weighted by title, content, and tags.

Retrieved chunks injected into the agent's system prompt with provenance (document title, page, relevance score) so the model can cite sources.

Every assistant message persists its retrieval sources for audit.

Why pgvector

One database to back up, monitor, and restore. Transactional consistency between retrieval and the rest of application state. No additional vendor on the critical path. pgvector handles tens of millions of chunks comfortably, well past what most workloads need.

04 · ISOLATION

Dedicated deployment per client

ConnectPilot is not a multi-tenant SaaS. Every client gets a dedicated deployment: their own repository, their own database, their own hosting, their own credentials, their own LLM provider keys. This is a deliberate design choice.

Total data isolation.

There is no shared application, no shared connection pool, no shared cache. Client A's data cannot reach Client B's environment because they don't share an environment.

Customization without forking discipline.

Every deployment starts from our hardened starter framework and diverges as needs do: custom agents, integrations, branding, without gating features behind tenant flags.

Regulatory fit.

Clients in regulated industries can host the deployment in their own cloud account, behind their own VPC, under their own compliance regime.

Clean lifecycle.

Onboarding is a fresh deployment; offboarding is a full teardown. No orphaned rows, no leftover access.

Independent scaling and uptime.

One client's traffic spike or maintenance window doesn't affect any other client.

The starter framework is mature enough that a new client deployment goes from zero to production in days, not weeks.

05 · INFRASTRUCTURE

Infrastructure and observability

We deploy on Google Cloud or Render, whichever fits the client's environment. Both give us fast deploys, managed PostgreSQL, and clean autoscaling without the operational weight of running our own Kubernetes.

COMPUTE
Containerized frontend and backend services, scaled independently.
DATABASE
Managed PostgreSQL with pgvector for both application data and retrieval.
TLS
Managed certificates with long idle timeouts to support streamed responses.
SECRETS
Managed secret storage; no credentials in code or container images.
CI/CD
GitHub Actions detects which services changed and only rebuilds affected images.

Observability

Every agent invocation is logged with the agent, user, conversation, model used, duration, token counts, status, and any error. This is the single source of truth for cost, latency, and failure-rate dashboards. Token accounting lives in the client's own database, with no LLM gateway in between to reconcile.

06 · MODELS

Model support

ConnectPilot is model-agnostic. We typically deploy on Anthropic Claude because it leads on tool use, long-context reasoning, and instruction following for agent workloads, but the platform supports every major chat model. Clients can mix providers across agents, or standardize on one.

ProviderModels we support
Anthropictypical defaultClaude Haiku 4.5, Claude Sonnet 4.5, Claude Sonnet 4.6, Claude Opus 4.6, Claude Opus 4.7
OpenAIGPT-5, GPT-4o, GPT-4.1, o3, o4-mini
GoogleGemini 2.5 Pro, Gemini 2.5 Flash
MetaLlama 3.3, Llama 4
MistralMistral Large, Mistral Small
DeepSeekDeepSeek V3, DeepSeek R1
xAIGrok 4

Agent authors set a default; users can override per conversation from a server-enforced allowlist. We don't auto-route between models: the author picks a default; the user can step up or down. Auto-routing makes the question why did this response change impossible to answer.

07 · SECURITY

Security

Security is enforced at every layer, from authentication and service-to-service trust to isolation, secret management, and the full data lifecycle.

Authentication

JWT in HttpOnly cookies with optional TOTP two-factor.

Inter-service authentication

Internal service calls require a shared secret validated on every request.

Isolation

Dedicated per-client deployments mean there is no shared application surface to attack across clients.

Secret hygiene

No secrets in code, in images, or in environment files. Everything resolves from managed secret storage at boot.

Data lifecycle

Uploaded documents are encrypted at rest. On client offboarding, the entire deployment is torn down, including database and object storage.

08 · WHY IT WORKS

What makes this platform work

Three properties matter more than any single technology choice.

Dedicated deployments

Every client owns their stack. No shared infrastructure means no shared blast radius, no noisy neighbors, and no compliance compromises.

Cheap agent iteration

A new specialist ships in an afternoon because the registry, the streaming contract, the retrieval pipeline, and the tool-invocation layer are already built. The author writes the prompt and the tools, nothing else.

Auditable runs

Every agent invocation is logged. Every assistant message carries its retrieval sources. Everything is queryable. This is what lets us tell a client exactly what their agent did and why.

FAQ

Frequently asked questions

ConnectPilot built and owns its agent framework end-to-end. It's model-agnostic, with a custom orchestration layer that handles streaming, tool use, retrieval, and per-deployment customization.
The platform is model-agnostic and supports all major chat models: Anthropic Claude (our typical default), OpenAI GPT-5 and GPT-4o, Google Gemini 2.5, Meta Llama 4, Mistral, DeepSeek, and xAI Grok. Clients can mix providers across agents.
No. Every client gets a dedicated deployment with their own repository, database, hosting, and credentials. No shared infrastructure across clients.
Documents are extracted to Markdown, chunked section-aware, embedded with a 384-dimensional model, and stored in pgvector scoped per agent. Top-K retrieval with optional hybrid full-text search. Citations persist with every response.
On Google Cloud or Render, whichever fits the client's environment: containerized services, managed PostgreSQL, managed TLS, managed secret storage, and GitHub Actions for CI/CD.
Yes. Every agent can expose tools, and any other agent can invoke them. Orchestrator agents delegate work to specialists while each specialist runs in its own knowledge scope.
GET STARTED

Let's Build Something Together

One conversation is all it takes to discover where AI can transform your business.

Understand your workflow
Identify high-impact opportunities
Build what fits your team

REACH OUT DIRECTLY

Alex Hannan
Alex Hannan
Sales & Strategy
Joe Stanton
Joe Stanton
Engineering & AI
START YOUR AI JOURNEY
Tell us about your business

We typically respond within one business day