JIRA-Astra-Agent is a smart agent-powered application designed for managing and interacting with JIRA data stored in an Astra DB collection. The agent enables querying, similarity searches, and data ingestion, leveraging state-of-the-art tools like LangChain, LangGraph, Astra DB, and OpenAI.
- Query JIRA issues using parameters like issue ID, issue key, project key, or status.
- Perform vector-based similarity searches to find issues similar to a specified issue.
- Ingest filtered JIRA issue data into Astra DB with structured metadata.
- Utilize LangChain and LangGraph for intelligent workflows and tool integration.
-
Clone the repository:
git clone https://github.com/difli/jira-astra-agent.git cd jira-astra-agent
-
Set up a virtual environment:
python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install the required dependencies:
pip install -r requirements.txt
-
Configure environment variables: Create a
.env
file in the root directory with the following variables:ASTRA_DB_APPLICATION_TOKEN=your_astra_db_token ASTRA_DB_API_ENDPOINT=your_astra_db_endpoint ASTRA_COLLECTION_NAME=your_collection_name OPENAI_API_KEY=your_openai_api_key
-
Ingesting Data The
ingest_filtered_issues.py
script ingests JIRA issue data into Astra DB.- Run the script:
python ingest_filtered_issues.py
The script reads all JSON files ending with
_filtered.json
in folderfiltered_issue_data
, extracts theid
field as the document ID, and inserts the data into Astra DB. - Run the script:
The agent provides an interactive CLI for querying JIRA data.
python app.py
-
Query an issue by key:
"What is the status of issue TES-10?" -
Find similar issues:
"Which issues are similar to TES-10?" -
Query issues in a project:
"What are the issues in project TES?"
JIRA-Astra-Agent/
├── app.py # Main CLI application
├── agents/
│ ├── agent.py # Agent implementation
│ ├── tools/
│ │ ├── json_query.py # Tool for querying Astra DB
│ │ ├── find_similar_issues.py # Tool for finding similar issues
├── filtered_issue_data/ # Directory for storing filtered JIRA issue JSON files
├── ingest_filtered_issues.py # Script to ingest filtered JSON data into Astra DB
├── requirements.txt # Python dependencies
├── .env # Environment variables (not included in the repo)
└── README.md # Project documentation
- Python: Core programming language.
- Astra DB: The best hybrid vector database. Used for storing JIRA data.
- LangChain: Framework for integrating tools and building intelligent workflows.
- LangGraph: State-based framework for orchestrating complex workflows with tools and memory.
- OpenAI: Provides GPT-4 capabilities for query processing.
- dotenv: Manages environment variables.
Contributions are welcome! To contribute:
- Fork the repository.
- Create a new branch for your feature or bug fix:
git checkout -b feature-name
- Commit your changes:
git commit -m "Add feature description"
- Push the branch:
git push origin feature-name
- Create a Pull Request on the main repository.
If you encounter any issues or have questions, feel free to open an issue on the repository or contact the maintainer.