|
|
|
@ -5,15 +5,24 @@ This directory contains practical examples of different deployment strategies fo
|
|
|
|
|
## Examples Overview
|
|
|
|
|
|
|
|
|
|
### FastAPI + Uvicorn
|
|
|
|
|
|
|
|
|
|
- **File**: `fastapi_agent_api_example.py`
|
|
|
|
|
|
|
|
|
|
- **Description**: Complete FastAPI application that exposes Swarms agents as REST APIs
|
|
|
|
|
|
|
|
|
|
- **Use Case**: Creating HTTP endpoints for your agents
|
|
|
|
|
|
|
|
|
|
- **Requirements**: `requirements.txt`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### Cron Jobs
|
|
|
|
|
|
|
|
|
|
- **Directory**: `cron_job_examples/`
|
|
|
|
|
|
|
|
|
|
- **Description**: Various examples of running agents on schedules
|
|
|
|
|
|
|
|
|
|
- **Use Case**: Automated, periodic task execution
|
|
|
|
|
|
|
|
|
|
- **Examples**: Crypto tracking, stock monitoring, data processing
|
|
|
|
|
|
|
|
|
|
## Quick Start
|
|
|
|
@ -46,10 +55,12 @@ This directory contains practical examples of different deployment strategies fo
|
|
|
|
|
|
|
|
|
|
Navigate to the `cron_job_examples/` directory for various scheduling examples:
|
|
|
|
|
|
|
|
|
|
- `cron_job_example.py` - Basic cron job setup
|
|
|
|
|
- `crypto_concurrent_cron_example.py` - Concurrent crypto monitoring
|
|
|
|
|
- `solana_price_tracker.py` - Solana price tracking
|
|
|
|
|
- `figma_stock_example.py` - Stock monitoring with Figma integration
|
|
|
|
|
| File Name | Description |
|
|
|
|
|
|------------------------------- |------------------------------------------|
|
|
|
|
|
| `cron_job_example.py` | Basic cron job setup |
|
|
|
|
|
| `crypto_concurrent_cron_example.py` | Concurrent crypto monitoring |
|
|
|
|
|
| `solana_price_tracker.py` | Solana price tracking |
|
|
|
|
|
| `figma_stock_example.py` | Stock monitoring with Figma integration |
|
|
|
|
|
|
|
|
|
|
## Testing
|
|
|
|
|
|
|
|
|
@ -62,20 +73,26 @@ python test_fastapi_example.py
|
|
|
|
|
## Documentation
|
|
|
|
|
|
|
|
|
|
For detailed guides and documentation, see:
|
|
|
|
|
|
|
|
|
|
- [Deployment Solutions Overview](../../docs/deployment_solutions/overview.md)
|
|
|
|
|
|
|
|
|
|
- [FastAPI Agent API Guide](../../docs/deployment_solutions/fastapi_agent_api.md)
|
|
|
|
|
|
|
|
|
|
## Requirements
|
|
|
|
|
|
|
|
|
|
- Python 3.8+
|
|
|
|
|
|
|
|
|
|
- Swarms framework
|
|
|
|
|
|
|
|
|
|
- FastAPI and Uvicorn (for API examples)
|
|
|
|
|
|
|
|
|
|
- Required API keys for your chosen models
|
|
|
|
|
|
|
|
|
|
## Support
|
|
|
|
|
|
|
|
|
|
If you encounter issues:
|
|
|
|
|
1. Check the requirements are installed correctly
|
|
|
|
|
2. Verify your API keys are set
|
|
|
|
|
3. Check the documentation for detailed setup instructions
|
|
|
|
|
4. Review the test script output for debugging information
|
|
|
|
|
| Issue Encountered | Troubleshooting Step |
|
|
|
|
|
|------------------------------------------|------------------------------------------------------------------|
|
|
|
|
|
| Requirements not working | Check the requirements are installed correctly |
|
|
|
|
|
| API authentication problems | Verify your API keys are set |
|
|
|
|
|
| Setup or usage confusion | Check the documentation for detailed setup instructions |
|
|
|
|
|
| Unexpected errors or failures | Review the test script output for debugging information |
|