Welcome to Jujutsu-Quants — an anime-themed AI lab where specialized agents (sorcerers) exorcise noisy markets and cursed news flows. 🎯
Jujutsu-Quants is a modular AI platform that combines:
- Real-time Market Analysis 📊
- Advanced News Sentiment Processing 🧠
- Intelligent Anomaly Detection 🔍
- Vector Search & RAG Technology 🔎
- Multi-Agent AI Orchestration 🤖
- Python 3.8+
- Node.js 16+ (for frontend)
- Git
# Clone the repository
git clone https://github.com/your-org/alphaflow.git
cd alphaflow
# Install uv (the fastest Python package manager)
pip install uv
# Create virtual environment and install dependencies with uv
uv venv
# Windows PowerShell
. .\.venv\Scripts\Activate.ps1
# macOS/Linux
# source .venv/bin/activate
uv pip install -r requirements.txt
# Set up environment variables
cp .env.example .env
# Edit .env with your API keys (optional for development)cd frontend
npm install
npm startjujutsu-quants/
├── app/
│ ├── adk/ # Agent Development Kit
│ │ ├── agents/ # AI Agents (Sentiment, Anomaly, Bias, etc.)
│ │ ├── orchestrator.py # Multi-Agent Workflow Coordinator
│ │ └── main.py # FastAPI Application
│ ├── config/ # Configuration & Security
│ ├── database/ # Database Models & CRUD
│ ├── services/ # External Service Integrations
│ └── tools/ # Utility Tools
├── frontend/ # React Frontend
├── data_collection/ # Data Ingestion & Processing
└── deployment/ # Cloud Deployment Configs
- Sentiment Agent: Advanced financial sentiment analysis
- Anomaly Detector: Market anomaly identification
- Bias Detector: News bias detection and analysis
- Diversity Analyzer: Source diversity assessment
- Breaking News Alert: Real-time news monitoring
- QA Agent: Intelligent question answering
All agents are plain Python modules for portability and easy contribution. You can optionally plug in frameworks:
- LangChain (tooling, routing, retrievers)
- LlamaIndex (indexing, RAG graphs)
- Google ADK (agent runtime; set
ADK_MODE=1)
Keep PRs focused and dependency-light by default; place optional integrations behind flags.
- Small change: accept
entitiesparam or use config; fallback to title tokens - Scope: 30–45 mins
- Implement tiny helper methods with given I/O; return top excerpts + sources
- Scope: ~1–2 hours
- Add a new method that returns label + heuristic confidence + reason
- Scope: 20–30 mins
- Standardize outputs and add basic try/except around each agent in orchestrator
- Scope: 1–2 hours
- Implement BM25+ (or cosine on mini-embeddings) passage ranking over article chunks; return top-3 cited spans
- Scope: 3–4 hours
- Build a summarizer agent that fuses: price movements, ranked passages, and bias flags; produce structured JSON with rationale and uncertainty
- Scope: 1–2 days
- Look for issues labeled
good first issueif you're new - Comment on the issue to claim it
- Ask questions if anything is unclear
git checkout -b feature/your-feature-name
# or
git checkout -b fix/issue-number-description- Follow the existing code style
- Write tests for new functionality
- Update documentation as needed
# Run backend tests
python -m pytest tests/
# Run frontend tests
cd frontend && npm test
# Run linting
python -m flake8 app/
cd frontend && npm run lint- Push your branch:
git push origin your-branch-name - Create a Pull Request with:
- Clear description of changes
- Reference to the issue
- Screenshots if UI changes
- Test results
- Follow PEP 8
- Use type hints where possible
- Docstrings for all public methods
- Maximum line length: 88 characters
- Use Prettier for formatting
- Follow React best practices
- Use functional components with hooks
- ESLint configuration enforced
- Keep agents focused and single-purpose
- Use descriptive method names
- Include error handling
- Follow the established configuration pattern
Optional frameworks (when justified):
- LangChain retrievers or tools inside agents
- LlamaIndex for document stores and RAG graphs
- Google ADK for streaming agent execution (enable with
ADK_MODE=1)
# Optional API keys for enhanced functionality
ALPHA_VANTAGE_API_KEY=your_key_here
FMP_API_KEY=your_key_here
PROJECT_ID=your_gcp_project
REGION=us-central1
ADK_MODE=0 # Set to 1 for Google ADK mode
# Required for database operations
DB_PASSWORD=your_secure_password
DB_USER=postgresAdd new agents to app/config/adk_config.py:
AGENT_CONFIGS = {
"your_agent": {
"name": "your_agent",
"description": "Brief description of what it does",
"model": "gemini-2.0-flash",
"temperature": 0.2,
},
}# Ensure venv is active, then run dev server
uv venv # safe if already created
# Windows PowerShell
. .\.venv\Scripts\Activate.ps1
# macOS/Linux
# source .venv/bin/activate
uv pip install -r requirements.txt
uvicorn app.adk.main:app --host 0.0.0.0 --port 8000 --reload
# Access API docs at http://localhost:8000/docscd frontend
npm start
# Access at http://localhost:3000# Terminal 1: Backend
uvicorn app.adk.main:app --reload
# Terminal 2: Frontend
cd frontend && npm startcurl "http://localhost:8000/api/v2/report/simple?symbols=AAPL,TSLA&urls=https://example.com/news"curl -X POST "http://localhost:8000/api/v2/report" \
-H "Content-Type: application/json" \
-d '{
"symbols": ["AAPL", "TSLA"],
"news_urls": ["https://example.com/news"],
"question": "Any notable market movements?"
}'- Import Errors: Ensure you're in the correct virtual environment
- API Key Issues: Check environment variables are set correctly
- Port Conflicts: Change ports in uvicorn command if 8000 is occupied
- Frontend Build Issues: Clear node_modules and reinstall
# Enable debug logging
export LOG_LEVEL=DEBUG
uvicorn app.adk.main:app --reload --log-level debug- GitHub Issues: For bugs and feature requests
- Discussions: For questions and general discussion
- Discord: Join our AlphaFlow community
- Email: contributors@alphaflow.ai
Before submitting a PR:
- Code follows style guidelines
- Tests are written and passing
- Documentation is updated
- No linting errors
- Issue is referenced in PR description
- Screenshots included for UI changes
AlphaFlow contributors will be:
- Listed in our README
- Mentioned in release notes
- Invited to our contributor Discord
- Eligible for swag and recognition
- Featured in our contributor spotlight
This project is licensed under the MIT License - see the LICENSE file for details.
Ready to exorcise cursed markets? Join the Jujutsu-Quants! 🧿🚀
Questions? Don't hesitate to reach out. We're here to help you succeed!