Skip to content

Commit 730e3d7

Browse files
committed
Merge remote-tracking branch 'origin/master' into fix/all-except-first-drops-an-agent
# Conflicts: # swarms/structs/conversation.py
2 parents d41ab96 + cfc4366 commit 730e3d7

231 files changed

Lines changed: 18329 additions & 28510 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/RELEASE.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ jobs:
2020
- uses: actions/checkout@v6
2121
- name: Install poetry
2222
run: pipx install poetry==$POETRY_VERSION
23-
- name: Set up Python 3.9
23+
- name: Set up Python 3.10
2424
uses: actions/setup-python@v6
2525
with:
26-
python-version: "3.9"
26+
python-version: "3.10"
2727
cache: "poetry"
2828
- name: Build project for distribution
2929
run: poetry build

.github/workflows/python-package.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
build:
1616

1717
runs-on: ubuntu-latest
18+
timeout-minutes: 20
1819
strategy:
1920
fail-fast: false
2021
matrix:
@@ -31,6 +32,8 @@ jobs:
3132
python -m pip install --upgrade pip
3233
python -m pip install flake8 pytest
3334
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
35+
# The tests import swarms, so the package under test has to be installed.
36+
python -m pip install -e . --no-deps
3437
- name: Lint with flake8
3538
run: |
3639
# stop the build if there are Python syntax errors or undefined names

.github/workflows/test-main-features.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
5252
- name: Install dependencies
5353
run: |
54-
poetry install --with test --no-dev
54+
poetry install --only main,test
5555
5656
- name: Set up environment variables
5757
run: |
@@ -65,7 +65,6 @@ jobs:
6565
6666
- name: Run Main Features Tests
6767
run: |
68-
cd /Users/swarms_wd/Desktop/research/swarms
6968
poetry run python tests/test_main_features.py
7069
7170
- name: Upload test results

.github/workflows/tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
jobs:
1010
test:
1111
runs-on: ubuntu-latest
12+
timeout-minutes: 20
1213

1314
steps:
1415
- uses: actions/checkout@v6

CLAUDE.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ print(result)
110110
| `interactive` | bool | `False` | REPL mode — prompt user for input each loop |
111111
| `context_length` | int | `None` | Token budget; triggers compression at 90 % |
112112
| `context_compression` | bool | `True` | Auto-summarise when near context limit (v12) |
113-
| `persistent_memory` | bool | `True` | Read/write MEMORY.md across restarts (v12) |
113+
| `persistent_memory` | bool | `False` | Read/write MEMORY.md across restarts (v12); opt in explicitly |
114114
| `temperature` | float | `0.5` | Sampling temperature |
115-
| `max_tokens` | int | `4096` | Max tokens per LLM call |
115+
| `max_tokens` | int | model's max output | Max tokens per LLM call. Unset resolves to the model's own output limit |
116116
| `reasoning_effort` | str | `None` | `"low"`, `"medium"`, `"high"` for reasoning models |
117117
| `thinking_tokens` | int | `None` | Extended thinking budget (Claude) |
118118
| `output_type` | str | `"str-all-except-first"` | How to format returned output |
@@ -173,25 +173,30 @@ result = agent.run(
173173

174174
## Memory & Persistence (v12)
175175

176-
### `persistent_memory=True` (default)
176+
### `persistent_memory=True` (opt in)
177177

178178
On startup the agent reads `{workspace}/agents/{agent_name}/MEMORY.md` and injects it as a system preamble. On each response it appends to that file. State survives process restarts automatically.
179179

180180
```python
181181
agent = Agent(
182182
agent_name="ProjectAssistant",
183183
model_name="gpt-5.4",
184-
persistent_memory=True, # default
184+
persistent_memory=True, # off by default; opt in
185185
)
186186
# First run: agent has no prior context
187187
agent.run("My project is called Helios. Remember that.")
188188

189-
# New process, same agent_name → agent remembers "Helios"
190-
agent2 = Agent(agent_name="ProjectAssistant", model_name="gpt-5.4")
189+
# New process, same agent_name → agent remembers "Helios".
190+
# persistent_memory must be set here too; it is False by default.
191+
agent2 = Agent(
192+
agent_name="ProjectAssistant",
193+
model_name="gpt-5.4",
194+
persistent_memory=True,
195+
)
191196
agent2.run("What is my project called?")
192197
```
193198

194-
### `persistent_memory=False`
199+
### `persistent_memory=False` (default)
195200

196201
Fully stateless — no disk reads or writes. Use for short, isolated tasks where carry-over would be harmful.
197202

@@ -502,10 +507,8 @@ result = router.run("Write a blog post about transformer architectures.")
502507
| `"HeavySwarm"` | Intensive multi-loop deep analysis |
503508
| `"RoundRobin"` | Round-robin task distribution |
504509
| `"PlannerWorkerSwarm"` | Planner + worker delegation |
505-
| `"BatchedGridWorkflow"` | Grid-based batch execution |
506510
| `"LLMCouncil"` | LLM-based council decisions |
507511
| `"AutoSwarmBuilder"` | Auto-configures everything |
508-
| `"auto"` | Router selects swarm_type automatically |
509512

510513
---
511514

@@ -933,7 +936,7 @@ agent = Agent(
933936
| High-stakes ruling with deliberation | `CouncilAsAJudge` |
934937
| Structured adversarial debate | `DebateWithJudge` |
935938
| Deep research, many loops | `HeavySwarm` |
936-
| Don't know yet / rapid prototyping | `AutoSwarmBuilder` or `SwarmRouter(swarm_type="auto")` |
939+
| Don't know yet / rapid prototyping | `AutoSwarmBuilder` |
937940
| Need to switch architectures easily | `SwarmRouter` |
938941

939942
---
@@ -1081,8 +1084,6 @@ from swarms import Agent
10811084

10821085
**Don't instantiate heavyweight structures inside tight loops** — create agents and workflows once, reuse them across calls.
10831086

1084-
**Don't pass `tools=[]` (empty list)** — pass `tools=None` instead. An empty list can confuse schema generation.
1085-
10861087
**Don't use `streaming_on=True` and `streaming_callback` together on the same agent**`streaming_on` streams to stdout; `streaming_callback` streams to your function. Pick one.
10871088

10881089
**Don't set `context_compression=False` on very long autonomous sessions** — without compression the agent will eventually hit the context limit and raise an error.

0 commit comments

Comments
 (0)