FAQ chatbot powered by LangChain + LangGraph, deployed on Amazon Bedrock AgentCore Runtime, with a Streamlit frontend and CloudWatch tracing.
- FAQ retrieval with vector search (
FAISS+ sentence-transformers embeddings) - Tool-using agent behavior for structured Q&A responses
- AgentCore memory-enabled runtime integration
- Streamlit chat app that invokes the deployed runtime (not local direct invoke)
- CloudWatch-compatible runtime invocation path for request tracing
.
|-- streamlit_app.py # Streamlit frontend (invokes AgentCore runtime via boto3)
|-- agentcore_memory.py # Memory-enabled AgentCore runtime entrypoint
|-- agentcore_runtime.py # AgentCore runtime variant
|-- langgraph_agent.py # Local LangGraph/agent variant
|-- lauki_qna.csv # FAQ knowledge base
|-- .bedrock_agentcore.yaml # AgentCore deployment/runtime metadata
|-- pyproject.toml # Project dependencies
|-- assets/
| |-- frontend_ui.png
| `-- cloudwatch_trace.png
- Python
>=3.13 - AWS credentials configured for the target account/region
- Access to Bedrock AgentCore runtime and memory resources
GROQ_API_KEYand any required model/provider credentials in.env
- Install dependencies
uv sync- Ensure environment variables are set (example)
$env:AWS_REGION="us-west-2"
$env:AWS_DEFAULT_REGION="us-west-2"
$env:AGENT_RUNTIME_ARN="arn:aws:bedrock-agentcore:...:runtime/your-runtime-id"- Run the frontend
uv run streamlit run streamlit_app.py- Open the app in your browser (typically
http://localhost:8501)
- User asks a question in Streamlit.
streamlit_app.pyresolves AgentCore runtime ARN and region.- App calls
bedrock-agentcore:InvokeAgentRuntimewith:promptactor_idthread_id
- Deployed runtime executes
agentcore_memory.pyagent flow. - Response is returned to UI and trace data is available in CloudWatch.
actor_idandthread_idare captured in the UI sidebar for session continuity.- Runtime calls are sent through AWS AgentCore API, enabling CloudWatch trace visibility.
- If traces do not appear, verify:
- correct runtime ARN
- runtime observability enabled in AgentCore config
- IAM permissions for invoke and logging
- matching AWS account and region
- Do not commit real secrets in
.env(API keys/tokens). - Rotate exposed keys and prefer AWS Secrets Manager or environment injection in deployment.

