Agentic RAG for JIRA Case Management using Strands Agents with MCPs Clients for Amazon Q Index & Perplexity
This solution uses Strands Agents with MCP Tools powered by Amazon Q Business Cross App index and Perplexity Ask
Perform the steps for setting up MCP powered using Q Index based RAG by visiting the q_index_mcp/README.md
Create .env file in the root of this module.
touch .env
The application uses environment variables for configuration. You can modify these in the .env
file:
REGION=us-east-1
Q_BUSINESS_APP_NAME=REPLACE_WITH_YOUR_Q_BUSINESS_APP_NAME
PERPLEXITY_API_KEY=PERPLEXITY_API_KEY
For PERPLEXITY_API_KEY, visit Generating an API Key
This project uses uv
for dependency management instead of traditional Python venv.
For Mac, you MUST run brew install uv
for smooth MCP experience. Otherwise you may run into ENOENT challenges
brew install uv
You can run the server using the provided script:
./run_with_uv.sh
This script will:
- Create a uv environment if it doesn't exist
- Install the required dependencies
- Spins up the bot that runs strands agent powered up by MCP servers.
If you prefer to set up manually:
# Create and activate uv environment
uv venv .uv
source .uv/bin/activate
# Install dependencies
uv pip install boto3 "mcp[cli]" requests fastmcp httpx python-dotenv strands-agents strands-agents-tools
# Run strands agent
uv run main.py
- boto3
- mcp[cli]
- requests
- fastmcp
- httpx
- python-dotenv
- strands-agents
- strands-agents-tools
cd q_index_mcp/ && uv run test_mcp_client.py && cd ..
Refer q_index_mcp/rag_sample_queries.md that has sample questions along with expected info and context associated with query.
What are some of the reasons of keyboard failure?
What are software installation issues caused by?
What is the remediation of password not working?
What do I do if I am unable to access my backup files?
What immediate action did AnyCompany take to improve the Voice receptionist service while discussing the upgrade?
During which hours did Michael Chen notice the most significant delays?
Refer Integrating MCP with Perplexity's Sonar API and Perplexity Ask MCP Server
Sample prompt. Feel free to tweak according to your needs.
You are a helpful AI assistant who answers question correctly and accurately about a AcmeCompany's IT tickets and also rely on Perplexity MCP Server for general knowledge.
You answer in the format as follows:
<response>
<datasource>
</datasource>
<perplexityknowledge>
</perplexityknowledge>
</response>
** For datasource section: **
Use tool answer_question from AnyCompany MCP Server.
Do not makeup answers and only answer from the provided knowledge.
If the query doesn't has any Info about IT Tickets, you must acknowledge that.
** For perplexityknowledge section: **
Provide info by obtaining the results from perplexity-ask MCP using it's preplexity_ask tool for addressing the query.
Here is the query:
During which hours did Michael Chen notice the most significant delays?