AI agent that summarizes cash flow operating, investing, financing activities with liquidity analysis.
import requests, json, pandas as pd
from datetime import datetime, timedelta
BANK_API = "https://api.bank.com/v1/transactions"
THRESHOLD_BALANCE = 10000
def fetch_cash_flow(months=2):
resp = requests.get(BANK_API, params={"months": months})
return resp.json().get("transactions", [])
def categorize_cash_flow(data):
df = pd.DataFrame(data)
summary = {
"operating": df[df["type"]=="operating"]["amount"].sum(),
"investing": df[df["type"]=="investing"]["amount"].sum(),
"financing": df[df["type"]=="financing"]["amount"].sum(),
"net_change": df["amount"].sum(),
"closing": df.iloc[-1]["balance"]
}
return summary
def forecast_runway(closing_balance, monthly_burn):
runway_months = closing_balance / abs(monthly_burn) if monthly_burn < 0 else 99
return {"runway_months": round(runway_months, 1), "balance": closing_balance}
report = categorize_cash_flow(fetch_cash_flow())
print(json.dumps(report, indent=2))
Basic Package
Special SME traction programme by AINNA.
Limited starter website offer. AI usage, hosting, maintenance and custom integrations depend on the confirmed scope.
View SME Offer โ
Ask about AINNA pages, services and articles.
AINNA sources only ยท up to 5 lines ยท 20 questions/hour
No section data available yet.
Sites with documented sections will appear here.
We value your privacy
We use browser storage to remember your choice. Optional analytics runs only after you allow it; your choice is recorded with an anonymous ID. Privacy Policy