Agency-swarm

Latest version: v0.4.2

Safety actively analyzes 690691 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 4

0.4.2

What's Changed
* Set Up and Apply Pre-Commit Hooks with Ruff by bonk1t in https://github.com/VRSEN/agency-swarm/pull/191
* Update the demo_gradio method to align with the new package version by bonk1t in https://github.com/VRSEN/agency-swarm/pull/197


**Full Changelog**: https://github.com/VRSEN/agency-swarm/compare/v0.4.1...v0.4.2

0.4.1

What's Changed
* update `openai` module to avoid "proxies" error by dumitruPuggle in https://github.com/VRSEN/agency-swarm/pull/190

New Contributors
* dumitruPuggle made their first contribution in https://github.com/VRSEN/agency-swarm/pull/190

**Full Changelog**: https://github.com/VRSEN/agency-swarm/compare/v0.4.0...v0.4.1

0.4.0

New Features

- **Custom Communication Flows**: Create custom `SendMessage` tool classes for agents to communicate with each other. [Learn more](https://vrsen.github.io/agency-swarm/advanced-usage/communication_flows/)
- **`async_mode` Parameter in `BaseTool.ToolConfig`**: Set `async_mode="threading"` directly in `ToolConfig` of `BaseTool` classes, instead of at the Agency level. This allows you to execute **only certain** tools asynchronously.
- **`output_as_result` Parameter in `BaseTool.ToolConfig`**: When set to `true`, `agency.get_completion` will return the tool’s output instead of the message.

Bug Fixes & Improvements

- **Thread Initialization**: Optimized by removing redundant thread fetches when loading threads from IDs.

New Contributors

- trichards1300 made their first contribution in https://github.com/VRSEN/agency-swarm/pull/70

**Full Changelog**: https://github.com/VRSEN/agency-swarm/compare/v0.3.1...v0.4.0

0.3.1

New Features

- Added `.cursorrules` file: Enables agent creation using Cursor Composer without writing any code.
- Added `refresh_from_id` parameter in the `Agent` class: Controls whether agent settings are refreshed from OpenAI when an ID is provided, useful for backend integrations based on your setup.

Bug Fixes

- Fixed strict mode unsupported on Azure issue (177).
- Improved parameter checking before running agents to reduce unnecessary OpenAI assistant updates.
- Enhanced tool classification for different uploaded files as attachments.

**Full Changelog**: [v0.3.0...v0.3.1](https://github.com/VRSEN/agency-swarm/compare/v0.3.0...v0.3.1)

0.3.0

New Features

* **Removed Instructor:** Agency Swarm no longer relies on the instructor. If a Pydantic model is passed, the `response_format` parameter will now use OpenAI's implementation. The tool creation process remains unchanged.
* **`strict` mode:** You can now enable "strict" mode when creating tools in both the `BaseTool` class and in your schema using `ToolFactory`. See [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) for more details.
* **`response_format: json_schema`:** The response format can now be set to `json_schema` in both the `Agent` class and completion methods.
* **`get_completion_parse`:** This new method allows you to pass a Pydantic model directly to the `response_format` method, which will then return a parsed model. If the request is refused, a `RefusalError` from `agency_swarm.util.errors` will be raised.
* **Verbose mode for `get_completion`:** By setting the `verbose` parameter to `true`, you can view intermediary messages, similar to Crew AI.
* **Improved error handling for existing threads:** The system will now automatically cancel any active runs within a thread and continue the conversation.

Bug Fixes

* Fixed shared state initialization when testing tools separately. 165
* Improved common error handling like connection errors and rate limits in Thread.

⚠️ Breaking Changes in `BaseTool` Class

* The `one_call_at_a_time` parameter in `BaseTool` is now located under `ToolConfig`.
* `shared_state` and `caller_agent` are now private attributes.

python
from agency_swarm.tools import BaseTool

class Action1(BaseTool):
input: str = Field(...)
one_call_at_a_time = True before

class ToolConfig:
one_call_at_a_time = True now
strict = True new

def run(self):
self.shared_state.get('param') before
self._shared_state.get('param') now


**Full Changelog:** [GitHub Compare v0.2.6...v0.2.7](https://github.com/VRSEN/agency-swarm/compare/v0.2.6...v0.2.7)

0.2.6

New Features
* **Async Tools** - You can now set `async_mode` to `tools_threading` inside the `Agency` class. With this mode on, all tool calls made by your agents will be executed in separate threads (max 4, depending on your CPU). This can signifincatly speed up the workflow when executing multiple I/O bound tasks.
* **Concurrent API Calls** - Now all API tools created with `schemas_folder` or `ToolFactory.from_openapi_schema` return coroutines, which are executed concurrently in an event loop.
* **Async `BaseTool.run` Method Support** - All async run methods in your `BaseTool` classes are now executed concurrently in an event loop as well.
* **File Search Configuration** - Added `file_search` configuration to the `Agent` class - This parameter allows you to modify the configuration of the `FileSearch` tool. Currently, only `{max_num_results: int}` is available. See [OpenAI API Docs](https://platform.openai.com/docs/api-reference/assistants/createAssistant#assistants-createassistant-tools)
* **Parallel Tool Call Controls** - Added `parallel_tool_calls` parameter to the `Agent` class - When set to `False`, the agent won't call multiple tools at once and will execute all tools sequentially.

Bug Fixes
* Fixed bug with duplicate call IDs assignment when the agent calls the same tool multiple times and the request times out. 151

**Full Changelog**: [https://github.com/VRSEN/agency-swarm/compare/v0.2.5...v0.2.6](https://github.com/VRSEN/agency-swarm/compare/v0.2.5...v0.2.6)

Page 1 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.