A FastAPI-based backend enabling seamless multi-agent orchestration and API integration for LangSwarm applications.
Project description
LangSwarm-Backend
LangSwarm-Backend is a lightweight, FastAPI-based backend designed to support LangSwarm's multi-agent ecosystem. It provides a scalable API layer and serves as the core integration point for managing and coordinating agent interactions.
Features
- FastAPI Framework: High-performance API for seamless communication with LangSwarm agents.
- Docker-Compatible: Easily deployable as a container on local or cloud environments.
- Scalable Architecture: Built to run on Cloud Run or other serverless platforms for automatic scaling.
- Multi-Agent Orchestration: Handles API requests, message routing, and task execution for LangSwarm agents.
Requirements
- Python 3.10 or higher
- Dependencies listed in
requirements.txt
Installation
Install LangSwarm-Backend and its dependencies via pip:
pip install langswarm-backend
Usage
Local Development
Run the backend locally:
python langswarm-backend/main.py
Access the API at http://localhost:8080.
Deployment with Docker
Build and run the Docker container:
docker build -t langswarm-backend .
docker run -p 8080:8080 langswarm-backend
Deployment on Cloud Run
- Build the Docker image:
docker build -t gcr.io/[PROJECT-ID]/langswarm-backend .
- Push the image to Google Artifact Registry:
docker push gcr.io/[PROJECT-ID]/langswarm-backend
- Deploy to Cloud Run:
gcloud run deploy langswarm-backend \ --image gcr.io/[PROJECT-ID]/langswarm-backend \ --region [REGION] \ --platform managed \ --allow-unauthenticated
Environment Variables
APP_PORT: Port to expose the backend (default:8080).- Additional variables can be configured via
.env.
API Endpoints
Example: Message Handling
- POST
/send-message: Sends a message to the backend.{ "sender": "agent1", "content": "Hello, World!" }
- GET
/get-messages: Retrieves all messages.
Contributing
We welcome contributions to improve LangSwarm-Backend. To get started:
- Fork the repository.
- Create a new branch for your feature or bugfix.
- Submit a pull request for review.
License
LangSwarm-Backend is licensed under the MIT License.
Support
For issues or questions, please open a GitHub issue or contact our team.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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 langswarm_backend-0.0.4.tar.gz.
File metadata
- Download URL: langswarm_backend-0.0.4.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd3b65d619e1f6d0fcd0450a338b61a62b908eeef01892b958989e186504edca
|
|
| MD5 |
2a30237d08d3db3529ef3a8f5a7210e7
|
|
| BLAKE2b-256 |
dea6110165228bb8b6e949053c7ee8fadc466e3b040235c8517ff98f0c32600d
|
File details
Details for the file langswarm_backend-0.0.4-py3-none-any.whl.
File metadata
- Download URL: langswarm_backend-0.0.4-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19250448b801f9a1ce2eae3fd957cc1667d1c17303e953f14cc6632e50f55a7e
|
|
| MD5 |
5f1c213ad7b97d1ec7b3445ad3fdc6db
|
|
| BLAKE2b-256 |
a7758093b4e6b0706eb5404787e2c0588ff241aa1b149b1a43ff7147c542f94a
|