Taxbit replaced a scattered collection of web pages and support tickets with a single, Bedrock AgentCore‑hosted AI assistant that delivers cited answers, enforces role‑based visibility, and complies with regional data‑residency rules. Engineers care because the shift eliminates custom infrastructure for conversation state, adds a guardrails layer for PII, and centralises retrieval and reasoning in a managed service.
Grounded AI Assistant Requirements
The product team defined four non‑negotiable constraints: every response must link back to a verifiable source, the assistant must honour the caller’s organization and dashboard role, it must never cross the line into tax advice, and all processing must stay within the region of the user’s data. These constraints drive the architecture and the safety controls that follow.
Architecture Overview
The solution is a Strands Agents SDK application executed by the AgentCore runtime. The request path is:
- User submits a question from the dashboard; the front‑end forwards the text together with the verified identity payload (email, organization ID, role list).
- AgentCore invokes
Amazon Bedrock Guardrailsto screen the input. Detected PII is masked in place; if the guardrails reject the message, the model is never called. - A retrieval step queries an
Amazon Bedrock Knowledge Basethat stores documentation, API specs, and help‑center articles as vector embeddings inAmazon S3 Vectors. The service returns candidate passages which are then reranked server‑side. - The selected passages are fed to a Bedrock model (Claude Sonnet) for reasoning. The model also checks the user’s role and organization against the content before suggesting any workflow.
- The final answer, together with a citation link to the source passage, streams back to the dashboard.
Per‑session memory is provided by AgentCore, so no external conversation‑state store is required. Each session is isolated, preventing cross‑tenant data leakage.
Implementation Details
Key implementation choices include:
- Using the managed retrieval‑augmented generation (RAG) capability of Bedrock, which abstracts vector store management and relevance ranking.
- Embedding the user’s role information in the request payload so the model can enforce access rules without a separate authorization service.
- Relying on Bedrock Guardrails for PII masking rather than custom regex filters, which reduces false positives and maintenance effort.
- Keeping the codebase single‑region aware; the same deployment runs in each AWS region to satisfy data‑residency requirements.
Operational and Security Considerations
Adopting AgentCore removes the need to provision and patch servers for the agent loop, and the built‑in memory eliminates a separate datastore. However, teams must still monitor:
- Guardrail hit rates and false‑positive blocks, to ensure legitimate queries are not unintentionally dropped.
- Reranking quality, because citation accuracy directly impacts compliance decisions.
- Model latency and streaming health, especially when scaling to many concurrent dashboard users.
- Compliance posture: the implementation aligns with ISO/IEC 42001 for AI management systems, and the broader ISO/IEC 27001/27701 and SOC 2 certifications of Taxbit’s environment.
Continuous production analytics show that more than half of users who ask a question return within 24 hours, indicating the assistant is becoming a primary support channel. Ongoing quality measurement is therefore essential to catch drift in answer relevance or citation correctness.
Related CloudNinjas coverage: AWS.
What This Means For Practitioners
Engineers can adopt a similar pattern by leveraging Bedrock AgentCore for any domain that requires cited, role‑aware responses. The managed runtime cuts infrastructure toil, while Guardrails and Knowledge Base integration provide a baseline safety stack. Practitioners should evaluate the relevance of their own documentation for vector indexing, tune guardrail policies to their data‑privacy needs, and put metrics in place to track citation fidelity and user follow‑up rates.


