pull/999/head
harshalmore31 1 month ago
parent 4cf5487cb0
commit 1bf5c3d08e

@ -1,44 +0,0 @@
# Swarms ChangeLog 5.6.8 -
The biggest update in Swarms history! We've introduced major fixes, updates, and new features to enhance your agent workflows and performance. To get the latest updates run the following:
## Installation
```bash
$ pip3 install -U swarms
```
# Log
Heres the breakdown of the latest changes:
---
### 🐞 **Fixes:**
- **[BUGF-AGENTS]:** Fixed various response issues within agents, leading to smoother performance.
- **[BUGF-MIXTURE]:** Resolved issues with the Mixture of Agents, ensuring more reliable and stable execution.
- **[CLEA-FILES]:** Removed unnecessary files, resulting in a significant speed boost and cleaner environment.
---
### 🛠 **Updates:**
- **[REFA-MODULES]:** Refactored the `swarms.models` module into its own package: `swarm_models` for improved code organization.
- **[CLEA-AGENTS]:** Cleaned up tool logic in the `agents` class for streamlined and efficient operations.
---
### ✨ **New Features:**
- **[FEAT-SWARMS]:** Introduced JSON outputs for `AgentRearrange`, `SpreadsheetSwarm`, and other swarms, improving data handling.
- **[FEAT-AGENTS]:** Added YAML file support for creating agents, making the setup process simpler than ever.
- **[FEAT-METADATA]:** Enhanced the `Agent` class with JSON metadata output, supporting OpenAI-like API responses with `output_type="json"` and `return_step_meta=True`.
- **[FEAT-FOREST]:** Released `ForestSwarm`, a new architecture that clusters agents into trees, enabling precise task execution.
- **[FEAT-REGISTRY]:** Fully implemented `AgentRegistry`, allowing you to store multiple agents for future use.
---
### 🚀 **Performance Enhancements:**
- **[PERF-AGENTS]:** Accelerated agent execution by **4x**, with a **10x** boost coming soon, powered by our Rust backend.
- **[PERF-ARCH]:** Optimized multi-threading, concurrency, and asynchrony in swarm architectures, making them faster than ever.
---
**Ready to dive in?** Get started now: [https://buff.ly/444kDjA](https://buff.ly/444kDjA)

@ -1,119 +0,0 @@
# Swarms 5.8.1 Feature Documentation
## 1. Enhanced Command Line Interface (CLI)
### 1.1 Integrated Onboarding Process
```bash
$ swarms onboarding
```
### 1.2 Run Agents Command
```bash
$ swarms run-agents --yaml-file agents.yaml
```
This command allows users to execute multiple agents defined in a YAML file. Here's the process:
1. The command reads the specified YAML file (`agents.yaml` in this case).
2. It parses the YAML content, extracting the configuration for each agent.
3. For each agent defined in the YAML:
- It creates an instance of the agent with the specified parameters.
- It sets up the agent's environment (model, temperature, max tokens, etc.).
- It assigns the given task to the agent.
- It executes the agent, respecting parameters like `max_loops`, `autosave`, and `verbose`.
4. The results from all agents are collected and presented to the user.
The YAML file structure allows users to define multiple agents with different configurations, making it easy to run complex, multi-agent tasks from the command line.
### 1.3 Generate Prompt Feature
```bash
$ swarms generate-prompt --prompt "Create a marketing strategy for a new product launch"
```
This feature leverages Swarms' language model to generate expanded or refined prompts:
1. The command takes the user's input prompt as a starting point.
2. It likely sends this prompt to a pre-configured language model (possibly GPT-4 or a similar model).
3. The model then generates an expanded or more detailed version of the prompt.
4. The generated prompt is returned to the user, possibly with options to further refine or save it.
This feature can help users create more effective prompts for their agents or other AI tasks.
## 2. New Prompt Management System
### 2.1 Prompt Class
The new `Prompt` class provides a robust system for managing and versioning prompts:
```python
from swarms import Prompt
marketing_prompt = Prompt(content="Initial marketing strategy draft", autosave=True)
print(marketing_prompt.get_prompt())
```
Key features of the `Prompt` class:
1. **Initialization**: The class is initialized with initial content and an `autosave` option.
2. **Editing**:
```python
marketing_prompt.edit_prompt("Updated marketing strategy with social media focus")
```
This method updates the prompt content and, if `autosave` is True, automatically saves the new version.
3. **Retrieval**:
```python
current_content = marketing_prompt.get_prompt()
```
This method returns the current content of the prompt.
4. **Version History**:
```python
print(f"Edit history: {marketing_prompt.edit_history}")
```
The class maintains a history of edits, allowing users to track changes over time.
5. **Rollback**:
```python
marketing_prompt.rollback(1)
```
This feature allows users to revert to a previous version of the prompt.
6. **Duplicate Prevention**:
The class includes logic to prevent duplicate edits, raising a `ValueError` if an attempt is made to save the same content twice in a row.
This system provides a powerful way to manage prompts, especially for complex projects where prompt engineering and iteration are crucial.
## 3. Upcoming Features Preview
### 3.1 Enhanced Agent Execution Capabilities
The preview code demonstrates planned enhancements for agent execution:
```python
from swarms import Agent, ExecutionEnvironment
my_agent = Agent(name="data_processor")
cpu_env = ExecutionEnvironment(type="cpu", cores=4)
my_agent.run(environment=cpu_env)
gpu_env = ExecutionEnvironment(type="gpu", device_id=0)
my_agent.run(environment=gpu_env)
fractional_env = ExecutionEnvironment(type="fractional", cpu_fraction=0.5, gpu_fraction=0.3)
my_agent.run(environment=fractional_env)
```
This upcoming feature will allow for more fine-grained control over the execution environment:
1. **CPU Execution**: Users can specify the number of CPU cores to use.
2. **GPU Execution**: Allows selection of a specific GPU device.
3. **Fractionalized Execution**: Enables partial allocation of CPU and GPU resources.
These features will provide users with greater flexibility in resource allocation, potentially improving performance and allowing for more efficient use of available hardware.

@ -1,59 +0,0 @@
# Swarms 6.0.0 - Performance & Reliability Update 🚀
We're excited to announce the release of Swarms 6.0.0, bringing significant improvements to performance, reliability, and developer experience. This release focuses on streamlining core functionalities while enhancing the overall stability of the framework.
## 📦 Installation
```bash
pip3 install -U swarms
```
## 🌟 Highlights
### Agent Enhancements
- **Improved RAG Performance**: Significant improvements to Retrieval-Augmented Generation capabilities
- **Enhanced Prompt Generation**: Auto-generate prompt now incorporates name, description, and system prompt for more contextual interactions
- **Streamlined Architecture**: Cleaned up unused code for better performance and maintainability
- **Simplified State Management**: Consolidated state management methods into a single `load()` function
### Tools & Execution
- **Optimized Environment Management**: Fixed multiple environment instantiation issue
- Environments now initialize once during `__init__`
- **New SwarmRouter Function**: Simplified routing mechanism
- Returns consolidated string output from all agents
- Improved coordination between swarm components
## 💪 Performance Improvements
- Faster execution times
- Reduced memory footprint
- More reliable logging system
- Lightweight and efficient codebase
## 🤝 Join Our Community
### We're Hiring!
Join our growing team! We're currently looking for:
- Agent Engineers
- Developer Relations
- Infrastructure Engineers
- And more!
### Get Involved
- ⭐ Star our repository
- 🔄 Fork the project
- 🛠 Submit pull requests
- 🐛 Report issues
- 💡 Share your ideas
### Contact & Support
- 📧 Email: kye@swarms.world
- 🔗 Issues: [GitHub Issues](https://github.com/kyegomez/swarms/issues)
## 🔜 What's Next?
Have ideas for features, bug fixes, or improvements? We'd love to hear from you! Reach out through our GitHub issues or email us directly.
---
*Thank you to all our contributors and users who make Swarms better every day. Together, we're building the future of swarm intelligence.*
#SwarmAI #OpenSource #AI #MachineLearning

@ -1,59 +0,0 @@
# Swarms 6.0.0 - Performance & Reliability Update 🚀
We're excited to announce the release of Swarms 6.0.0, bringing significant improvements to performance, reliability, and developer experience. This release focuses on streamlining core functionalities while enhancing the overall stability of the framework.
## 📦 Installation
```bash
pip3 install -U swarms
```
## 🌟 Highlights
### Agent Enhancements
- **Improved RAG Performance**: Significant improvements to Retrieval-Augmented Generation capabilities
- **Enhanced Prompt Generation**: Auto-generate prompt now incorporates name, description, and system prompt for more contextual interactions
- **Streamlined Architecture**: Cleaned up unused code for better performance and maintainability
- **Simplified State Management**: Consolidated state management methods into a single `load()` function
### Tools & Execution
- **Optimized Environment Management**: Fixed multiple environment instantiation issue
- Environments now initialize once during `__init__`
- **New SwarmRouter Function**: Simplified routing mechanism
- Returns consolidated string output from all agents
- Improved coordination between swarm components
## 💪 Performance Improvements
- Faster execution times
- Reduced memory footprint
- More reliable logging system
- Lightweight and efficient codebase
## 🤝 Join Our Community
### We're Hiring!
Join our growing team! We're currently looking for:
- Agent Engineers
- Developer Relations
- Infrastructure Engineers
- And more!
### Get Involved
- ⭐ Star our repository
- 🔄 Fork the project
- 🛠 Submit pull requests
- 🐛 Report issues
- 💡 Share your ideas
### Contact & Support
- 📧 Email: kye@swarms.world
- 🔗 Issues: [GitHub Issues](https://github.com/kyegomez/swarms/issues)
## 🔜 What's Next?
Have ideas for features, bug fixes, or improvements? We'd love to hear from you! Reach out through our GitHub issues or email us directly.
---
*Thank you to all our contributors and users who make Swarms better every day. Together, we're building the future of swarm intelligence.*
#SwarmAI #OpenSource #AI #MachineLearning

@ -1,90 +0,0 @@
# 🚀 Swarms 5.9.2 Release Notes
### 🎯 Major Features
#### Concurrent Agent Execution Suite
We're excited to introduce a comprehensive suite of agent execution methods to supercharge your multi-agent workflows:
- `run_agents_concurrently`: Execute multiple agents in parallel with optimal resource utilization
- `run_agents_concurrently_async`: Asynchronous execution for improved performance
- `run_single_agent`: Streamlined single agent execution
- `run_agents_concurrently_multiprocess`: Multi-process execution for CPU-intensive tasks
- `run_agents_sequentially`: Sequential execution with controlled flow
- `run_agents_with_different_tasks`: Assign different tasks to different agents
- `run_agent_with_timeout`: Time-bounded agent execution
- `run_agents_with_resource_monitoring`: Monitor and manage resource usage
### 📚 Documentation
- Comprehensive documentation added for all new execution methods
- Updated examples and usage patterns
- Enhanced API reference
### 🛠️ Improvements
- Tree swarm implementation fixes
- Workspace directory now automatically set to `agent_workspace`
- Improved error handling and stability
## Quick Start
```python
from swarms import Agent, run_agents_concurrently, run_agents_with_timeout, run_agents_with_different_tasks
# Initialize multiple agents
agents = [
Agent(
agent_name=f"Analysis-Agent-{i}",
system_prompt="You are a financial analysis expert",
llm=model,
max_loops=1
)
for i in range(5)
]
# Run agents concurrently
task = "Analyze the impact of rising interest rates on tech stocks"
outputs = run_agents_concurrently(agents, task)
# Example with timeout
outputs_with_timeout = run_agents_with_timeout(
agents=agents,
task=task,
timeout=30.0,
batch_size=2
)
# Run different tasks
task_pairs = [
(agents[0], "Analyze tech stocks"),
(agents[1], "Analyze energy stocks"),
(agents[2], "Analyze retail stocks")
]
different_outputs = run_agents_with_different_tasks(task_pairs)
```
## Installation
```bash
pip3 install -U swarms
```
## Coming Soon
- 🌟 Auto Swarm Builder: Automatically construct and configure entire swarms from a single task specification (in development)
- Auto Prompt Generator for thousands of agents (in development)
## Community
We believe in the power of community-driven development. Help us make Swarms better!
- ⭐ Star our repository: https://github.com/kyegomez/swarms
- 🔄 Fork the project and contribute your improvements
- 🤝 Join our growing community of contributors
## Bug Fixes
- Fixed Tree Swarm implementation issues
- Resolved workspace directory configuration problems
- General stability improvements
---
For detailed documentation and examples, visit our [GitHub repository](https://github.com/kyegomez/swarms).
Let's build the future of multi-agent systems together! 🚀

@ -6,7 +6,6 @@ from typing import Dict, List, Optional
from qdrant_client import QdrantClient
from qdrant_client.http import models
from qdrant_client.http.models import Distance, VectorParams
from swarm_models import Anthropic
from swarms import Agent
@ -172,14 +171,14 @@ memory = QdrantMemory(
)
# Model
model = Anthropic(anthropic_api_key=os.getenv("ANTHROPIC_API_KEY"))
# model = Anthropic(anthropic_api_key=os.getenv("ANTHROPIC_API_KEY"))
# Initialize the agent with Qdrant memory
agent = Agent(
agent_name="Financial-Analysis-Agent",
system_prompt="Agent system prompt here",
agent_description="Agent performs financial analysis.",
llm=model,
model_name="gpt-4o-mini",
long_term_memory=memory,
)

@ -286,13 +286,13 @@ class Agent:
Examples:
>>> from swarms import Agent
>>> agent = Agent(llm=llm, max_loops=1, model_name="gpt-4o")
>>> agent = Agent(model_name="gpt-4o", max_loops=1)
>>> response = agent.run("Generate a report on the financials.")
>>> print(response)
>>> # Generate a report on the financials.
>>> # Real-time streaming example
>>> agent = Agent(llm=llm, max_loops=1, streaming_on=True)
>>> agent = Agent(model_name="gpt-4o", max_loops=1, streaming_on=True)
>>> response = agent.run("Tell me a long story.") # Will stream in real-time
>>> print(response) # Final complete response

Loading…
Cancel
Save