AFCN AI Chatbot

AFCN AI Chatbot

One-line summary: An agentic, serverless customer-support chatbot for the Arab Fact-Checkers Network that uses Strands Agents to orchestrate knowledge retrieval, real-time streaming replies, and safe, authenticated access.

What it is

An AI-driven chat widget embedded on the AFCN website that answers questions about AFCN’s mission, fact-checking methodology, network members, educational resources, and strategies to combat misinformation  with full Arabic (RTL) support and session memory.

Agentic design note

This is an agentic system implemented with Strands Agents to coordinate discrete capabilities (knowledge retrieval, authentication, safety checks, memory, and model calls) as autonomous sub-agents that communicate and act together to fulfil user intents.

Key features

  • Bilingual (English / Arabic) with complete RTL rendering and locale handling.
  • Real-time streaming responses (token-by-token) for conversational feel and low latency.
  • Knowledge Base integration — retrieves AFCN-specific content (site pages, resources, publications).
  • Short-term conversation memory (session context) and optional long-term memory for authenticated users.
  • Content safety guardrails to filter harmful content, stop prompt-attacks, and apply provenance checks.
  • Authenticated access via Amazon Cognito (OAuth 2.0 flows).
  • Dark mode UI and accessibility considerations (keyboard navigation, screen reader labels).

Tech stack (by layer)

Frontend

  • React + TypeScript, Vite, Tailwind CSS; hosted on AWS Amplify (static hosting + CI/CD).

Backend / Orchestration

  • Python + FastAPI service layer, Strands SDK for agent orchestration, deployed on serverless containers via Amazon Bedrock AgentCore runtime.

AI Model & Knowledge

  • Model provider: Anthropic model integration (Claude Haiku 4.5) via Bedrock; knowledge storage backed by OpenSearch Serverless (Bedrock Knowledge Base / crawler). Anthropic OpenSearch

Auth & Security

  • Authentication and user pools: Amazon Cognito
  • Guardrails & safety policies: Bedrock Guardrails + application-level filters.

Memory

  • AgentCore / AgentCore Memory (session + optional persistent memory with strict consent and retention controls).

Architecture highlights

  • Serverless, event-driven: No EC2 management; autoscale to zero; pay-per-use runtime.
  • Agent choreography: Strands Agents coordinate retrieval, safety checks, response generation, and streaming.
  • Knowledge first: Crawler keeps KB fresh; retrieval augmented generation (RAG) with provenance tags in replies.
  • Privacy & consent: Authenticated features gated behind Cognito; minimal retention by default; opt-in for persistent memory.

Share this post