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.
Metadata
Release files for langswarm-backend 0.0.6
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 |
|---|---|---|---|---|
| langswarm_backend-0.0.6.tar.gz | 4.3 kB | Without provenance | Details for langswarm_backend-0.0.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| langswarm_backend-0.0.6-py3-none-any.whl | Python 3 | none | any | Details for langswarm_backend-0.0.6-py3-none-any.whl |
Total release size: 8.8 kB
Release files / langswarm_backend-0.0.6.tar.gz
| Download URL | langswarm_backend-0.0.6.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e073505a9acc390d9e9b8fa03fb1234629523a2a6054a57733497a2d8b02a011
|
|
BLAKE2b-256 checksum How to use checksums |
0151230c8efcb79590399090585c76bccc5685251260f8fbde05de7b826c764a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.9.21
|
Release files / langswarm_backend-0.0.6-py3-none-any.whl
| Download URL | langswarm_backend-0.0.6-py3-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
245e1e72cb44e97e24603294a600a5e7e21d0fb49d8b9ad8b89eb9112a0f0bb6
|
|
BLAKE2b-256 checksum How to use checksums |
7262105cd0b4a343fd492a996b02f3686ff608c695498eae340862c226d2f558
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.9.21
|
Security for langswarm-backend 0.0.6
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.