langswarm-backend


Namelangswarm-backend JSON
Version 0.0.6 PyPI version JSON
download
home_pagehttps://github.com/aekdahl/langswarm-backend
SummaryA FastAPI-based backend enabling seamless multi-agent orchestration and API integration for LangSwarm applications.
upload_time2025-01-10 16:28:07
maintainerNone
docs_urlNone
authorAlexander Ekdahl
requires_python>=3.8
licenseMIT
keywords
VCS
bugtrack_url
requirements fastapi uvicorn
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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:
```bash
pip install langswarm-backend
```

## Usage

### Local Development
Run the backend locally:
```bash
python langswarm-backend/main.py
```
Access the API at `http://localhost:8080`.

### Deployment with Docker
Build and run the Docker container:
```bash
docker build -t langswarm-backend .
docker run -p 8080:8080 langswarm-backend
```

### Deployment on Cloud Run
1. Build the Docker image:
    ```bash
    docker build -t gcr.io/[PROJECT-ID]/langswarm-backend .
    ```
2. Push the image to Google Artifact Registry:
    ```bash
    docker push gcr.io/[PROJECT-ID]/langswarm-backend
    ```
3. Deploy to Cloud Run:
    ```bash
    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.
  ```json
  {
    "sender": "agent1",
    "content": "Hello, World!"
  }
  ```
- **GET `/get-messages`**: Retrieves all messages.

## Contributing
We welcome contributions to improve LangSwarm-Backend. To get started:
1. Fork the repository.
2. Create a new branch for your feature or bugfix.
3. Submit a pull request for review.

## License
LangSwarm-Backend is licensed under the [MIT License](LICENSE).

## Support
For issues or questions, please open a GitHub issue or contact our team.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/aekdahl/langswarm-backend",
    "name": "langswarm-backend",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "Alexander Ekdahl",
    "author_email": "alexander.ekdahl@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/01/51/230c8efcb79590399090585c76bccc5685251260f8fbde05de7b826c764a/langswarm_backend-0.0.6.tar.gz",
    "platform": null,
    "description": "# LangSwarm-Backend\n\nLangSwarm-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.\n\n## Features\n- **FastAPI Framework**: High-performance API for seamless communication with LangSwarm agents.\n- **Docker-Compatible**: Easily deployable as a container on local or cloud environments.\n- **Scalable Architecture**: Built to run on Cloud Run or other serverless platforms for automatic scaling.\n- **Multi-Agent Orchestration**: Handles API requests, message routing, and task execution for LangSwarm agents.\n\n## Requirements\n- Python 3.10 or higher\n- Dependencies listed in `requirements.txt`\n\n## Installation\nInstall LangSwarm-Backend and its dependencies via pip:\n```bash\npip install langswarm-backend\n```\n\n## Usage\n\n### Local Development\nRun the backend locally:\n```bash\npython langswarm-backend/main.py\n```\nAccess the API at `http://localhost:8080`.\n\n### Deployment with Docker\nBuild and run the Docker container:\n```bash\ndocker build -t langswarm-backend .\ndocker run -p 8080:8080 langswarm-backend\n```\n\n### Deployment on Cloud Run\n1. Build the Docker image:\n    ```bash\n    docker build -t gcr.io/[PROJECT-ID]/langswarm-backend .\n    ```\n2. Push the image to Google Artifact Registry:\n    ```bash\n    docker push gcr.io/[PROJECT-ID]/langswarm-backend\n    ```\n3. Deploy to Cloud Run:\n    ```bash\n    gcloud run deploy langswarm-backend \\\n        --image gcr.io/[PROJECT-ID]/langswarm-backend \\\n        --region [REGION] \\\n        --platform managed \\\n        --allow-unauthenticated\n    ```\n\n## Environment Variables\n- `APP_PORT`: Port to expose the backend (default: `8080`).\n- Additional variables can be configured via `.env`.\n\n## API Endpoints\n### Example: Message Handling\n- **POST `/send-message`**: Sends a message to the backend.\n  ```json\n  {\n    \"sender\": \"agent1\",\n    \"content\": \"Hello, World!\"\n  }\n  ```\n- **GET `/get-messages`**: Retrieves all messages.\n\n## Contributing\nWe welcome contributions to improve LangSwarm-Backend. To get started:\n1. Fork the repository.\n2. Create a new branch for your feature or bugfix.\n3. Submit a pull request for review.\n\n## License\nLangSwarm-Backend is licensed under the [MIT License](LICENSE).\n\n## Support\nFor issues or questions, please open a GitHub issue or contact our team.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A FastAPI-based backend enabling seamless multi-agent orchestration and API integration for LangSwarm applications.",
    "version": "0.0.6",
    "project_urls": {
        "Homepage": "https://github.com/aekdahl/langswarm-backend"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7262105cd0b4a343fd492a996b02f3686ff608c695498eae340862c226d2f558",
                "md5": "c36f05857b2eba3bf24b973d95ae659c",
                "sha256": "245e1e72cb44e97e24603294a600a5e7e21d0fb49d8b9ad8b89eb9112a0f0bb6"
            },
            "downloads": -1,
            "filename": "langswarm_backend-0.0.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c36f05857b2eba3bf24b973d95ae659c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 4545,
            "upload_time": "2025-01-10T16:28:05",
            "upload_time_iso_8601": "2025-01-10T16:28:05.648933Z",
            "url": "https://files.pythonhosted.org/packages/72/62/105cd0b4a343fd492a996b02f3686ff608c695498eae340862c226d2f558/langswarm_backend-0.0.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0151230c8efcb79590399090585c76bccc5685251260f8fbde05de7b826c764a",
                "md5": "22a60c347c1e37c800eaf01ccf0ec591",
                "sha256": "e073505a9acc390d9e9b8fa03fb1234629523a2a6054a57733497a2d8b02a011"
            },
            "downloads": -1,
            "filename": "langswarm_backend-0.0.6.tar.gz",
            "has_sig": false,
            "md5_digest": "22a60c347c1e37c800eaf01ccf0ec591",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 4272,
            "upload_time": "2025-01-10T16:28:07",
            "upload_time_iso_8601": "2025-01-10T16:28:07.673474Z",
            "url": "https://files.pythonhosted.org/packages/01/51/230c8efcb79590399090585c76bccc5685251260f8fbde05de7b826c764a/langswarm_backend-0.0.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-10 16:28:07",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "aekdahl",
    "github_project": "langswarm-backend",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "fastapi",
            "specs": [
                [
                    "==",
                    "0.100.0"
                ]
            ]
        },
        {
            "name": "uvicorn",
            "specs": [
                [
                    "==",
                    "0.23.1"
                ]
            ]
        }
    ],
    "lcname": "langswarm-backend"
}
        
Elapsed time: 1.58556s