Quick Start
1
Install Dependencies
Make sure you have the required packages installed:
2
Set API Key
3
Deploy a Simple Agent API
Create a file named
simple-api.py
with the following code:4
Run the API Server
http://localhost:3030/ask
Making API Requests
Once your agent is deployed, you can make POST requests to interact with it:Multi-Agent API Deployment
You can deploy multiple agents on the same server, each with its own endpoint:- Weather agent at
http://localhost:3030/weather
- Stock agent at
http://localhost:3030/stock
- Travel agent at
http://localhost:3030/travel
Production Deployment Options
For production environments, consider the following deployment options:Docker Deployment
1
Create a Dockerfile
2
Create requirements.txt
3
Build and Run Docker Container
Cloud Deployment
Deploying to AWS
1
Create an EC2 Instance
Launch an EC2 instance with Ubuntu or Amazon Linux.
2
Install Dependencies
3
Configure Security Group
Make sure to open port 3030 in your security group settings.
4
Run with Systemd
Create a systemd service file for automatic startup and management.
Deploying to Google Cloud Run
1
Build Docker Image
2
Push to Container Registry
3
Deploy to Cloud Run
API Configuration Options
When launching your agent as an API, you can customize various parameters:Securing Your API
For production deployments, consider implementing:- API Key Authentication: Require API keys for all requests
- Rate Limiting: Limit the number of requests per client
- HTTPS: Use SSL/TLS certificates for encrypted communication
- Input Validation: Validate all input data before processing
Monitoring and Scaling
For production environments, consider:- Load Balancing: Distribute traffic across multiple instances
- Auto-Scaling: Automatically adjust resources based on demand
- Logging: Implement comprehensive logging for debugging
- Monitoring: Set up alerts for errors and performance issues
Features
RESTful API
Deploy your agents as standard RESTful APIs for easy integration.
Multi-Agent Support
Deploy multiple agents with different endpoints on the same server.
Customizable
Configure ports, paths, CORS settings, and more.
Production-Ready
Easily deploy to Docker, AWS, Google Cloud, or other cloud platforms.