roboz 0.1.2.dev6__tar.gz → 0.1.2.dev8__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.
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/CHANGELOG.md +53 -14
- roboz-0.1.2.dev8/PKG-INFO +283 -0
- roboz-0.1.2.dev8/README.md +254 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/pyproject.toml +2 -2
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/agent/__init__.py +2 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/agent/_prompts.py +22 -3
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/agent/core.py +159 -104
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/deployment.py +17 -19
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/exceptions.py +5 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/llm/completion.py +89 -10
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/llm/endpoints.py +5 -5
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/models/__init__.py +4 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/models/core.py +24 -0
- roboz-0.1.2.dev8/src/roboz/models/messages.py +53 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/runtime/io.py +22 -12
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/tooling/_prompts.py +1 -1
- roboz-0.1.2.dev6/PKG-INFO +0 -270
- roboz-0.1.2.dev6/README.md +0 -241
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/.gitignore +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/LICENSE +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/__init__.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/__init__.pyi +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/_naming.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/agent/_execution_context.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/agent/_identifiers.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/agent/_notifications.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/agent/_tool_observer.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/agent/background_agent.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/agent/prompt_agent_tool.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/agent/subagent.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/dependencies.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/llm/__init__.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/llm/_diagnostics.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/llm/_retry.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/llm/_truncation.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/llm/binding.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/llm/calls.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/llm/openai_compatible.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/llm/openrouter.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/llm/prompts.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/models/_schema.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/models/_serialization.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/models/_telemetry.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/models/truncation.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/py.typed +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/runtime/__init__.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/runtime/_environment.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/runtime/_external.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/runtime/_logging.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/runtime/_paths.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/runtime/events.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/runtime/observability.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/runtime/persistence/__init__.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/runtime/persistence/activity.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/runtime/persistence/schema.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/runtime/pipe.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/runtime/sinks.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/skill/__init__.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/skill/_prompts.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/skill/core.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/tooling/__init__.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/tooling/_protocols.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/tooling/_typing.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/tooling/context.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/tooling/core.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/tooling/decorators.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/tools/__init__.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/tools/_identifiers.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/tools/control.py +0 -0
- {roboz-0.1.2.dev6 → roboz-0.1.2.dev8}/src/roboz/tools/interaction.py +0 -0
|
@@ -2,13 +2,52 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.1.2.dev8 - 2026-09-20
|
|
6
|
+
|
|
7
|
+
- Breaking: remove the legacy agent master tool. Model-driven agents run
|
|
8
|
+
their configured default tools followed by the built-in `prompt_agent` tool;
|
|
9
|
+
deterministic agents require and run only their configured default tools.
|
|
10
|
+
Use `default_tools` to configure deterministic steps instead of relying on
|
|
11
|
+
the removed `master_tool` attribute.
|
|
12
|
+
|
|
13
|
+
- Show every displayed tool's external dependency IDs and kinds in
|
|
14
|
+
`Agent.show_agent_info()`.
|
|
15
|
+
|
|
16
|
+
## 0.1.2.dev7 - 2026-09-20
|
|
17
|
+
|
|
18
|
+
- Breaking: replace the `is_agentic` boolean with the string-valued
|
|
19
|
+
`AgentMode.DETERMINISTIC`, `.STEERABLE`, or `.AUTONOMOUS` enum (the default
|
|
20
|
+
remains steerable). Autonomous agents use model-driven scheduling without a
|
|
21
|
+
user-input tool or direct user-interaction sidecar; their tools communicate
|
|
22
|
+
through the event pipe. Remove `interaction_mode` arguments and
|
|
23
|
+
`set_interaction_mode` calls: invocation uses a bound host channel, defaulting
|
|
24
|
+
to CLI, and restores the previous binding automatically. Registering a
|
|
25
|
+
`UserIO` adapter selects `Output.API` for the binding's lifetime.
|
|
26
|
+
`AgentMode` now lives in `roboz.models`; the existing `roboz.agent` export
|
|
27
|
+
remains available for compatibility.
|
|
28
|
+
|
|
29
|
+
- Run each configured default tool exactly once per cycle for deterministic agents.
|
|
30
|
+
Model-driven agents retain their master-tool step.
|
|
31
|
+
|
|
32
|
+
- Filter conversation history with `roboz.models.filter_messages` by role,
|
|
33
|
+
requested action, or result caller while retaining message order and metadata.
|
|
34
|
+
|
|
35
|
+
- Call `get_completion(endpoint=..., messages=...)` directly without an API
|
|
36
|
+
callback. `MockLLMEndpoint` now accepts literal text responses as well as JSON
|
|
37
|
+
objects and exceptions.
|
|
38
|
+
- Breaking: completions without an output model or tool list now return raw text
|
|
39
|
+
verbatim instead of attempting action validation. Supply `LlmOutputModel=...`
|
|
40
|
+
or `active_tools=...` to retain structured dictionary results and repair retries.
|
|
41
|
+
Endpoint and callback arguments are mutually exclusive. See the
|
|
42
|
+
[completion guide](https://github.com/Tachion-Oy/roboz/blob/roboz-v0.1.2.dev7/docs/tool-authoring.md#standalone-llm-backed-tools).
|
|
43
|
+
|
|
5
44
|
## 0.1.2.dev6 - 2026-09-15
|
|
6
45
|
|
|
7
46
|
- Breaking: make the `roboz` root a lazy authoring facade. It now exports only
|
|
8
47
|
`Agent`, `Skill`, `Tool`, `Factory`, `tool`, and `factory` alongside discoverable
|
|
9
48
|
domain namespaces. Import models from `roboz.models`, agent helpers from
|
|
10
49
|
`roboz.agent`, built-in tools from `roboz.tools`, and context protocols from
|
|
11
|
-
`roboz.tooling`. See [the import migration guide](docs/imports.md).
|
|
50
|
+
`roboz.tooling`. See [the import migration guide](https://github.com/Tachion-Oy/roboz/blob/roboz-v0.1.2.dev7/docs/imports.md).
|
|
12
51
|
|
|
13
52
|
## 0.1.2.dev5 - 2026-09-13
|
|
14
53
|
|
|
@@ -28,7 +67,7 @@
|
|
|
28
67
|
stay side-effect free. Endpoints support explicit early `materialize()` calls
|
|
29
68
|
while preserving their identity; prompt contexts delegate initialization.
|
|
30
69
|
Breaking: OpenAI-compatible client protocols now require `close() -> None` for
|
|
31
|
-
typed cleanup. See [the lifecycle contract](docs/dependency-primitives.md).
|
|
70
|
+
typed cleanup. See [the lifecycle contract](https://github.com/Tachion-Oy/roboz/blob/roboz-v0.1.2.dev7/docs/dependency-primitives.md).
|
|
32
71
|
|
|
33
72
|
- Make resource-inspection declarations explicit: aggregate contexts and agents
|
|
34
73
|
implement the `HasExternalDependencies` protocol, renamed from `Context` with
|
|
@@ -44,20 +83,20 @@
|
|
|
44
83
|
share supplied state. Agent inspection uses live tool methods, and deployment
|
|
45
84
|
builders use the same bindings. Restore top-level agent, skill, and built-in
|
|
46
85
|
tool exports; removed dependency and `Ctx` APIs stay removed. See
|
|
47
|
-
[the primitive migration](docs/dependency-primitives.md).
|
|
86
|
+
[the primitive migration](https://github.com/Tachion-Oy/roboz/blob/roboz-v0.1.2.dev7/docs/dependency-primitives.md).
|
|
48
87
|
|
|
49
88
|
- Breaking: core endpoints require synchronous OpenAI-compatible clients instead
|
|
50
89
|
of an untyped client. Client methods and request controls are checked statically;
|
|
51
90
|
the real `openai.OpenAI` client satisfies the protocols without a wrapper or an
|
|
52
91
|
SDK dependency in core. Replace placeholder or incompatible clients with a
|
|
53
|
-
conforming chat/transcription client. See [the client contract](docs/dependency-primitives.md).
|
|
92
|
+
conforming chat/transcription client. See [the client contract](https://github.com/Tachion-Oy/roboz/blob/roboz-v0.1.2.dev7/docs/dependency-primitives.md).
|
|
54
93
|
|
|
55
94
|
- Breaking: external resource implementations must provide `check() -> bool` for
|
|
56
95
|
explicit availability checks. Executables check PATH; core endpoints use model
|
|
57
96
|
discovery without generating output. Results are uncached, absent resources
|
|
58
97
|
return `False`, and check errors propagate. Binding, copying, and inspection
|
|
59
98
|
never invoke checks. Plain contexts need no check method. See
|
|
60
|
-
[resource inspection and availability](docs/dependency-primitives.md).
|
|
99
|
+
[resource inspection and availability](https://github.com/Tachion-Oy/roboz/blob/roboz-v0.1.2.dev7/docs/dependency-primitives.md).
|
|
61
100
|
|
|
62
101
|
- Accept any concretely typed factory context, including plain objects and lists.
|
|
63
102
|
Contexts without resource inspection are passed through unchanged and their
|
|
@@ -67,7 +106,7 @@
|
|
|
67
106
|
retaining their identity and client for execution and inspection. Endpoint
|
|
68
107
|
request helpers and the selector now use concrete endpoints; lazy construction
|
|
69
108
|
and companion migrations remain deferred. Scripted endpoints report no external
|
|
70
|
-
resources. See [typed contexts and resource inspection](docs/dependency-primitives.md).
|
|
109
|
+
resources. See [typed contexts and resource inspection](https://github.com/Tachion-Oy/roboz/blob/roboz-v0.1.2.dev7/docs/dependency-primitives.md).
|
|
71
110
|
- Fix `@factory()` input inference so parenthesized factories retain the same
|
|
72
111
|
concrete input, output, and context types as bare `@factory` declarations.
|
|
73
112
|
|
|
@@ -78,7 +117,7 @@
|
|
|
78
117
|
stay in `roboz.dependencies`; the top-level API now exposes only data and
|
|
79
118
|
tool/factory/context primitives. Remove legacy dependency bases, lazy/reference
|
|
80
119
|
helpers, and checker registration. Agent, built-in tool, and companion consumers
|
|
81
|
-
remain unmigrated; this checkpoint is not release-ready. See [typed contexts and resource inspection](docs/dependency-primitives.md)
|
|
120
|
+
remain unmigrated; this checkpoint is not release-ready. See [typed contexts and resource inspection](https://github.com/Tachion-Oy/roboz/blob/roboz-v0.1.2.dev7/docs/dependency-primitives.md)
|
|
82
121
|
for the contract, removed APIs, and migration boundary.
|
|
83
122
|
|
|
84
123
|
## 0.1.2.dev4 - 2026-09-12
|
|
@@ -106,7 +145,7 @@
|
|
|
106
145
|
and background agents start through default tools. Construct generic
|
|
107
146
|
definitions directly with `DeployableAgent(...)`.
|
|
108
147
|
Sandbox-aware `Deployment` lives in `roboshed.deployments`, not core.
|
|
109
|
-
See
|
|
148
|
+
See [the archived agent migration guide](https://github.com/Tachion-Oy/roboz/blob/roboz-v0.1.2.dev7/docs/agent-factories.md) for migration.
|
|
110
149
|
|
|
111
150
|
## 0.1.2.dev2 - 2026-09-09
|
|
112
151
|
|
|
@@ -116,7 +155,7 @@
|
|
|
116
155
|
|
|
117
156
|
- Breaking: move dependency primitives from `roboz.tooling.dependencies` and
|
|
118
157
|
`roboz.tooling` to `roboz.dependencies`. Update those imports; the existing
|
|
119
|
-
top-level `roboz` authoring API remains available. See
|
|
158
|
+
top-level `roboz` authoring API remains available. See [the archived context migration guide](https://github.com/Tachion-Oy/roboz/blob/roboz-v0.1.2.dev7/docs/context-migration.md).
|
|
120
159
|
|
|
121
160
|
- Add `DependencyRoute` for live caller-owned selections. Materialization and discovery delegate to the current target without introducing a separate identity or caching the selection.
|
|
122
161
|
|
|
@@ -124,11 +163,11 @@
|
|
|
124
163
|
Capabilities own their tool-specific endpoint choices and receive the agent
|
|
125
164
|
endpoint as a fallback, independently of runtime controls. Lazy/live
|
|
126
165
|
references retain identity and deferred resolution. See
|
|
127
|
-
|
|
166
|
+
[the archived agent migration guide](https://github.com/Tachion-Oy/roboz/blob/roboz-v0.1.2.dev7/docs/agent-factories.md) for builder migration.
|
|
128
167
|
|
|
129
|
-
- Breaking: move the Librarian and its memory/summarization tools out of core into `roboshed.agents` and `roboshed.tools`. Use `librarian(sandbox, agent_names, agent_endpoint=...)` instead of `LibrarianConstructor` and its path record; see
|
|
168
|
+
- Breaking: move the Librarian and its memory/summarization tools out of core into `roboshed.agents` and `roboshed.tools`. Use `librarian(sandbox, agent_names, agent_endpoint=...)` instead of `LibrarianConstructor` and its path record; see [the archived agent migration guide](https://github.com/Tachion-Oy/roboz/blob/roboz-v0.1.2.dev7/docs/agent-factories.md). Core retains control, interaction, and generic construction primitives.
|
|
130
169
|
|
|
131
|
-
- Add generic `AgentDefinition`, `AgentCapability`, `Capability`, and `SubAgentSpec` in `roboz.deployment`. Configure all tools and skills through capabilities, with fresh agent pipes and explicit sink configuration; definitions select no project, memory, or persistence conventions. See
|
|
170
|
+
- Add generic `AgentDefinition`, `AgentCapability`, `Capability`, and `SubAgentSpec` in `roboz.deployment`. Configure all tools and skills through capabilities, with fresh agent pipes and explicit sink configuration; definitions select no project, memory, or persistence conventions. See [the archived agent migration guide](https://github.com/Tachion-Oy/roboz/blob/roboz-v0.1.2.dev7/docs/agent-factories.md).
|
|
132
171
|
|
|
133
172
|
- Breaking: `roboz[shed]` now installs `roboshed` instead of `roboz-shed`. Update direct requirements to `roboshed` and imports from `roboz_shed` to `roboshed`; no compatibility package is provided.
|
|
134
173
|
|
|
@@ -149,7 +188,7 @@
|
|
|
149
188
|
Contexts implement `ExternalDependencySource`, preserving resource identity
|
|
150
189
|
and reflecting live nested contexts, agents, and catalogs without resolving
|
|
151
190
|
lazy resources. `external_dependencies` is now a reserved context field name;
|
|
152
|
-
see
|
|
191
|
+
see [the archived context migration guide](https://github.com/Tachion-Oy/roboz/blob/roboz-v0.1.2.dev7/docs/context-migration.md).
|
|
153
192
|
|
|
154
193
|
### Fixed
|
|
155
194
|
|
|
@@ -161,7 +200,7 @@
|
|
|
161
200
|
- **Breaking:** Construct tool contexts with `Ctx(**values)` and pass resources
|
|
162
201
|
directly. Remove `FactoryCtx`, specialized context classes, `ToolDependency`,
|
|
163
202
|
and endpoint binding wrappers; `Tool.dependencies` now returns resources.
|
|
164
|
-
See
|
|
203
|
+
See [the archived context migration guide](https://github.com/Tachion-Oy/roboz/blob/roboz-v0.1.2.dev7/docs/context-migration.md) for replacements and state ownership.
|
|
165
204
|
|
|
166
205
|
- Define and enforce Google-style source docstrings, and normalize tool
|
|
167
206
|
docstrings before including them in agent prompts.
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: roboz
|
|
3
|
+
Version: 0.1.2.dev8
|
|
4
|
+
Import-Name: roboz
|
|
5
|
+
Summary: Typed primitives for composable agentic workflows
|
|
6
|
+
Project-URL: Homepage, https://github.com/Tachion-Oy/roboz
|
|
7
|
+
Project-URL: Repository, https://github.com/Tachion-Oy/roboz
|
|
8
|
+
Project-URL: Issues, https://github.com/Tachion-Oy/roboz/issues
|
|
9
|
+
Project-URL: Documentation, https://github.com/Tachion-Oy/roboz#readme
|
|
10
|
+
Author: Tachion Oy
|
|
11
|
+
License-Expression: Apache-2.0
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Keywords: agents,llm,tool-calling,typing,workflows
|
|
14
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
21
|
+
Classifier: Typing :: Typed
|
|
22
|
+
Requires-Python: >=3.13
|
|
23
|
+
Requires-Dist: pydantic>=2.12.4
|
|
24
|
+
Requires-Dist: python-dotenv>=1.2.1
|
|
25
|
+
Requires-Dist: rich>=14.2.0
|
|
26
|
+
Provides-Extra: proton-bridge-beta
|
|
27
|
+
Requires-Dist: roboz-proton-bridge<0.2.0,>=0.1.0b1; extra == 'proton-bridge-beta'
|
|
28
|
+
Description-Content-Type: text/markdown
|
|
29
|
+
|
|
30
|
+
<div align="center">
|
|
31
|
+
<picture>
|
|
32
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/assets/roboz-logo-dark.svg">
|
|
33
|
+
<source media="(prefers-color-scheme: light)" srcset="docs/assets/roboz-logo-light.svg">
|
|
34
|
+
<img alt="RoboZ" src="docs/assets/roboz-logo-dark.svg" width="560">
|
|
35
|
+
</picture>
|
|
36
|
+
|
|
37
|
+
<p><strong>Chain tools. Skip calls.</strong></p>
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
RoboZ is a framework for building llm powered agents. The core ingredient is that every tool may be chained conditionally to a subsequent tool thus allowing easy injection of deterministic flows into agentic processes.
|
|
41
|
+
|
|
42
|
+
[](https://github.com/Tachion-Oy/roboz/actions/workflows/ci.yml)
|
|
43
|
+
[](https://www.python.org/downloads/)
|
|
44
|
+
[](LICENSE)
|
|
45
|
+
|
|
46
|
+
> [!WARNING]
|
|
47
|
+
> RoboZ is pre-release software requiring Python 3.13 or newer. APIs may change
|
|
48
|
+
> before 1.0.
|
|
49
|
+
|
|
50
|
+
## Basic idea
|
|
51
|
+
|
|
52
|
+

|
|
53
|
+
|
|
54
|
+
### Problems to solve: Context bloat and too many llm calls
|
|
55
|
+
Suppose the task we want to achieve is ask our buddy Bob out to lunch and then book a table. For the sake of argument assume that our agent has access to the following MCP servers (Note: this is an example, RoboZ has native Tool primitives):
|
|
56
|
+
|
|
57
|
+
- Ask Bob what they want
|
|
58
|
+
- Find a restaurant
|
|
59
|
+
- Book a table.
|
|
60
|
+
|
|
61
|
+
In the usual approach an agent is presented each MCP server separately in their system prompt and it must call them one-by-one to complete the task. When the agent is completing the task, at every turn it must choose the correct tool, formulate its output accordingly and absorb the reply into its context, which already must contain the specific instructions on how to use each tool. In addition, at each turn one has to wait for the llm to reply, each reply costs tokens and each reply risks a mistake from the llm.
|
|
62
|
+
|
|
63
|
+
### Deterministic chains
|
|
64
|
+
The philosophy in RoboZ is that a workflow is (mostly) deterministic and only on occasion does one need to call an llm. For example in RoboZ an agent would trigger the "ask Bob if they want to have lunch" tool and all subsequent steps come by chaining: each tool can be chained to other tools upstream where their outputs are passed down the chain. Each link/edge may introduce a True/False condition, in our case for example if Bob is interested in having lunch (with us). If he is not, RoboZ allows for the chain to break and returns back to the default tool, which for an agentic process is usually "ask the llm what to do next". The default mode is that chained tools are not presented to the agent, they are thus *passive* or in other words their role is strictly in forming deterministic workflows and they cannot be invoked.
|
|
65
|
+
|
|
66
|
+
Chaining not only reduces the llm calls, but it also provides a useful way of introducing a fine-grained guard layer for tool calls. This is in fact precisely how the cli tools and their access policies work in Roboz. For a cli command a chained passive tool evaluates the intent and breaks the chain if policies are violated.
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
## Start here: Agent with a tool
|
|
70
|
+
|
|
71
|
+
```python
|
|
72
|
+
from random import choice
|
|
73
|
+
|
|
74
|
+
from simpsons_quotes import QUOTES
|
|
75
|
+
|
|
76
|
+
from roboz import Agent, tool
|
|
77
|
+
from roboz.llm.endpoints import MockLLMEndpoint
|
|
78
|
+
from roboz.models import Empty, Message, Stop
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
@tool
|
|
82
|
+
def get_quote(input: Empty, messages: list[Message]) -> Stop:
|
|
83
|
+
"""Return a random Simpsons quote and then stop."""
|
|
84
|
+
return Stop(value=choice(QUOTES))
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
mock = MockLLMEndpoint(
|
|
88
|
+
responses=[{"action": "get_quote", "rationale": "Need Simpsons quote!"}]
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
agent = Agent(
|
|
92
|
+
name="demo",
|
|
93
|
+
system_prompt="You are a Simpsons quote generator",
|
|
94
|
+
agent_endpoint=mock,
|
|
95
|
+
tools=[get_quote],
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
output, messages_ = agent.invoke()
|
|
99
|
+
print(f'"{output.value}"')
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
The above [simple example](examples/simple.py) uses the accompanying
|
|
103
|
+
[quote file](examples/simpsons_quotes.py) in this repository. Run it from the
|
|
104
|
+
repository root with
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
uv run python examples/simple.py
|
|
108
|
+
```
|
|
109
|
+
It creates an agent that returns a random
|
|
110
|
+
Simpsons quote. **The docstring in the tool is the instruction that the agent sees**. It uses a mock endpoint, with pre-determined replies, so you can run it without API keys.
|
|
111
|
+
The main contracts of RoboZ are already visible:
|
|
112
|
+
|
|
113
|
+
- `@tool` creates an instance of a usable tool for the agent
|
|
114
|
+
- A tool's input and output are typed. Tools also receive the entire message stack
|
|
115
|
+
- Callable endpoints are single instances, as a hard rule
|
|
116
|
+
- Different output types impact the dynamics, importantly `Stop` breaks out of the agentic loop
|
|
117
|
+
- `agent.invoke()` runs the agent and returns its output `Stop` and messages.
|
|
118
|
+
|
|
119
|
+
The above does not show the main idea of tool chaining, for that read the following sections.
|
|
120
|
+
## The central abstraction
|
|
121
|
+
|
|
122
|
+
An agent is a loop that calls tools. Everything is defined as a tool: Skills, background agents, prompting the agent, prompting the user, running nested agents, start up hooks etc. Everything.
|
|
123
|
+
|
|
124
|
+
**A tool can be triggered in three ways:**
|
|
125
|
+
- **Invoked by an agent**: The `prompt_agent` tool asks an LLM what to do next and its `Invoke` output always calls another tool. It is constructed internally for `AgentMode.STEERABLE` and `AgentMode.AUTONOMOUS` agents, but it is still just a tool.
|
|
126
|
+
- **By chaining**. After an invoked tool has fired RoboZ checks if a chained tool with a *true* chain condition exists (for more than one *true* condition for a fork you get a runtime error). If yes, the output is passed on and the process repeats until the first broken chain or all chained tools are exhausted
|
|
127
|
+
- **As default tools**. Once the tool chain is exhausted or the chain breaks due to a *false* condition the loop returns to the freely defined `default_tool` (there actually can be many, they are all called in sequence).
|
|
128
|
+
|
|
129
|
+
RoboZ then collapses to the traditional agentic approach as a special case if one just has the `prompt_agent` as the default with no chaining. An `AgentMode.DETERMINISTIC` agent has no `prompt_agent`; its default tools perform tasks directly, allowing deterministic branching through chaining. This is useful for a background agent that performs periodic maintenance work. `AgentMode.STEERABLE` agents may ask the user for input, while `AgentMode.AUTONOMOUS` agents cannot.
|
|
130
|
+
|
|
131
|
+
## Why is this framework useful?
|
|
132
|
+
### Tool Chaining
|
|
133
|
+
This may be used to reduce the number of llm calls, leading to a speed increase, lower cost and fewer AI errors. It also provides a useful way of introducing a guard layer for tool calls, which can be used to restrict agentic actions.
|
|
134
|
+
### Output Truncation
|
|
135
|
+
A tool’s output can be hidden from the llm, also partially, and this can start to apply after the message has been shown N times.
|
|
136
|
+
### Tool outputs are typed
|
|
137
|
+
The contract in RoboZ is that every action in the agentic loop is a tool call and all outputs are typed classes. Raw strings or JSON is never exchanged (unless explicitly opted in) as is and typed classes and validation are present throughout, with designated classes for tasks such as `Invoke` and `Stop`.
|
|
138
|
+
### LLM Endpoints are instances
|
|
139
|
+
As a fundamental design rule in Roboz, everything that depends on an LLM call must be trivially swappable to another provider or model. This makes changing an agent endpoint trivial and furthermore multi-endpoint functionality, where inside a single agent several endpoints are implemented, quite easy.
|
|
140
|
+
|
|
141
|
+
To see the above in practice see the [complex example](examples/complex.py) example below.
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
## Chains, factories, truncation and many endpoints
|
|
146
|
+

|
|
147
|
+
|
|
148
|
+
In the code example below we illustrate some of the features that make RoboZ different from other frameworks.
|
|
149
|
+
|
|
150
|
+
**Tool chaining** is usually introduced via the decorator argument `chained_to` which indicates the name of the tool whose output is passed as the input (the tools also possess a `.chain` method). The input/output contract must be Liskov compatible, i.e the upstream output must be a subclass of the downstream input. A possible `chain_condition` can be passed in, which by definition has access to the tool's input argument and returns a boolean. The chain condition must evaluate to at most one true condition, but it can evaluate to `false` on all links, in which case you return to the default tool(s). `AgentMode.STEERABLE` and `AgentMode.AUTONOMOUS` construct a `prompt_agent` tool backed by the agent endpoint; `AgentMode.DETERMINISTIC` uses the configured default tools.
|
|
151
|
+
|
|
152
|
+
The `escalate` is an example of a **tool factory**, which is a simple concept. It accepts a context parameter which is added to the tool's closure and calling the factory with a context argument returns a tool. A very common use case is a tool with an endpoint as a context. In RoboZ all llm **endpoints are instances**, so it is easy to have a specific endpoint for a tool, that is different from that of the agent, below we construct deterministic mock endpoints so that no API keys are required for the examples. Factories have precisely the same chaining arguments in their decorator as a tool.
|
|
153
|
+
|
|
154
|
+
Also demonstrated in the `escalate` factory is the **message truncation** feature. This parameter is present in all output types and allows the tool to decide if the output should be visible in the conversation passed on to the agent. A message can be truncated partially (show only n chars or just a caller stub) or completely. Importantly, we can choose to start applying the truncation only after the complete message has been shown to the agent n times. Below, we choose to show the message once and then truncate it completely, a useful pattern for example for long tracebacks etc.
|
|
155
|
+
|
|
156
|
+
All RoboZ tools by definition include the full **conversation messages** as input. These are not intended to be altered in place (although they can be and this is how e.g. *conversation compactification* works), but can be used to alter the behavior of tools in a non-trivial way. For example, a start up hook intended to show the agent some information at the start or performing some initial maintenance can simply be one of the default tools that checks if it has already been called and if it has, does nothing.
|
|
157
|
+
|
|
158
|
+
**The tool instruction is its docstring**. In addition, the system prompt includes a *technical prompt* by default that gives the specific tool calling instructions. This can of course be switched off. When in doubt, you can always use the method `.show_agent_info()` to check the complete agent configuration including the system prompt, tools, dependencies, persistence locations etc.
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
```python
|
|
163
|
+
from builtins import input as read_input
|
|
164
|
+
|
|
165
|
+
from roboz import Agent, factory, tool
|
|
166
|
+
from roboz.llm import EndpointLike, MockLLMEndpoint, get_completion
|
|
167
|
+
from roboz.models import Empty, Int, Message, Role, Stop, Str, filter_messages
|
|
168
|
+
from roboz.models.truncation import Severity, Truncation
|
|
169
|
+
from roboz.runtime.io import interact_with_user
|
|
170
|
+
from roboz.runtime.sinks import CliSink
|
|
171
|
+
from roboz.tools import stop
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
@tool
|
|
175
|
+
def ask_number(input: Empty, messages: list[Message]) -> Int:
|
|
176
|
+
"""Ask the user for an integer, repeating until the response is valid."""
|
|
177
|
+
while True:
|
|
178
|
+
reply = read_input("Enter an integer: ")
|
|
179
|
+
try:
|
|
180
|
+
return Int(value=int(reply))
|
|
181
|
+
except ValueError:
|
|
182
|
+
print("Please enter an integer :)")
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
@factory(chained_to=ask_number, chain_condition=lambda x: x.value % 2 == 0)
|
|
186
|
+
def escalate(input: Int, messages: list[Message], ctx: EndpointLike) -> Stop | Str:
|
|
187
|
+
"""An even number?! Need to check this with HR!"""
|
|
188
|
+
interact_with_user("Careful now, that is pretty spicy!", with_reply=False)
|
|
189
|
+
prompt = f"The user chose {input.value}. Is this too hot to handle?! (y/n)?"
|
|
190
|
+
verdict = get_completion(
|
|
191
|
+
endpoint=ctx, messages=[Message(role=Role.SYSTEM, content=prompt)]
|
|
192
|
+
)
|
|
193
|
+
is_first_escalation = (
|
|
194
|
+
len(filter_messages(caller="escalate", messages=messages)) == 0
|
|
195
|
+
)
|
|
196
|
+
if verdict == "y" and not is_first_escalation:
|
|
197
|
+
return Stop(value="Too much spiciness, need to quit!")
|
|
198
|
+
return Str(
|
|
199
|
+
value="HR gave a pass, but still, let's show this to the agent only once.",
|
|
200
|
+
truncation=Truncation(threshold=1, severity=Severity.REMOVE),
|
|
201
|
+
)
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
@tool(chained_to=ask_number, chain_condition=lambda x: x.value % 2 != 0)
|
|
205
|
+
def give_praise(input: Int, messages: list[Message]) -> Str:
|
|
206
|
+
"""We need to give praise for such an erudite approach to the problem."""
|
|
207
|
+
interact_with_user(f"{input.value} a fine and bold choice!", with_reply=False)
|
|
208
|
+
return Str(value=f"{input.value} is good, no biggie.")
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
agent_endpoint = MockLLMEndpoint(
|
|
212
|
+
responses=[
|
|
213
|
+
*(10 * [{"action": "ask_number", "rationale": "This is my only job"}]),
|
|
214
|
+
{"action": "stop", "rationale": "Enough numbers!", "value": ""},
|
|
215
|
+
]
|
|
216
|
+
)
|
|
217
|
+
guard_endpoint = MockLLMEndpoint(responses=10 * ["y"])
|
|
218
|
+
|
|
219
|
+
agent = Agent(
|
|
220
|
+
name="demo",
|
|
221
|
+
system_prompt=f"Without exception, use the {ask_number.name} tool.",
|
|
222
|
+
event_sinks=[CliSink.default()],
|
|
223
|
+
agent_endpoint=agent_endpoint,
|
|
224
|
+
tools=[ask_number, escalate(guard_endpoint), give_praise, stop],
|
|
225
|
+
)
|
|
226
|
+
agent.invoke()
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
The above [complex example](examples/complex.py) can be run from the root with
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
uv run python examples/complex.py
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
## Try it out
|
|
239
|
+
|
|
240
|
+
```bash
|
|
241
|
+
uv add roboz
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
Or with pip:
|
|
245
|
+
|
|
246
|
+
```bash
|
|
247
|
+
python -m pip install roboz
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
## Packages
|
|
251
|
+
|
|
252
|
+
This repository contains four independently versioned Python distributions.
|
|
253
|
+
They share development and release tooling, but are published separately so an
|
|
254
|
+
application only needs to install the parts it uses.
|
|
255
|
+
|
|
256
|
+
| Distribution | Import | Provides |
|
|
257
|
+
| --- | --- | --- |
|
|
258
|
+
| `roboz` | `roboz` | Core agent, tool, workflow, endpoint, and runtime primitives. |
|
|
259
|
+
| [`roboshed`](packages/shed/README.md) | `roboshed` | Reusable capabilities, guarded system tools, memory, agents, and deployment building blocks. |
|
|
260
|
+
| [`roboz-endpoints`](packages/endpoints/README.md) | `roboz_endpoints` | Model catalogues and optional provider adapters. |
|
|
261
|
+
| [`roboz-proton-bridge`](packages/proton-bridge/README.md) | `roboz_proton_bridge` | Proton Bridge email integration. |
|
|
262
|
+
|
|
263
|
+
The companion packages build on `roboz`; `roboz-proton-bridge` also uses
|
|
264
|
+
`roboshed`.
|
|
265
|
+
|
|
266
|
+
## Development
|
|
267
|
+
|
|
268
|
+
```bash
|
|
269
|
+
uv sync --locked --dev
|
|
270
|
+
uv run pytest
|
|
271
|
+
uv run ruff check
|
|
272
|
+
uv run pyright
|
|
273
|
+
bash scripts/run_type_tests.sh
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for development and testing guidance. The
|
|
277
|
+
[verification workflow](.github/workflows/verify.yml) defines the complete CI
|
|
278
|
+
gate.
|
|
279
|
+
Roboz is typed and ships a PEP 561 `py.typed` marker.
|
|
280
|
+
|
|
281
|
+
## License
|
|
282
|
+
|
|
283
|
+
Roboz is licensed under the [Apache License 2.0](LICENSE). Copyright © 2026 Tachion Oy.
|