You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+13-12Lines changed: 13 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -110,9 +110,9 @@ print(result)
110
110
|`interactive`| bool |`False`| REPL mode — prompt user for input each loop |
111
111
|`context_length`| int |`None`| Token budget; triggers compression at 90 % |
112
112
|`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|
114
114
|`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|
116
116
|`reasoning_effort`| str |`None`|`"low"`, `"medium"`, `"high"` for reasoning models |
117
117
|`thinking_tokens`| int |`None`| Extended thinking budget (Claude) |
118
118
|`output_type`| str |`"str-all-except-first"`| How to format returned output |
@@ -173,25 +173,30 @@ result = agent.run(
173
173
174
174
## Memory & Persistence (v12)
175
175
176
-
### `persistent_memory=True` (default)
176
+
### `persistent_memory=True` (opt in)
177
177
178
178
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.
179
179
180
180
```python
181
181
agent = Agent(
182
182
agent_name="ProjectAssistant",
183
183
model_name="gpt-5.4",
184
-
persistent_memory=True, # default
184
+
persistent_memory=True, #off by default; opt in
185
185
)
186
186
# First run: agent has no prior context
187
187
agent.run("My project is called Helios. Remember that.")
188
188
189
-
# New process, same agent_name → agent remembers "Helios"
| Need to switch architectures easily |`SwarmRouter`|
938
941
939
942
---
@@ -1081,8 +1084,6 @@ from swarms import Agent
1081
1084
1082
1085
**Don't instantiate heavyweight structures inside tight loops** — create agents and workflows once, reuse them across calls.
1083
1086
1084
-
**Don't pass `tools=[]` (empty list)** — pass `tools=None` instead. An empty list can confuse schema generation.
1085
-
1086
1087
**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.
1087
1088
1088
1089
**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