SAGE Examples - Production application examples for SAGE framework
Project description
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 |
See examples/README.md for details.
๐ฆ 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: https://intellistream.github.io/SAGE
๐ค Contributing
We welcome contributions! Please see:
- Development Guide:
docs/DEVELOPMENT.md - Code of Conduct: Follow respectful collaboration
- Issue Tracker: https://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: https://github.com/intellistream/SAGE
- SAGE Benchmark: https://github.com/intellistream/sage-benchmark
- PyPI Packages: https://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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file isage_examples-0.1.1.1-py3-none-any.whl.
File metadata
- Download URL: isage_examples-0.1.1.1-py3-none-any.whl
- Upload date:
- Size: 35.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e56f9c2a884c6f07f88d8db1125518be8adb25911f8cd579baf33ceb281bf371
|
|
| MD5 |
058046f7b8fccfdd48f32a97a3159e45
|
|
| BLAKE2b-256 |
3738fd0ac1842fa564682f607df7ca7b30f203964285f77d75e3eb425c55dbb6
|
File details
Details for the file isage_examples-0.1.1.1-py2.py3-none-any.whl.
File metadata
- Download URL: isage_examples-0.1.1.1-py2.py3-none-any.whl
- Upload date:
- Size: 35.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2fc549f574f03089da0437f90c2b41fc1006aa04d80a1376d17cb87d9a28c2ce
|
|
| MD5 |
7829612bcf834316adef8c5c0b2ec6bf
|
|
| BLAKE2b-256 |
ee348c305e761349cc067e5416e93dd54da0acf4735af524646c9097f7acb961
|