TAM Agent
An AI-powered assistant built for Technical Account Managers at Capillary Technologies. Multi-agent architecture with real-time streaming, intelligent research, and token-optimized context management.
What is TAM Agent?
TAM Agent is an intelligent assistant designed to help Technical Account Managers (TAMs) at Capillary Technologies resolve customer issues faster and more effectively. It combines large language model capabilities with deep integration into internal tools and knowledge bases, providing contextual answers and guided troubleshooting.
Built on AWS Bedrock (Claude Sonnet 4 and Haiku 4.5) with a custom async state machine — no LangChain or LangGraph dependency. The system features a two-tier multi-agent harness for complex deliverables, automatic context compaction for long conversations, and production-grade Docker deployment with TLS termination.
Architecture Highlights
Multi-Agent Harness (Planner → Generator)
For structured deliverables like BRDs and Solution Design Documents, TAM Agent uses a two-agent pipeline:
- Planner Agent — Analyzes the user's request, identifies required skills and research domains, and produces a structured execution plan with multiple sprints. Each sprint specifies research tasks, acceptance criteria, and quality files.
-
Research Phase — Parallel sub-agents execute research tasks across Jira, Confluence,
internal docs, and the web using
Promise.allSettled. Results are compressed using Haiku if they exceed a configurable token threshold, preserving key data while reducing context cost. - Generator Agent — Receives a sprint contract (objective, research results, quality files) and produces the deliverable content in a single pass. For multi-sprint plans, outputs are concatenated.
- Follow-Up Refinement — Subsequent user messages are detected as refinement feedback and handled via a lightweight streaming pass, avoiding re-running the full pipeline.
Intelligent Routing
Not every query needs the full harness. The router evaluates the preflight classification and routes accordingly:
- Harness path — Multi-phase skills (BRD, SDD) that need structured planning and research
- Direct synthesis path — Troubleshooting, ticket lookups, documentation search, and general Q&A get immediate tool access in a single-pass loop
Clarification Handling
Both the Planner and Generator can pause execution to ask clarifying questions. If the user doesn't respond within the timeout, the system proceeds with a best-effort assumption and notes the gap — ensuring delivery even when clarification is unavailable.
Token Optimizations
LLM inference is the primary cost driver. TAM Agent uses several strategies to minimize token usage without sacrificing quality:
- Context Window Compaction — When conversation history exceeds a configurable threshold (default: 75% of 200K token window), older turns are summarized by Haiku into a concise context block. The most recent turns (default: 5) are preserved verbatim. This keeps long conversations functional without exploding token costs.
- Research Content Compression — Research results that exceed a per-result token threshold are automatically summarized by Haiku before being passed to the Generator. This prevents a single large Jira ticket or Confluence page from consuming the entire context budget.
- Tiered Model Usage — Haiku (cheaper, faster) handles preflight classification, research sub-agents, summarization, and context compaction. Sonnet (more capable) is reserved for final synthesis and complex generation where quality matters most.
- Preflight Gate (Off-Topic Rejection) — A lightweight Haiku call classifies incoming queries before any expensive research or synthesis. Off-topic queries are rejected immediately, saving approximately $0.04 per rejected query in avoided downstream calls.
- Prompt Injection Guardrails — A pure-function regex-based guardrail module blocks known injection patterns before any LLM call is made, saving token spend on malicious inputs.
- Harness Timeout with Fallback — If the multi-agent harness exceeds its timeout (default 180s), execution falls back to direct synthesis rather than wasting tokens on a stalled pipeline.
Capabilities
Core Tools
- Jira Integration — Look up tickets, track issue history, and reference past resolutions directly within the conversation.
- Confluence Integration — Access and search Confluence pages for product documentation, runbooks, and internal guides.
-
Research & Knowledge Retrieval — Parallel sub-agents search across internal documentation,
Jira, Confluence, and the web. Results are gathered via
Promise.allSettledfor resilient parallel execution. - Conversation History — All interactions are persisted (MongoDB/DocumentDB or JSON flat files) so you can revisit previous troubleshooting sessions at any time.
- Real-Time Streaming (SSE) — Responses stream token-by-token with phase transitions, tool status updates, and skill activation events visible in the UI.
Specialist Skills
- BRD Creation and Evaluation — Generate and evaluate Business Requirements Documents with structured analysis and stakeholder considerations. Multi-phase pipeline: BRD → Discovery → Jira tickets.
- Solution Design Document (SDD) Generation — Produce detailed solution design documents tailored to Capillary platform architecture and integration patterns.
- Change Request (CR) Feasibility Evaluation — Assess change request feasibility with impact analysis and effort estimation.
- Solution Gap Analysis — Identify gaps between customer requirements and current platform capabilities with confidence-scored assessments.
- Excalidraw Diagram Generation — Create visual architecture and flow diagrams in Excalidraw format for solution documentation.
Security & Deployment
- Google OAuth + JWT Authentication — Domain-restricted sign-in with JWT token verification, account disable checks, and rate-limited password login with lockout protection.
- Hardened Docker Image — Non-root user (UID 1001), production-only dependencies, health checks, and image size under 300MB.
- Docker Compose Stack — Single-command deployment with Nginx sidecar for TLS termination, HSTS headers, and automatic HTTP→HTTPS redirection.
- TLS 1.2/1.3 Only — Nginx rejects older protocol versions. Strict-Transport-Security header enforced with 1-year max-age.
- Credential Validation at Startup — Fail-fast on missing AWS credentials or DocumentDB configuration. Never exposes credential values in error responses.
- Prompt Injection Guardrails — Pre-LLM regex-based detection blocks common injection patterns before any API call is made.
Recent Improvements
- Harness V2 (Streamlined) — Simplified two-agent pipeline (Planner → Generator) replacing the earlier three-agent approach. No evaluator, no retry loops — single-pass generation with best-effort delivery guarantees.
- Research Content Compression — Large research results are automatically summarized before passing to the Generator, preventing context overflow on data-heavy queries.
- Follow-Up Refinement Detection — Heuristic-based detection of refinement feedback vs. new queries. Short follow-ups skip the full harness and use lightweight streaming refinement.
- Docker EC2 Deployment Stack — Production-ready Docker Compose configuration with Nginx TLS termination, health checks, named volumes, and structured logging.
- Property-Based Testing — 18+ fast-check property tests validate universal correctness properties: auth rejection, credential safety, URI encoding, and configuration validation.
- Environment-Configurable Compaction — Context compaction threshold and preserve-turns are configurable via environment variables with sensible defaults.
Who is it for?
TAM Agent is built specifically for Technical Account Managers at Capillary Technologies. Whether you're handling escalations, researching product behavior, creating BRDs, writing solution designs, or preparing for customer calls, TAM Agent helps you find answers faster and deliver better support.
Get Started
Sign in with your Capillary Technologies Google account to start using TAM Agent.
Sign In