# Kiara

Kiara (Knowledgeable Issue Assistant for Reporting & Analytics) is a conversational JIRA assistant. It lets program managers, engineers, and stakeholders ask questions about JIRA issues in plain English instead of writing JQL queries.

## Core Idea

JIRA is the system of record for many engineering teams, but JQL has a learning curve and non-technical stakeholders often need help to get answers. Kiara wraps the JIRA REST API with a LangChain tool-calling agent and a self-hosted, OpenAI-compatible LLM so teams can query issues through a simple chat interface while keeping data inside the network.

## Key Capabilities

- **Conversational search** — ask for issues in plain English; the agent builds and runs JQL behind the scenes.
- **Issue detail lookup** — mention an issue key and get key, summary, status, assignee, priority, and a direct JIRA URL.
- **Multi-turn memory** — follow-up questions carry conversation context.
- **Self-hosted LLM support** — works against OpenAI-compatible endpoints such as a local Mistral 12B server.
- **Extensible tool pattern** — add Confluence, Slack, Git, or CI/CD tools by registering new LangChain tools in `ALL_TOOLS`.

## Architecture

- **Frontend**: Jinja2 templates + vanilla JavaScript + Tailwind CSS (CDN) with markdown rendering.
- **Backend**: Flask 3.x with session-based chat routes and an in-memory conversation store.
- **Agent**: LangChain `create_tool_calling_agent` with `ChatOpenAI` and two JIRA tools (`search_jira_issues`, `get_jira_issue`).
- **JIRA integration**: JIRA REST API v2 authenticated with a Personal Access Token (PAT).
- **Config**: `config.yaml` holds the LLM endpoint, model name, JIRA base URL, and PAT.

## Getting Started

1. Copy `config.yaml.example` to `config.yaml` and fill in the LLM endpoint, model, JIRA URL, and PAT.
2. Install dependencies with `pip install -r requirements.txt`.
3. Run `start.bat` (Windows) or `python app.py` to launch the Flask app on port 5000.
4. Open the chat UI in a browser and start asking JIRA questions.

## License

Proprietary — Raman Udgiri.
