SAGE Examples
Production-ready application examples for the SAGE framework.
🎯 What is This?
sage-examples showcases production application examples for SAGE:
- 🎯 Examples: Complete, runnable application demonstrations
- 📦 apps Package: Installable application library (published to PyPI as
iapps)
� Looking for tutorials? Visit SAGE/tutorials for learning materials.
🚀 Quick Start
# Clone this repository
git clone https://github.com/intellistream/sage-examples.git
cd sage-examples
# Install (all dependencies included)
pip install -e .
# Run an application example
python examples/run_video_intelligence.py
New to SAGE? Start with SAGE/tutorials first.
📁 Repository Structure
sage-examples/
├── examples/ # 🎯 Production application examples
│ ├── run_video_intelligence.py
│ ├── run_medical_diagnosis.py
│ ├── run_smart_home.py
│ └── ...
│
├── apps/ # 📦 Installable application package
│ ├── src/sage/apps/ # Application implementations
│ └── tests/ # Package tests
│
├── docs/ # 📖 Project documentation
└── pyproject.toml # Project configuration
📚 Learning vs Examples
| Your Goal | Repository |
|---|---|
| Learn SAGE basics | SAGE/tutorials |
| See production examples | sage-examples (this repo) |
| Install applications | pip install iapps |
🎯 Application Examples
Complete, runnable applications demonstrating real-world use cases:
| Application | Description | Script |
|---|---|---|
| 🎬 Video Intelligence | Multi-model video analysis | examples/run_video_intelligence.py |
| 🏥 Medical Diagnosis | AI medical image analysis | examples/run_medical_diagnosis.py |
| 🏠 Smart Home | IoT automation system | examples/run_smart_home.py |
| 📰 Article Monitoring | News monitoring pipeline | examples/run_article_monitoring.py |
| 💬 Auto-scaling Chat | Dynamic scaling chat | examples/run_auto_scaling_chat.py |
| 📚 Literature Recommendation | Personalized scientific paper recommendation | examples/run_literature_report_assistant.py |
| 🧭 Patent Landscape Mapper | Patent clustering and whitespace opportunity mapping | examples/run_patent_landscape_mapper.py |
| 🎓 Student Improvement | Stateful learning diagnosis and score improvement MVP | examples/run_student_improvement.py |
| 🚚 Supply Chain Alert | Stateful supply risk detection and dashboard snapshot MVP | examples/run_supply_chain_alert.py |
| 🌐 Supply Chain Alert API | FastAPI service for querying dashboard, alerts, and supplier risk | examples/run_supply_chain_alert_api.py |
| 🎫 Ticket Triage | Stateful customer support ticket classification, urgency scoring, and routing | examples/run_ticket_triage.py |
| 🌐 Ticket Triage API | FastAPI service for triage ingestion, queue queries, and ticket lookup | examples/run_ticket_triage_api.py |
The repository also includes the full 53-91 domain app suite across research, education, healthcare, enterprise operations, public service, sustainability, and infrastructure monitoring.
Representative newer entry points include:
examples/run_patent_competition_monitor.pyexamples/run_campus_aid_gap_alert.pyexamples/run_lab_turnaround_alert.pyexamples/run_policy_search_helper.pyexamples/run_community_hotspot_drift.pyexamples/run_budget_variance_alert.pyexamples/run_carbon_collection.pyexamples/run_data_center_watch.py
See examples/README.md for the complete runnable script index.
📦 Installation
# Clone repository
git clone https://github.com/intellistream/sage-examples.git
cd sage-examples
# Install (all dependencies included by default)
pip install -e .
# Or install from PyPI
pip install isage-examples
# Development mode (includes pytest, ruff, mypy)
pip install -e .[dev]
Note: Following SAGE principles, all application dependencies are installed by default. No need for extra flags like
[video]or[medical].
🏗️ SAGE Architecture Overview
SAGE uses a strict 6-layer architecture with unidirectional dependencies:
┌─────────────────────────────────────────────┐
│ L6: Interface │ CLI, Web UI, Tools
├─────────────────────────────────────────────┤
│ L5: Applications │ Production Apps
├─────────────────────────────────────────────┤
│ L4: Middleware │ Domain Operators
├─────────────────────────────────────────────┤
│ L3: Core │ Execution + Algorithms
│ ├─ Kernel (Batch/Stream Engine) │
│ └─ Libs (RAG/Agents/Algorithms) │
├─────────────────────────────────────────────┤
│ L2: Platform │ Scheduler, Storage
├─────────────────────────────────────────────┤
│ L1: Foundation │ Config, Logging, LLM
└─────────────────────────────────────────────┘
Dependency Rule: Upper layers can depend on lower layers (L6→L5→...→L1), but never the reverse.
🛠️ Development
Setup
# Install development dependencies
pip install -e ".[dev]"
# Install pre-commit hooks
pre-commit install
# Run all checks
pre-commit run --all-files
Code Quality
# Format code
ruff format .
# Lint code
ruff check .
# Auto-fix issues
ruff check --fix .
# Type checking
mypy .
Testing
# Run all tests
pytest
# Run specific tests
pytest examples/test_apps.py
pytest apps/tests/
# With coverage
pytest --cov=. --cov-report=html
See docs/DEVELOPMENT.md for complete development guide.
📖 Documentation
- Examples Guide:
examples/README.md- Application examples - Development Guide:
docs/DEVELOPMENT.md- Contributing - SAGE Tutorials: SAGE/tutorials - Learn SAGE
- SAGE Docs: intellistream.github.io/SAGE
🤝 Contributing
We welcome contributions! Please see:
- Development Guide:
docs/DEVELOPMENT.md - Code of Conduct: Follow respectful collaboration
- Issue Tracker: github.com/intellistream/sage-examples/issues
Adding Examples
- Tutorials: Add to SAGE/tutorials
- Applications:
- Implementation →
apps/src/sage/apps/your_app/ - Entry script →
examples/run_your_app.py
- Implementation →
- Tests: Add tests and ensure they pass
- Dependencies: Update
pyproject.toml
🔗 Related Repositories
- SAGE Main: github.com/intellistream/SAGE
- SAGE Benchmark: github.com/intellistream/sage-benchmark
- PyPI Packages: pypi.org/search/?q=isage
📄 License
MIT License - see LICENSE for details.
🙋 Getting Help
- GitHub Issues: Bug reports and feature requests
- GitHub Discussions: Questions and community support
- GitHub Copilot: Use "SAGE Examples Assistant" chat mode
🌟 Star History
If you find this project helpful, please consider giving it a ⭐️!
Made with ❤️ by the IntelliStream Team.
Metadata
Release files for isage-examples 0.1.1.20
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| isage_examples-0.1.1.20.tar.gz | 78.0 kB | Without provenance | Details for isage_examples-0.1.1.20.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| isage_examples-0.1.1.20-py3-none-any.whl | Python 3 | none | any | Details for isage_examples-0.1.1.20-py3-none-any.whl |
Total release size: 159.7 kB
Release files / isage_examples-0.1.1.20.tar.gz
| Download URL | isage_examples-0.1.1.20.tar.gz |
|---|---|
| Size | 78.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
698fb41da72431d2279db7320b2cdb0389f0b95230d060c046500c9beecedcf0
|
|
BLAKE2b-256 checksum How to use checksums |
099cac66d6bb9515d136f68490919457283fa9ad3227884780feb736569390d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Release files / isage_examples-0.1.1.20-py3-none-any.whl
| Download URL | isage_examples-0.1.1.20-py3-none-any.whl |
|---|---|
| Size | 81.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c670bace7ce8d8f2fba9baa7b449bd4c0c4725398e68fa9697d01c77e3250594
|
|
BLAKE2b-256 checksum How to use checksums |
0211a0c7aa386002d1b1e1fbf23b87b926c921258a893238226ee6b3c0b2811f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Security for isage-examples 0.1.1.20
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.