AgentX-Dev 3.5.0__tar.gz → 3.6.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/CHANGELOG.md +76 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/PKG-INFO +47 -6
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/README.md +45 -5
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/agentx_dev/ChatModel.py +8 -0
- agentx_dev-3.6.0/agentx_dev/Operator.py +782 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/agentx_dev/Runner/AgentRun.py +77 -10
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/agentx_dev/Runner/AsyncAgentRun.py +31 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/agentx_dev/Runner/Persistence.py +106 -35
- agentx_dev-3.6.0/agentx_dev/SubAgents.py +772 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/agentx_dev/Supervisor.py +614 -488
- agentx_dev-3.6.0/agentx_dev/SupervisorMemory.py +224 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/agentx_dev/WebTools.py +43 -3
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/agentx_dev/__init__.py +4 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/agentx_dev.egg-info/PKG-INFO +47 -6
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/agentx_dev.egg-info/SOURCES.txt +4 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/agentx_dev.egg-info/requires.txt +1 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/examples/agentic_rag_demo.py +270 -270
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/examples/async_quickstart.py +81 -81
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/examples/chatbot_example.py +206 -206
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/examples/mcp_github_triage_demo.py +37 -52
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/examples/orchestration_demo.py +441 -440
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/examples/planner_example.py +93 -93
- agentx_dev-3.6.0/examples/subagents_demo.py +195 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/examples/supervisor_codebase_analysis_demo.py +1 -1
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/examples/sync_quickstart.py +75 -75
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/examples/v3_1_1_features_demo.py +246 -246
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/examples/v3_1_comprehensive_demo.py +446 -446
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/examples/v3_1_features_demo.py +260 -260
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/pyproject.toml +2 -1
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/AGENTX.md +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/CONTRIBUTING.md +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/LICENSE +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/MANIFEST.in +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/agentx_dev/Agents/Agent.py +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/agentx_dev/Agents/__init__.py +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/agentx_dev/AsyncTools.py +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/agentx_dev/AutoSetup.py +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/agentx_dev/Cache.py +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/agentx_dev/Compiler.py +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/agentx_dev/Config.py +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/agentx_dev/DefaultTools.py +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/agentx_dev/Embeddings.py +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/agentx_dev/Evals.py +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/agentx_dev/Handoffs.py +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/agentx_dev/Loader.py +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/agentx_dev/MCP.py +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/agentx_dev/Media.py +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/agentx_dev/Memory.py +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/agentx_dev/Observability.py +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/agentx_dev/Planner.py +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/agentx_dev/Runner/__init__.py +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/agentx_dev/Runner/promptTemplate.yaml +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/agentx_dev/Session.py +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/agentx_dev/Splitters.py +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/agentx_dev/Streaming.py +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/agentx_dev/Tools.py +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/agentx_dev/VectorStores/__init__.py +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/agentx_dev/VectorStores/chroma_store.py +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/agentx_dev/VectorStores/pg_store.py +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/agentx_dev/VectorStores/qdrant_store.py +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/agentx_dev/resources/__init__.py +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/agentx_dev/resources/promptTemplate.yaml +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/agentx_dev.egg-info/dependency_links.txt +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/agentx_dev.egg-info/top_level.txt +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/examples/README.md +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/examples/async_example.py +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/examples/auto_features_example.py +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/examples/caching_example.py +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/examples/complete_example.py +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/examples/concurrent_example.py +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/examples/concurrent_tool_example.py +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/examples/file_agent_demo.py +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/examples/function_calling_demo.py +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/examples/mcp_demo.py +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/examples/observability_example.py +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/examples/robust_link_scraper.py +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/examples/supervisor_example.py +0 -0
- {agentx_dev-3.5.0 → agentx_dev-3.6.0}/setup.cfg +0 -0
|
@@ -4,6 +4,82 @@ All notable changes to `agentx-dev` are documented here. Format loosely
|
|
|
4
4
|
follows [Keep a Changelog](https://keepachangelog.com/); versioning is
|
|
5
5
|
[Semver](https://semver.org/).
|
|
6
6
|
|
|
7
|
+
## [3.6.0] - 2026-10-09
|
|
8
|
+
|
|
9
|
+
Sub-agents: the Supervisor can create its own helpers. Opt-in, with the behavior changes listed below.
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- **Inline helpers**: a plan step can carry `new_agent` (name, free-form
|
|
14
|
+
instructions, tools). The helper runs the step, is reused by name, and is
|
|
15
|
+
discarded when the run ends. Recovery plans can define a replacement for a
|
|
16
|
+
stuck step.
|
|
17
|
+
- **`delegate` tool**: specialists hand a side job to a fresh sub-agent (clean
|
|
18
|
+
context) and get a short summary back; refusals are plain text and a helper
|
|
19
|
+
that fails comes back as a tool error the caller's stuck logic sees.
|
|
20
|
+
`AgentRunner(..., delegation=SpawnConfig(...))` gives a standalone runner the
|
|
21
|
+
same tool; `runner.spawned` lists what it created.
|
|
22
|
+
- **One ceiling**: `SpawnConfig(capabilities=..., tools=..., max_spawns=...,
|
|
23
|
+
max_depth=...)` bounds every helper; spawns inside it need no approval and
|
|
24
|
+
over-asks are clipped, not fatal. New read-only `files_read` preset.
|
|
25
|
+
- **`AsyncSupervisor(spawn_config=...)`**: async parity; spawned steps run in
|
|
26
|
+
parallel. `AsyncAgentRunner` gained `system_addendum=`.
|
|
27
|
+
- `SupervisorResult.spawned`, `spawn` and `delegate_result` stream events,
|
|
28
|
+
`AgentSpec`, `ToolRegistry.unregister`, `AgentRunner.add_tool` /
|
|
29
|
+
`remove_tool`.
|
|
30
|
+
- New guide: Sub-agents.
|
|
31
|
+
- **Ask the operator**: `Supervisor(ask_user=True | function)` lets the planner ask for facts the task
|
|
32
|
+
leaves out and gives every agent an `ask_user` tool. `True` uses a built-in asker that works in
|
|
33
|
+
notebooks (the input box), terminals and IDE consoles and never blocks a headless process; a
|
|
34
|
+
function routes questions through your own channel (chatbot, backend). `max_questions`,
|
|
35
|
+
`ask_timeout`, `SupervisorResult.asked`, `question`/`answer` events,
|
|
36
|
+
`agentx_dev.ask_human_tool()`; waiting on the operator pauses the persistent deadline. The built-in prompt names who is asking (`[planner]` or the agent's name) with a raised-hand marker. Each agent
|
|
37
|
+
may ask once per run (the planner may ask several questions in its one round), and after the
|
|
38
|
+
operator answers the planner is told to do the work instead of planning another question. The
|
|
39
|
+
helper-creation instructions now say a helper can only look things up with the tools it is given
|
|
40
|
+
(this applies to every Supervisor that enables spawning).
|
|
41
|
+
- **Supervisor long-term memory**: `Supervisor(memory=store)` (any vector store: `VectorStore`, Chroma,
|
|
42
|
+
Qdrant, pgvector) gives the planner and every dispatched step the few relevant stored items as a
|
|
43
|
+
FROM MEMORY block, saves each operator answer and each completed run's final answer, and answers an
|
|
44
|
+
exact repeat of an answered question from memory (a run whose synthesis was cut off by the budget
|
|
45
|
+
saves nothing). `memory_top_k`, `memory_min_score`,
|
|
46
|
+
`memory_write`, `SupervisorResult.memory`, `memory` stream events.
|
|
47
|
+
- `web_fetch_tool(text_only=True)`: return an HTML page as readable text (scripts, styles and tags
|
|
48
|
+
removed) instead of the first 50,000 characters of raw markup, which on a modern page can hold no
|
|
49
|
+
content at all. Default off (unchanged for existing agents); the helpers a Supervisor builds use it.
|
|
50
|
+
Helpers are also told not to answer with a script unless they have a code tool, and to say what
|
|
51
|
+
they tried and what was missing.
|
|
52
|
+
- `SpawnConfig(max_iterations=15)`: the step limit for the helpers a Supervisor creates (it was fixed at 15).
|
|
53
|
+
Registered specialists keep the limit set on their own `AgentRunner`. Helpers are told their step limit
|
|
54
|
+
so they can finish with a Final_Answer in time.
|
|
55
|
+
- A helper that runs out of steps (`iteration_limit`) is retried with a note that it ran out, a short
|
|
56
|
+
recap of what it did, and an instruction to do fewer lookups; other failures keep the generic retry note.
|
|
57
|
+
- The unknown-tool error now lists the valid tools and says that a response-format name such as `React_`
|
|
58
|
+
is not a tool, so a model that called one can recover.
|
|
59
|
+
- `RunBudget` now carries a `PausableClock` (it holds a lock), so a `RunBudget` can no longer be
|
|
60
|
+
deep-copied or pickled.
|
|
61
|
+
|
|
62
|
+
### Changed
|
|
63
|
+
|
|
64
|
+
- A spawned agent no longer stays on the supervisor after the run.
|
|
65
|
+
- A spawn is no longer refused (or rerouted) because an existing specialist
|
|
66
|
+
has the same tools. The `spawn` event gained `origin`, `tools`, `dropped`,
|
|
67
|
+
`reused` and `refused`; `rerouted_from` is always `None`.
|
|
68
|
+
- A `Supervisor` / `AsyncSupervisor` with `persistence=` and no `spawn_config`
|
|
69
|
+
now allows helpers with web and read-only file access (`max_spawns=6`) and
|
|
70
|
+
gives its specialists the `delegate` tool. Pass
|
|
71
|
+
`spawn_config=SpawnConfig(enabled=False)` to opt out.
|
|
72
|
+
- A legacy spawn config (`enabled=True` with neither `capabilities` nor
|
|
73
|
+
`tools`) keeps the 3.5 approval flow and gives specialists no `delegate`
|
|
74
|
+
tool; set a ceiling to turn delegation on.
|
|
75
|
+
- The planner prompt teaches `new_agent` instead of the `__spawn__` step; old
|
|
76
|
+
`__spawn__` steps still work, but their `name` must now match
|
|
77
|
+
`[A-Za-z0-9_-]{1,40}`.
|
|
78
|
+
- Agent names starting with `__` and names of the form `delegate_<N>` are
|
|
79
|
+
reserved: a `new_agent` that uses one is dropped by plan sanitization.
|
|
80
|
+
- `SpawnConfig.max_spawns` is `Optional[int]` (unset: 3, or 6 in ceiling mode).
|
|
81
|
+
`SUPERVISOR_SPAWN_INSTRUCTION` was removed.
|
|
82
|
+
|
|
7
83
|
## [3.5.0] - 2026-10-04
|
|
8
84
|
|
|
9
85
|
Agents that keep working through errors. Opt-in; one default change (below).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: agentx-dev
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.6.0
|
|
4
4
|
Summary: A production-grade Python framework for building LLM agents. Multi-provider chat, permission-gated tools, RAG (in-mem + Chroma/Qdrant/pgvector), semantic memory, Supervisor + Handoffs multi-agent orchestration with streaming, evals harness, prompt caching, Batch API, prompt-optimizer, MCP integration.
|
|
5
5
|
Author-email: Bruce-Arhin Shadrach <brucearhin098@gmail.com>
|
|
6
6
|
License: MIT License
|
|
@@ -56,6 +56,7 @@ Requires-Dist: openpyxl>=3.1; extra == "excel"
|
|
|
56
56
|
Provides-Extra: dev
|
|
57
57
|
Requires-Dist: pytest>=7.4; extra == "dev"
|
|
58
58
|
Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
|
|
59
|
+
Requires-Dist: httpx>=0.24; extra == "dev"
|
|
59
60
|
Requires-Dist: numpy>=1.24; extra == "dev"
|
|
60
61
|
Requires-Dist: pandas>=1.5; extra == "dev"
|
|
61
62
|
Requires-Dist: openpyxl>=3.1; extra == "dev"
|
|
@@ -82,6 +83,44 @@ you can paste and run.
|
|
|
82
83
|
|
|
83
84
|
---
|
|
84
85
|
|
|
86
|
+
## What's new in 3.6 — sub-agents
|
|
87
|
+
|
|
88
|
+
A Supervisor can now create its own helpers, like Claude Code's Task tool.
|
|
89
|
+
The planner defines a helper inline (its own instructions and tools), and a
|
|
90
|
+
specialist can hand a side job to a fresh agent and get a short summary back.
|
|
91
|
+
You set the most a helper may ever do, once.
|
|
92
|
+
|
|
93
|
+
```python
|
|
94
|
+
from agentx_dev import Supervisor, SpawnConfig
|
|
95
|
+
|
|
96
|
+
supervisor = Supervisor(
|
|
97
|
+
model=model, agents=my_specialists,
|
|
98
|
+
spawn_config=SpawnConfig(enabled=True, capabilities={"web", "files_read"}),
|
|
99
|
+
)
|
|
100
|
+
result = supervisor.run("Compare the pricing pages of our three competitors")
|
|
101
|
+
print(result.spawned) # the helpers it created, with outcomes
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
| Feature | What you get |
|
|
105
|
+
|---|---|
|
|
106
|
+
| **Inline helpers** | A plan step can carry `new_agent` (name, instructions, tools). Reused by name, discarded when the run ends. |
|
|
107
|
+
| **`delegate` tool** | A specialist hands part of its work to a fresh sub-agent (clean context) and gets a summary back. |
|
|
108
|
+
| **One ceiling** | `SpawnConfig(capabilities=..., tools=..., max_spawns=..., max_depth=...)` bounds every helper. Over-asks are clipped, not fatal. |
|
|
109
|
+
| **Sync and async** | `AsyncSupervisor` takes `spawn_config=` too; spawned steps run in parallel. |
|
|
110
|
+
| **Persistent mode** | On by default with a safe ceiling (web plus read-only files); helpers share the run deadline; recovery plans can spawn a replacement. |
|
|
111
|
+
| **Ask the operator** | `Supervisor(ask_user=True)` lets the planner ask for facts the task leaves out ("which three competitors?") and gives every agent an `ask_user` tool. Works in a notebook's input box and in terminals; `ask_user=my_function` routes questions through your own channel. |
|
|
112
|
+
| **Long-term memory** | `Supervisor(memory=store)` (any vector store: `VectorStore`, Chroma, Qdrant, pgvector) gives the planner and every step the few relevant stored items, saves operator answers and finished results, and answers an exact repeat of a question from memory instead of asking again. |
|
|
113
|
+
|
|
114
|
+
[Guide](docs/guides/sub-agents.md). To let the Supervisor ask you for missing facts, see [Asking the operator](docs/guides/sub-agents.md#asking-the-operator). To keep what it learns between runs, see [Long-term memory](docs/guides/sub-agents.md#long-term-memory).
|
|
115
|
+
|
|
116
|
+
### Upgrade notes
|
|
117
|
+
|
|
118
|
+
- Nothing is on unless you configure it, except persistent supervisors (`persistence=` with no `spawn_config`), which now allow web and read-only file helpers. Pass `spawn_config=SpawnConfig(enabled=False)` to opt out.
|
|
119
|
+
- Helpers a Supervisor spawns no longer stay on it after the run.
|
|
120
|
+
- A spawn is no longer refused because an existing specialist has the same tools.
|
|
121
|
+
|
|
122
|
+
Full notes: [docs/guides/upgrading.md](docs/guides/upgrading.md).
|
|
123
|
+
|
|
85
124
|
## What's new in 3.5 — agents that keep working
|
|
86
125
|
|
|
87
126
|
Long jobs no longer end at the first wall. Turn on persistent mode and
|
|
@@ -844,14 +883,16 @@ supervisor = Supervisor(
|
|
|
844
883
|
|
|
845
884
|
Recognized capability keywords the planner can request:
|
|
846
885
|
- `"web"` — installs `web_search` + `web_fetch`.
|
|
886
|
+
- `"files_read"` — read / list / find / grep inside the sandbox (read-only).
|
|
847
887
|
- `"files"` — read / write / edit / list inside the sandbox.
|
|
848
888
|
- `"code"` — `run_python`.
|
|
849
|
-
- `"delete"` —
|
|
889
|
+
- `"delete"` — grants `delete_files` only (the `delete_path` tool inside the
|
|
890
|
+
sandbox); it adds no read or write access.
|
|
850
891
|
|
|
851
|
-
|
|
852
|
-
(
|
|
853
|
-
|
|
854
|
-
|
|
892
|
+
Since 3.6 a spawn is not refused because an existing specialist has the
|
|
893
|
+
same tools (a helper can carry its own instructions), the planner can
|
|
894
|
+
write those instructions inline, and a `capabilities=` / `tools=` ceiling
|
|
895
|
+
replaces per-spawn approval. See [Sub-agents](docs/guides/sub-agents.md).
|
|
855
896
|
|
|
856
897
|
### AsyncSupervisor
|
|
857
898
|
|
|
@@ -9,6 +9,44 @@ you can paste and run.
|
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
+
## What's new in 3.6 — sub-agents
|
|
13
|
+
|
|
14
|
+
A Supervisor can now create its own helpers, like Claude Code's Task tool.
|
|
15
|
+
The planner defines a helper inline (its own instructions and tools), and a
|
|
16
|
+
specialist can hand a side job to a fresh agent and get a short summary back.
|
|
17
|
+
You set the most a helper may ever do, once.
|
|
18
|
+
|
|
19
|
+
```python
|
|
20
|
+
from agentx_dev import Supervisor, SpawnConfig
|
|
21
|
+
|
|
22
|
+
supervisor = Supervisor(
|
|
23
|
+
model=model, agents=my_specialists,
|
|
24
|
+
spawn_config=SpawnConfig(enabled=True, capabilities={"web", "files_read"}),
|
|
25
|
+
)
|
|
26
|
+
result = supervisor.run("Compare the pricing pages of our three competitors")
|
|
27
|
+
print(result.spawned) # the helpers it created, with outcomes
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
| Feature | What you get |
|
|
31
|
+
|---|---|
|
|
32
|
+
| **Inline helpers** | A plan step can carry `new_agent` (name, instructions, tools). Reused by name, discarded when the run ends. |
|
|
33
|
+
| **`delegate` tool** | A specialist hands part of its work to a fresh sub-agent (clean context) and gets a summary back. |
|
|
34
|
+
| **One ceiling** | `SpawnConfig(capabilities=..., tools=..., max_spawns=..., max_depth=...)` bounds every helper. Over-asks are clipped, not fatal. |
|
|
35
|
+
| **Sync and async** | `AsyncSupervisor` takes `spawn_config=` too; spawned steps run in parallel. |
|
|
36
|
+
| **Persistent mode** | On by default with a safe ceiling (web plus read-only files); helpers share the run deadline; recovery plans can spawn a replacement. |
|
|
37
|
+
| **Ask the operator** | `Supervisor(ask_user=True)` lets the planner ask for facts the task leaves out ("which three competitors?") and gives every agent an `ask_user` tool. Works in a notebook's input box and in terminals; `ask_user=my_function` routes questions through your own channel. |
|
|
38
|
+
| **Long-term memory** | `Supervisor(memory=store)` (any vector store: `VectorStore`, Chroma, Qdrant, pgvector) gives the planner and every step the few relevant stored items, saves operator answers and finished results, and answers an exact repeat of a question from memory instead of asking again. |
|
|
39
|
+
|
|
40
|
+
[Guide](docs/guides/sub-agents.md). To let the Supervisor ask you for missing facts, see [Asking the operator](docs/guides/sub-agents.md#asking-the-operator). To keep what it learns between runs, see [Long-term memory](docs/guides/sub-agents.md#long-term-memory).
|
|
41
|
+
|
|
42
|
+
### Upgrade notes
|
|
43
|
+
|
|
44
|
+
- Nothing is on unless you configure it, except persistent supervisors (`persistence=` with no `spawn_config`), which now allow web and read-only file helpers. Pass `spawn_config=SpawnConfig(enabled=False)` to opt out.
|
|
45
|
+
- Helpers a Supervisor spawns no longer stay on it after the run.
|
|
46
|
+
- A spawn is no longer refused because an existing specialist has the same tools.
|
|
47
|
+
|
|
48
|
+
Full notes: [docs/guides/upgrading.md](docs/guides/upgrading.md).
|
|
49
|
+
|
|
12
50
|
## What's new in 3.5 — agents that keep working
|
|
13
51
|
|
|
14
52
|
Long jobs no longer end at the first wall. Turn on persistent mode and
|
|
@@ -771,14 +809,16 @@ supervisor = Supervisor(
|
|
|
771
809
|
|
|
772
810
|
Recognized capability keywords the planner can request:
|
|
773
811
|
- `"web"` — installs `web_search` + `web_fetch`.
|
|
812
|
+
- `"files_read"` — read / list / find / grep inside the sandbox (read-only).
|
|
774
813
|
- `"files"` — read / write / edit / list inside the sandbox.
|
|
775
814
|
- `"code"` — `run_python`.
|
|
776
|
-
- `"delete"` —
|
|
815
|
+
- `"delete"` — grants `delete_files` only (the `delete_path` tool inside the
|
|
816
|
+
sandbox); it adds no read or write access.
|
|
777
817
|
|
|
778
|
-
|
|
779
|
-
(
|
|
780
|
-
|
|
781
|
-
|
|
818
|
+
Since 3.6 a spawn is not refused because an existing specialist has the
|
|
819
|
+
same tools (a helper can carry its own instructions), the planner can
|
|
820
|
+
write those instructions inline, and a `capabilities=` / `tools=` ceiling
|
|
821
|
+
replaces per-spawn approval. See [Sub-agents](docs/guides/sub-agents.md).
|
|
782
822
|
|
|
783
823
|
### AsyncSupervisor
|
|
784
824
|
|
|
@@ -2008,6 +2008,10 @@ class Claude(BaseChatModel):
|
|
|
2008
2008
|
try:
|
|
2009
2009
|
final = stream.get_final_message()
|
|
2010
2010
|
self._record_usage(final)
|
|
2011
|
+
except CostBudgetExceeded:
|
|
2012
|
+
# The cap is a control signal, not a bookkeeping hiccup --
|
|
2013
|
+
# swallowing it here meant a streaming run never hit it.
|
|
2014
|
+
raise
|
|
2011
2015
|
except Exception as e:
|
|
2012
2016
|
logger.warning(f"Failed to record streaming usage: {e}")
|
|
2013
2017
|
finally:
|
|
@@ -2030,6 +2034,10 @@ class Claude(BaseChatModel):
|
|
|
2030
2034
|
try:
|
|
2031
2035
|
final = await stream.get_final_message()
|
|
2032
2036
|
self._record_usage(final)
|
|
2037
|
+
except CostBudgetExceeded:
|
|
2038
|
+
# The cap is a control signal, not a bookkeeping hiccup --
|
|
2039
|
+
# swallowing it here meant a streaming run never hit it.
|
|
2040
|
+
raise
|
|
2033
2041
|
except Exception as e:
|
|
2034
2042
|
logger.warning(f"Failed to record streaming usage: {e}")
|
|
2035
2043
|
finally:
|