Skip to content

davidetfabbrica/finagent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FinFlow

A command-line FX rate tracker with alerting, built entirely by an AI agent from a written specification.

FinFlow fetches live exchange rates, stores them locally, and alerts you when a rate crosses a threshold you define. It was generated, tested, and delivered to this repository without a human writing a single line of application code.


What it does

  • Fetches live exchange rates from frankfurter.app (European Central Bank data, no API key required)
  • Stores each rate with a timestamp in a local SQLite database
  • Alerts you in the terminal when a rate breaches a defined threshold
  • Displays historical rates for any tracked currency pair
  • Runs entirely from the command line

Project structure

finflow/
├── finflow.py             # CLI entry point
├── fetcher.py             # API calls to frankfurter.app
├── storage.py             # SQLite read/write
├── alerts.py              # Threshold checking and alert output
├── config.py              # Currency pairs and thresholds
├── tests/
│   ├── __init__.py
│   └── test_finflow.py    # Full pytest test suite
└── requirements.txt

Setup

Requires Python 3.12.

git clone https://github.com/davidetfabbrica/finagent.git
cd finagent/finflow
pip install -r requirements.txt

Usage

Fetch and store the current GBP/USD rate:

python finflow.py fetch --pair GBP/USD

Set an alert threshold:

python finflow.py alert --pair GBP/USD --below 1.25

View stored history for a pair:

python finflow.py history --pair GBP/USD

Running the tests

pytest tests/ -v

All tests run offline. API calls are mocked using unittest.mock so no network connection is required.


How this was built

FinFlow was not written by hand. It was generated by an agentic Python script (agent.py) that:

  1. Read a Product Requirements Document (PRD) describing the software
  2. Called the Claude API and received the complete codebase in response
  3. Wrote the files to disk and ran pytest automatically
  4. Sent any test failures back to Claude for correction and retried
  5. Once all tests passed, committed the code, pushed a branch, and opened this Pull Request

The agent ran the full loop without human intervention between steps 1 and 5.


Data source

frankfurter.app — open, free, no authentication required. Backed by the European Central Bank's published exchange rate data.


License

MIT

About

Agentic code generation from PRD to PR

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors