| title | PRISM |
|---|---|
| emoji | ๐น |
| colorFrom | purple |
| colorTo | blue |
| sdk | docker |
| app_port | 7860 |
| pinned | false |
| short_description | PRISM - Position Risk Intelligence & Swap Monitor |
AI-powered swap trading monitoring system using CrewAI multi-agent framework.
๐ Live Demo: prism.lisekarimi.com
PRISM monitors USD SOFR swap trading positions in real-time and automatically generates trading signals when profit/loss thresholds are hit.
Note: This demo is specifically configured for USD SOFR (Secured Overnight Financing Rate) swaps only.
5 AI Agents working together:
- Market Data Agent - Fetches current USD SOFR swap rates (2Y, 5Y, 10Y, 30Y)
- Position Manager Agent - Loads trader's swap positions from database
- Risk Manager Agent - Analyzes market conditions and sets dynamic profit/loss thresholds
- Risk Calculator Agent - Calculates P&L for each position
- Trading Decision Agent - Generates CLOSE/HOLD signals based on thresholds
Thresholds:
- Close position when profit โฅ $50K
- Close position when loss โค -$25K
- Otherwise HOLD
- CrewAI - Multi-agent orchestration
- PostgreSQL - Position & rate storage (Neon)
- Gradio - Web dashboard
- Python 3.11 - Runtime
This app is built to run as a Docker Space on Hugging Face.
- Fork this repo on GitHub
- Create a new Space on huggingface.co/spaces with Docker as the SDK
- Link it to your forked GitHub repo
In your Space settings โ Variables and Secrets, add:
| Secret | Description |
|---|---|
DATABASE_URL |
PostgreSQL connection string (e.g. from Neon) |
OPENAI_API_KEY |
OpenAI API key for the LLM agents |
SERPER_API_KEY |
Serper API key for Google Search (serper.dev) |
Push to your linked branch โ HF Spaces will build and deploy automatically.
Prerequisites:
- Python 3.11+
- uv package manager
- Docker Desktop
- PostgreSQL database (free tier at neon.tech)
- OpenAI API key
- Serper API key
Setup:
git clone https://github.com/lisekarimi/prism.git
cd prism
cp .env.example .env # fill in your credentials
make devswap_positions- Trader's swap portfoliomarket_rates- Historical rate datatrade_signals- AI-generated trading decisions

