PT Agents – Agentic AI Architecture

PT Agents intelligence platform based on DeepAgents for long horizon autonomous tasks

PT Helper Slack Agent
v2.0
Interactive Slack bot for internal team queries.
Auth: Slack OAuth 2.0
Web UI Chatbot
v2.0
React-based web interface for internal team support.
Auth: Supabase Auth
Website CopilotKit Widget
v1.0
Automated customer support and sales widget.
Auth: Order Number + Name
Internal Gate Agent
Lightweight supervisor — routes queries to specialized sub-agents
google/gemini-3-pro-preview
LangGraph LangChain DeepAgents
Knowledge Base Search
Pinecone Namespaces:
documents emails website messages calls
RAG
PostgreSQL Checkpointer
PostgreSQL-backed state persistence for conversation continuity.
db: timber_agents · pool: 1-20 connections · async
Order Analyst
Deals · Revenue · RDM · Delivery
162 evals
Analytics on deals, revenue, RDM cases, products, geography, delivery, and payment status. Queries HubSpot pipeline for insights and trends.
Tools
deals_query deals_summary product_analytics rdm_query rdm_dispatch rdm_association stage_groups delivery_analytics payment_status geographic fallback_query
Customer Lookup
Profiles · Deals · Files · RDM
39 evals
Retrieves customer profiles from HubSpot by name, phone, email, or order reference. Provides deal history, RDM cases, and order files.
Tools
customer_search order_files
Gmail Reader
Search · Threads · Mailboxes
81 evals
Read-only access to Gmail mailboxes. Search emails using Gmail query syntax, read threads, and access pipeline-labeled emails across multiple accounts.
Tools
email_search email_thread list_mailboxes
Monday Boards
Boards · Items · Search · Details
82 evals
Query Monday.com boards and items. List boards, get schemas, search by order/phone/email, filter by status/group, and retrieve full item details.
Tools
list_boards board_schema query_items search_items item_details
File Analyzer
Images · PDFs · Vision · Council
38 evals
Analyzes images and documents. Quick Gemini Flash analysis for images, deep GPT-5.2 for PDFs/documents, and council mode for cross-validation.
Tools
quick_analyze deep_analyze council_analyze resolve_files
Call Explorer
Calls · Transcripts · Analytics
128 evals
Queries call data from Athena. Search calls, analytics, transcripts, agent performance rankings, client history, and performance trends.
Tools
call_search call_analytics agent_rankings agent_deep_dive client_history call_transcript trends table_schema
Shared middleware layer applied to all 6 sub-agents
S3 Offload Middleware
Offloads large tool outputs (>5k tokens) to S3 with presigned URLs. Uses tiktoken for accurate token counting.
threshold: 5000 tokens · format: head+tail preview
Tool Call Limit
Prevents infinite loops by limiting tool calls per conversation and per turn.
thread: 30 calls · run: 10 calls · behavior: continue
Tool Retry Middleware
Automatic retries for transient API failures with exponential backoff.
retries: 3 · backoff: 2.0x · initial: 1s
Todo List Middleware
Helps agents track progress on complex multi-step tasks with persistent state.
task tracking · progress monitoring · step management
Summarization Middleware
Automatically summarizes conversation history when context grows too large.
trigger: 50k tokens · keep: 20 messages · model: flash
Model Retry Middleware
Retries transient LLM API failures (429s, 503s, timeouts) before fallback.
retries: 3 · backoff: 2.0x · behavior: continue
Model Fallback Middleware
Multi-provider redundancy with automatic fallback to alternative LLMs.
primary → grok-4.1-fast → gpt-4o-mini
Usage Tracking Middleware
Fire-and-forget recording of tool calls, duration, and success. Manages trace and invocation lifecycle. Sub-agents run in tools_only mode, reading parent context via thread_id registry.
db: timber_agents · estimated_time_saved · thread_id registry
Backend services supporting agent operations
Slack Agent
:8505
Gmail Gateway
:8507
HubSpot Service
:8509
AWS Gateway
:8510
KB Gateway
:8511
PostgreSQL
:5432
Monday Service
:8513
URL Shortener
:8503
Gmail Pipeline
:8508
Athena (4COM)
AWS
PostgreSQL
:5432
Pinecone
Vector store
RedPanda
Kafka streaming
AWS S3 + Athena
File storage · SQL
OTEL Collector
Traces · Metrics · Logs
LangSmith
LLM trace monitoring
BetterStack
Log aggregation
Ofelia
Cron scheduler
n8n Workflows
Runs 10 workflows & jobs
AWS EC2
t3.xlarge · 16GB · 4 vCPU
AWS RDS PostgreSQL
Managed · auto-backup · Multi-AZ
Docker Compose
17 containers · rolling restart
Nginx + SSL
Reverse proxy · Let's Encrypt
GitHub Actions
CI/CD · auto-deploy on push
Evaluation Framework
YAML-driven · parallel execution
61 test suites SQLite results regression detection
Quick Evals
LangGraph SDK · direct API testing
97 gate tests 10 categories 96.9% pass
LangSmith Tracing
Per-agent projects · cost analysis
611 Total Evaluations
Across 6 sub-agents + gate
HubSpot CRM
CRM · Deals · Contacts
Google Gmail
OAuth · Watch API
Monday.com
GraphQL API · Boards
4COM Athena
Call recordings · Analytics
OpenAI
GPT-4o · Embeddings
OpenRouter
Multi-model routing
AWS S3 + Athena
Storage · SQL queries
Intercom
Website conversations
WooCommerce
Product catalog · Pricing
611
total evals
6
sub-agents
36
tools
10
microservices
9
subdomains