From 8b6d021f341d6dd766bad83fe4227fe015f96c58 Mon Sep 17 00:00:00 2001 From: Kye Gomez Date: Fri, 22 Aug 2025 09:27:35 -0700 Subject: [PATCH] fix deployment docs --- docs/deployment_solutions/overview.md | 22 ++-------- docs/protocol/overview.md | 41 +++++++------------ example.py | 1 + .../simulations/simulation_vote_example.py | 0 swarms/sims/__init__.py | 6 +++ swarms/sims/senator_assembly.py | 14 +++---- 6 files changed, 32 insertions(+), 52 deletions(-) rename simulation_vote_example.py => examples/multi_agent/simulations/simulation_vote_example.py (100%) diff --git a/docs/deployment_solutions/overview.md b/docs/deployment_solutions/overview.md index aefacd6a..e15b1a11 100644 --- a/docs/deployment_solutions/overview.md +++ b/docs/deployment_solutions/overview.md @@ -4,16 +4,10 @@ This section covers various deployment strategies for Swarms agents and multi-ag ## Deployment Types Comparison & Documentation -| Deployment Type | Use Case | Complexity | Scalability | Cost | Best For | Documentation Link | Status | -|------------------------|---------------------------|------------|-------------|--------------|----------------------------------------|------------------------------------------------------------------------------------|---------------| -| **FastAPI + Uvicorn** | REST API endpoints | Low | Medium | Low | Quick prototypes, internal tools | [FastAPI Agent API Guide](fastapi_agent_api.md) | Available | -| **Cron Jobs** | Scheduled tasks | Low | Low | Very Low | Batch processing, periodic tasks | [Cron Job Examples](../../examples/deployment_solutions/cron_job_examples/) | Available | -| **Docker Containers** | Containerized deployment | Medium | High | Low | Production, portability | [Docker Deployment Guide](docker_deployment.md) | Coming Soon | -| **Kubernetes** | Orchestrated containers | High | Very High | Medium | Enterprise, auto-scaling | [Kubernetes Deployment Guide](kubernetes_deployment.md) | Coming Soon | -| **Cloud Functions** | Serverless execution | Low | High | Pay-per-use | Event-driven, cost-effective | [Cloud Deployment Guide](cloud_deployment.md) | Coming Soon | -| **Cloud Run** | Containerized serverless | Medium | High | Pay-per-use | Production, auto-scaling | [Cloud Deployment Guide](cloud_deployment.md) | Coming Soon | -| **Traditional VMs** | Full control deployment | Medium | Medium | Medium | Custom requirements, full control | [Cloud Deployment Guide](cloud_deployment.md) | Coming Soon | - +| Deployment Type | Use Case | Complexity | Scalability | Cost | Best For | Documentation Link | Status | +|------------------------|---------------------|------------|-------------|-----------|----------------------------------|-----------------------------------------------------------------------------|------------| +| **FastAPI + Uvicorn** | REST API endpoints | Low | Medium | Low | Quick prototypes, internal tools | [FastAPI Agent API Guide](fastapi_agent_api.md) | Available | +| **Cron Jobs** | Scheduled tasks | Low | Low | Very Low | Batch processing, periodic tasks | [Cron Job Examples](../../examples/deployment_solutions/cron_job_examples/) | Available | ## Quick Start Guide @@ -38,14 +32,6 @@ This section covers various deployment strategies for Swarms agents and multi-ag - **Examples**: [Cron Job Examples](../../examples/deployment_solutions/cron_job_examples/) -### 3. Docker (Recommended for production) - -- **Best for**: Consistent deployment across environments - -- **Setup time**: 10-15 minutes - -- **Documentation**: [Docker Deployment](docker_deployment.md) - ## Deployment Considerations diff --git a/docs/protocol/overview.md b/docs/protocol/overview.md index 74445d17..49c2a8db 100644 --- a/docs/protocol/overview.md +++ b/docs/protocol/overview.md @@ -406,32 +406,21 @@ For more on the philosophy and architecture, see [Development Philosophy & Princ ## Further Reading & References -- [Swarms Docs Home](https://docs.swarms.world/en/latest/) - -- [Quickstart for Agents](https://docs.swarms.world/en/latest/swarms/agents/) - -- [Agent API Reference](https://docs.swarms.world/en/latest/swarms/structs/agent/) - -- [Tools Overview](https://docs.swarms.world/en/latest/swarms_tools/overview/) - -- [BaseTool Reference](https://docs.swarms.world/en/latest/swarms/tools/base_tool/) - -- [Reasoning Agents Overview](https://docs.swarms.world/en/latest/swarms/agents/reasoning_agents_overview/) - -- [Multi-Agent Architectures Overview](https://docs.swarms.world/en/latest/swarms/concept/swarm_architectures/) - -- [Examples Overview](https://docs.swarms.world/en/latest/examples/index/) - -- [CLI Documentation](https://docs.swarms.world/en/latest/swarms/cli/main/) - -- [Prompts Management](https://docs.swarms.world/en/latest/swarms/prompts/main/) - -- [Development Philosophy & Principles](https://docs.swarms.world/en/latest/swarms/concept/philosophy/) - -- [Understanding Swarms Architecture](https://docs.swarms.world/en/latest/swarms/concept/framework_architecture/) - -- [SIP Guidelines and Template](https://docs.swarms.world/en/latest/protocol/sip/) - +| Resource Name | Link | Description | +|-------------------------------------- |----------------------------------------------------------------------------------------|--------------------------------------------------| +| Swarms Docs Home | [Swarms Docs Home](https://docs.swarms.world/en/latest/) | Main documentation homepage | +| Quickstart for Agents | [Quickstart for Agents](https://docs.swarms.world/en/latest/swarms/agents/) | Getting started with Swarms agents | +| Agent API Reference | [Agent API Reference](https://docs.swarms.world/en/latest/swarms/structs/agent/) | API reference for Agent class | +| Tools Overview | [Tools Overview](https://docs.swarms.world/en/latest/swarms_tools/overview/) | Overview of available tools | +| BaseTool Reference | [BaseTool Reference](https://docs.swarms.world/en/latest/swarms/tools/base_tool/) | Reference for the BaseTool class | +| Reasoning Agents Overview | [Reasoning Agents Overview](https://docs.swarms.world/en/latest/swarms/agents/reasoning_agents_overview/) | Overview of reasoning agents | +| Multi-Agent Architectures Overview | [Multi-Agent Architectures Overview](https://docs.swarms.world/en/latest/swarms/concept/swarm_architectures/) | Multi-agent system architectures | +| Examples Overview | [Examples Overview](https://docs.swarms.world/en/latest/examples/index/) | Example projects and use cases | +| CLI Documentation | [CLI Documentation](https://docs.swarms.world/en/latest/swarms/cli/main/) | Command-line interface documentation | +| Prompts Management | [Prompts Management](https://docs.swarms.world/en/latest/swarms/prompts/main/) | Managing and customizing prompts | +| Development Philosophy & Principles | [Development Philosophy & Principles](https://docs.swarms.world/en/latest/swarms/concept/philosophy/) | Framework philosophy and guiding principles | +| Understanding Swarms Architecture | [Understanding Swarms Architecture](https://docs.swarms.world/en/latest/swarms/concept/framework_architecture/) | In-depth look at Swarms architecture | +| SIP Guidelines and Template | [SIP Guidelines and Template](https://docs.swarms.world/en/latest/protocol/sip/) | Swarms Improvement Proposal process and template | # Conclusion diff --git a/example.py b/example.py index c9cc03d7..f6427822 100644 --- a/example.py +++ b/example.py @@ -43,4 +43,5 @@ agent = Agent( out = agent.run( task="What are the best top 3 etfs for gold coverage?" ) + print(out) diff --git a/simulation_vote_example.py b/examples/multi_agent/simulations/simulation_vote_example.py similarity index 100% rename from simulation_vote_example.py rename to examples/multi_agent/simulations/simulation_vote_example.py diff --git a/swarms/sims/__init__.py b/swarms/sims/__init__.py index e69de29b..fa54f4da 100644 --- a/swarms/sims/__init__.py +++ b/swarms/sims/__init__.py @@ -0,0 +1,6 @@ +from swarms.sims.senator_assembly import ( + SenatorAssembly, + _create_senator_agents, +) + +__all__ = ["SenatorAssembly", "_create_senator_agents"] diff --git a/swarms/sims/senator_assembly.py b/swarms/sims/senator_assembly.py index c125e2c6..bff4ea42 100644 --- a/swarms/sims/senator_assembly.py +++ b/swarms/sims/senator_assembly.py @@ -1,11 +1,3 @@ -""" -US Senate Simulation with Specialized Senator Agents - -This simulation creates specialized AI agents representing all current US Senators, -each with detailed backgrounds, political positions, and comprehensive system prompts -that reflect their real-world characteristics, voting patterns, and policy priorities. -""" - from functools import lru_cache from typing import Dict, List, Optional @@ -3483,3 +3475,9 @@ class SenatorAssembly: self, task: str, img: Optional[str] = None, *args, **kwargs ): return self.simulate_vote_concurrent(bill_description=task) + + def batched_run( + self, + tasks: List[str], + ): + [self.run(task) for task in tasks]