Background: Fragmentation of Knowledge within the Compliance Dashboard
Taxbit is a digital asset tax and accounting compliance platform established in 2018, supporting corporate clients such as exchanges, payment processors, and brokers in performing profit and loss calculations, collecting tax documents, and processing information reporting in bulk. Although an AI assistant called Taxbit Assist was embedded within the product dashboard, the knowledge supporting it was scattered across public websites, API documentation, and help center articles, with "a significant portion not even documented." When customers asked, "What does this form status mean?" they had no choice but to search for it themselves or open a support ticket. Internal production analysis revealed that over 55% of users who asked questions to Assist re-asked within 24 hours, validating its practical utility.
Design Constraints: Four Reasons It Could Not Be a General Chatbot
An assistant operating in the regulatory industry had to satisfy the following four constraints at the architectural level.
| Constraint | Description | Implementation Points |
|---|---|---|
| Grounding and Citation | All answers must trace back to sources accessible to the user, and when unknown, it must respond that it does not know | Knowledge Base search + server-side re-ranking + source link streaming |
| Role and Organization Awareness | It must guide supported users to admin-only workflows without sending them to inaccessible pages | Two built-in access check tools for organizational qualifications and dashboard roles |
| Prohibition of Tax Advice | Explaining cost basis calculation methods is product documentation, but recommending which method to choose constitutes tax advice | Explicit boundaries in system prompts, model blocks advisory utterances |
| Regional Data Residency | Multi-region support with a single codebase, continuous measurement of production quality | Cross-region inference profiles + BYOK encryption |
"A general chatbot was not an option in this domain. The four constraints shaped what we created." — Taxbit Engineering Team
Taxbit holds ISO/IEC 42001 (AI Management System), ISO/IEC 27001, ISO/IEC 27701, and SOC 2 Type II certifications, and does not use Bedrock for prompt or completion learning without fine-tuning the model.
Architecture: Strands Agents SDK Application on AgentCore Runtime
Taxbit Assist operates as a Strands Agents SDK Python application on top of the managed agent runtime of Amazon Bedrock AgentCore. When pushed as an ARM64 container image to Amazon ECR, AgentCore scales on demand. The team chose AgentCore for three reasons.
- Elimination of infrastructure operations with managed agent runtime
- Built-in AgentCore Memory (conversation state storage) eliminates the need for a separate session store
- Automatic separation of user context through session-level isolation
- dashboard question
- guardrail screening
- knowledge base search and re-ranking
- model inference and permission verification
- response streaming
Request Processing Flow
1. User asks a question on the dashboard → Streaming chat API passes it to AgentCore runtime with validated identity (email, organization ID, dashboard role) 2. Amazon Bedrock Guardrails performs input screening → PII masking in place processing, skipping model call if blocked 3. Candidate paragraphs are searched from Amazon Bedrock Knowledge Bases (fully managed RAG, backend Amazon S3 Vectors) → server-side re-ranking 4. Bedrock model infers over the searched paragraphs → recommends workflows after verifying user capabilities and role access 5. Response streaming returns with source links included → AgentCore Memory maintains conversation history 6. All requests emit OpenTelemetry traces to Amazon CloudWatch → supplies evaluation tooling
Agent Configuration: System Prompt + Model + 8 Tools
The agent intentionally has a narrow set of tools.
- Knowledge Base Search (primary tool)
- Two Access Checks: organizational qualification verification, user dashboard role verification
- Four Support Ticket Tools: create, view, modify, close own tickets
- Current Time (if sub-day precision is needed)
Core Security Decision: The model never handles identity. Email, organization ID, and role are provided by trusted calling services, and are bound to each tool as closures before being exposed to the model. The model only decides whether to "check permissions" but cannot manipulate parameters to decide "whose permissions to check." User input is sanitized at the boundary, preventing prompt injection from mimicking trusted context lines.
Search Quality: The Reason for Curated Knowledge Base
Most engineering efforts were invested in building the Amazon Bedrock Knowledge Base (backend Amazon S3 Vectors, embedding Cohere Embed English v3). Product documentation, API references, help center articles, and internal know-how were integrated and refined into a single reliable source. Searched paragraphs are re-ranked server-side, with only the top results entering the model context, and answers are streamed with original links. This has secured a level of traceability suitable for distribution to regulatory clients.
Data Residency, Cost, and Latency: Three Key Devices for Production Operations
Geolocation-Aware Inference and BYOK
- Cross-region inference profiles are assigned geographic prefixes → EU deployments enforce inference within the EU, US deployments enforce inference within the US
- In BYOK (Bring Your Own Key) accounts, conversation history and client data stores are encrypted with customer-owned AWS KMS keys
Cost Visibility: Application Inference Profiles
Each deployment wraps the system inference profile with a tagged application profile, attaching cost allocation tags to all model calls, which can be broken down by workload in AWS Cost Explorer.
Prompt Caching to Reduce Latency and Token Costs
The system prompt is byte-for-byte identical across all requests and ends with a cache checkpoint, allowing static prefixes to be cached among users. Only context specific to each request is sent in the user message.
Continuous Quality Measurement: Closing the Evaluation Loop on Production Traffic
All requests emit OpenTelemetry traces that flow through CloudWatch to the evaluation pipeline. This allows for continuous measurement of response quality, grounding accuracy, and permission verification success rate from actual user traffic, enabling immediate detection of regressions. This is the background for how a small team could focus on the three core tasks of search, safety, and evaluation without the burden of infrastructure operations.
So What: Lessons for Developers, Planners, and Business Leaders
- Developers: The pattern of separating identity from model parameters and binding it as closures is a powerful security primitive that fundamentally blocks prompt injection and privilege escalation attacks. By assembling managed building blocks like AgentCore Memory, Guardrails, Knowledge Bases, and S3 Vectors, enterprise-grade RAG agents can be deployed within days without infrastructure code.
- Planners: The impressive aspect is the redundancy of domain rules like "answering I don't know when unknown" and "prohibition of tax advice" applied across three layers: system prompts, tool schemas, and guardrails, ensuring defense in depth. Integrating functionality-specific permission check tools into the agent enforced compliance naturally within the UX flow.
- Business Leaders: A 55% revisit rate suggests that embedded AI within regulatory workflows operates as a task completion tool beyond simple chatbots. Supporting multi-region, BYOK, and cost tagging with a single codebase can shorten global enterprise sales cycles by months. The stack of ISO 42001, 27001, 27701, and SOC 2 certifications significantly reduces procurement security audit times.
- Researchers: The OpenTelemetry trace-based evaluation loop over production traffic provides a rare empirical methodology for quantifying the gap between offline benchmarks and online quality. Building datasets that can observe agent tool call graphs, search re-ranking effects, and guardrail blocking rates over time will contribute to subsequent research.