A finance analyst AI agent that classifies Jira work items as Capital Expenditure (CapEx) or Operational Expenditure (OpEx) using Qwen 2.5 32B via Ollama.
The agent runs in three phases:
- Context Loading — Feeds company classification standards into the model.
- Classification — Batches Jira items and classifies each against the standards, returning structured JSON with confidence scores.
- Reasoning Report — Generates a human-readable audit report explaining each decision.
- Python 3.10+
- Ollama with the
qwen2.5:32bmodel pulled - Dependencies:
ollama,pandas
# Pull the model
ollama pull qwen2.5:32b
# Install dependencies
pip install ollama pandas- Place your company standards in
work-categories.csv(see included example). - Place your Jira export in
jira-items.csv. - Run the classifier:
python capex-opex.pyOutput is written to the output/ directory:
<timestamp>_classified_items.csv— Full classification results.<timestamp>_classification_reasoning.txt— Auditor-friendly reasoning report.
| Column | Description |
|---|---|
| Category | Classification category name |
| Classification | CapEx or OpEx |
| Jira Issue Types | Allowed issue types (comma-separated) |
| Description | Category description |
| Logic/Rule | Keywords that trigger this category |
| Column | Description |
|---|---|
| Issue Key | Jira issue key (e.g., PROJ-101) |
| Summary | Issue summary/title |
| Issue Type | Story, Bug, Task, Epic, etc. |
| Description | (Optional) Detailed description |
Edit the CONFIG dict in capex-opex.py to change model, file paths, batch size, or context window.
MIT