@lmmslab/harness 0.85.0 → 0.86.0
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.
- package/README.md +1 -1
- package/package.json +1 -1
- package/python/harness/__init__.py +2 -2
- package/python/harness/bench.py +2 -2
- package/python/harness/builtin/benches/README.md +1 -2
- package/python/harness/builtin/configs/default.toml +4 -19
- package/python/harness/builtin/configs/deploy/example-api.toml +1 -1
- package/python/harness/builtin/configs/models/deepseek-flash.toml +1 -1
- package/python/harness/builtin/configs/models/grok-low.toml +1 -1
- package/python/harness/builtin/configs/models/grok-medium.toml +3 -6
- package/python/harness/builtin/environment/README.md +8 -25
- package/python/harness/builtin/prompts/conversation/core.md +6 -5
- package/python/harness/builtin/prompts/core/core.md +147 -203
- package/python/harness/builtin/prompts/core/pack.toml +0 -1
- package/python/harness/builtin/prompts/reflect/core.md +8 -32
- package/python/harness/builtin/prompts/reflect/pack.toml +2 -4
- package/python/harness/builtin/prompts/shared/agent-skills.md +5 -3
- package/python/harness/builtin/prompts/shared/agents.md +20 -10
- package/python/harness/builtin/prompts/shared/checklist.md +13 -17
- package/python/harness/builtin/prompts/shared/environments.md +20 -15
- package/python/harness/builtin/prompts/shared/learning-goal.md +2 -3
- package/python/harness/builtin/prompts/shared/learning.md +73 -23
- package/python/harness/builtin/prompts/shared/mcp.md +11 -6
- package/python/harness/builtin/prompts/shared/reflex-method.md +243 -0
- package/python/harness/builtin/prompts/shared/units.md +138 -0
- package/python/harness/builtin/prompts/shared/web.md +5 -6
- package/python/harness/builtin/skills/agents/__init__.py +18 -3
- package/python/harness/builtin/skills/agents/skill.toml +3 -3
- package/python/harness/builtin/skills/checklist/__init__.py +34 -32
- package/python/harness/builtin/skills/checklist/skill.toml +9 -9
- package/python/harness/builtin/skills/environments/__init__.py +9 -5
- package/python/harness/builtin/skills/environments/skill.toml +1 -1
- package/python/harness/builtin/skills/experience/skill.toml +1 -1
- package/python/harness/builtin/skills/learning/__init__.py +19 -5
- package/python/harness/builtin/skills/mcp/skill.toml +1 -1
- package/python/harness/builtin/skills/memory/__init__.py +4 -1
- package/python/harness/builtin/skills/memory/skill.toml +0 -5
- package/python/harness/builtin/skills/verify/skill.toml +1 -0
- package/python/harness/builtin/skills/web/__init__.py +4 -1
- package/python/harness/builtin/third_party/sources.toml +2 -40
- package/python/harness/cli.py +16 -25
- package/python/harness/config/__init__.py +2 -2
- package/python/harness/config/agent.py +59 -47
- package/python/harness/core/__init__.py +1 -1
- package/python/harness/core/codec.py +4 -4
- package/python/harness/core/contracts.py +1 -1
- package/python/harness/core/media.py +1 -1
- package/python/harness/core/ports.py +2 -2
- package/python/harness/core/procs.py +1 -1
- package/python/harness/core/remote.py +1 -1
- package/python/harness/core/worker.py +19 -13
- package/python/harness/embodiments.py +53 -44
- package/python/harness/extensions.py +22 -0
- package/python/harness/host/__init__.py +1 -1
- package/python/harness/host/http.py +6 -12
- package/python/harness/host/sessions.py +1 -1
- package/python/harness/host/tasks.py +15 -11
- package/python/harness/host/workspaces.py +36 -8
- package/python/harness/packages/__init__.py +5 -5
- package/python/harness/packages/environments.py +30 -18
- package/python/harness/packages/manager.py +1 -1
- package/python/harness/packages/manifest.py +6 -6
- package/python/harness/packages/provision.py +1 -1
- package/python/harness/packages/sources.py +1 -1
- package/python/harness/paths.py +1 -1
- package/python/harness/runtime/decision/loop.py +95 -5
- package/python/harness/runtime/decision/messages.py +128 -2
- package/python/harness/runtime/decision/model.py +4 -5
- package/python/harness/runtime/decision/prompts.py +20 -32
- package/python/harness/runtime/events.py +7 -5
- package/python/harness/runtime/execution/attached.py +3 -3
- package/python/harness/runtime/execution/entries.py +189 -8
- package/python/harness/runtime/execution/kernel.py +26 -1
- package/python/harness/runtime/execution/results.py +2 -3
- package/python/harness/runtime/execution/session.py +417 -32
- package/python/harness/runtime/execution/skills.py +63 -16
- package/python/harness/runtime/learning/active.py +7 -7
- package/python/harness/runtime/learning/learner.py +3 -2
- package/python/harness/runtime/learning/library.py +9 -4
- package/python/harness/runtime/learning/reflect.py +10 -9
- package/python/harness/runtime/reactive/rules.py +4 -4
- package/python/harness/runtime/reactive/tree.py +506 -25
- package/python/harness/runtime/safety/input.py +1 -1
- package/python/harness/runtime/safety/isolation.py +3 -3
- package/python/harness/runtime/safety/shield.py +4 -50
- package/python/harness/runtime/task/delegation.py +5 -5
- package/python/harness/runtime/task/environments.py +10 -0
- package/python/harness/runtime/task/run.py +222 -27
- package/python/harness/runtime/tick.py +24 -1
- package/python/harness/sdk/__init__.py +2 -5
- package/python/harness/services/registry.py +23 -19
- package/python/harness/settings.py +9 -9
- package/python/harness/builtin/environment/constraints.txt +0 -31
- package/python/harness/builtin/prompts/shared/world.md +0 -1
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<p align="center">
|
|
16
16
|
<a href="https://www.npmjs.com/package/@lmmslab/harness"><img alt="npm version" src="https://img.shields.io/npm/v/@lmmslab/harness?cacheSeconds=3600&style=flat-square&labelColor=112332&color=087f9c" /></a>
|
|
17
17
|
<a href="https://pypi.org/project/the-harness/"><img alt="PyPI version" src="https://img.shields.io/pypi/v/the-harness?cacheSeconds=3600&style=flat-square&labelColor=112332&color=087f9c" /></a>
|
|
18
|
-
<a href="https://discord.gg/
|
|
18
|
+
<a href="https://discord.gg/JbxU88aZyZ"><img alt="Discord community" src="https://img.shields.io/badge/discord-community-bc276e?style=flat-square&logo=discord&logoColor=white&labelColor=112332" /></a>
|
|
19
19
|
</p>
|
|
20
20
|
|
|
21
21
|
Tell an agent what to do in your own words. A language model plans and writes short programs; The Harness runs them in an environment the agent can see and act in. Watch, send a message, or take over at any time.
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"""The Harness:
|
|
1
|
+
"""The Harness: an agent that acts by writing programs, in any environment. It imports no environment's code."""
|
|
2
2
|
|
|
3
3
|
# The one version: the core's. A lock records it with the versions of the packages that
|
|
4
4
|
# ran and the hash of the whole lock (the agent's identity, config/agent.py).
|
|
5
|
-
__version__ = "0.
|
|
5
|
+
__version__ = "0.86.0"
|
|
6
6
|
|
|
7
7
|
# A checkout's packages import beside the harness (paths.py).
|
|
8
8
|
from . import paths as _paths # noqa: E402,F401
|
package/python/harness/bench.py
CHANGED
|
@@ -6,7 +6,7 @@ A bench is a package's `benches/<name>/` with
|
|
|
6
6
|
factory and the [worker] keys it takes, its [environment] and [sandbox]
|
|
7
7
|
bench.py its hooks (BENCH_KEYS `hooks`, a subclass of the eval package's Bench)
|
|
8
8
|
|
|
9
|
-
The core reads what starts a worker (bench_specs):
|
|
9
|
+
The core reads what starts a worker (bench_specs): a package's workspaces start a
|
|
10
10
|
bench's worker from it, the session host knows a bench's embodiment kind from it, active
|
|
11
11
|
learning its sandbox, `harness install` its environment. Running a bench as a benchmark
|
|
12
12
|
(its tasks, the keys of a deploy's [benches.<name>] table, its checkout and assets) is the
|
|
@@ -14,7 +14,7 @@ eval package's: those keys of bench.toml stay in BenchSpec.benchmark, which the
|
|
|
14
14
|
package reads and checks (harness_eval/bench.py), with the hooks.
|
|
15
15
|
|
|
16
16
|
Adding a bench touches none of the code that reads it. A bench's hooks import only the standard library and their own package's light modules at import;
|
|
17
|
-
the
|
|
17
|
+
the environment and the benchmark's code stay in the worker process.
|
|
18
18
|
"""
|
|
19
19
|
|
|
20
20
|
from dataclasses import dataclass, field
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
# Benches
|
|
2
2
|
|
|
3
|
-
The benchmarks are packages: `packages/<name>/benches/<name
|
|
4
|
-
osomni, computer, browser, minecraft, gamescientist, fakegame in game). This folder stays so
|
|
3
|
+
The benchmarks are packages: `packages/<name>/benches/<name>/`. This folder stays so
|
|
5
4
|
that each package adds its own `benches.<name>` beside the others.
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
# The agent: what `harness run` runs unless an experiment or --agent names another
|
|
2
|
-
#
|
|
3
|
-
#
|
|
4
|
-
#
|
|
1
|
+
# The agent: what `harness run` runs unless an experiment or --agent names another. It holds
|
|
2
|
+
# what is the same for every kind of environment. A kind's prompt and the agent's settings
|
|
3
|
+
# on it are its package's (kinds.toml: prompt, agent); without one, the prompt is the page
|
|
4
|
+
# every agent reads (prompts/core).
|
|
5
5
|
description = "The Harness: programs over the skills of the packages a task uses"
|
|
6
|
-
prompt = { robot = "../prompts/core", desktop = "../prompts/computer", game = "../prompts/game" }
|
|
7
6
|
# The model roles (configs/models/<name>.toml); an experiment's `model` or --model NAME
|
|
8
7
|
# picks another.
|
|
9
8
|
model = "deepseek-flash"
|
|
@@ -17,17 +16,3 @@ isolation = "auto"
|
|
|
17
16
|
|
|
18
17
|
[budget]
|
|
19
18
|
max_model_calls = 60
|
|
20
|
-
|
|
21
|
-
# A computer: its state every turn; the screen when a program looks (look, watch).
|
|
22
|
-
[desktop]
|
|
23
|
-
runtime = { contract = "screenshot", strategy_first = false }
|
|
24
|
-
budget = { max_model_calls = 60 }
|
|
25
|
-
|
|
26
|
-
# A game: its window when a program looks (the model turns watch() on itself) and eight
|
|
27
|
-
# exchanges; the game keeps running while rules and programs handle changes. Unresolved
|
|
28
|
-
# events can ask the model.
|
|
29
|
-
[game]
|
|
30
|
-
knowledge = "learned"
|
|
31
|
-
skills = { enable = ["vision"] }
|
|
32
|
-
runtime = { contract = "native", strategy_first = false, compact_at_tokens = 150000, clear_results_after_minutes = 60, thinking = "low", max_wait_seconds = 30 }
|
|
33
|
-
budget = { max_model_calls = 5000 }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# No GPU for models: only the
|
|
1
|
+
# No GPU for models: only the environment runs here, every model is hosted (the main and
|
|
2
2
|
# vlm roles). Without a segmenter, segmentation and the tools built on it (locate, pick,
|
|
3
3
|
# release, ...) drop out of runs on this machine, and without a policy server the
|
|
4
4
|
# learned skills: a smaller configuration with another identity.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# DeepSeek V4.1 Flash writes the programs: the development model, at medium reasoning
|
|
2
|
-
# effort
|
|
2
|
+
# effort.
|
|
3
3
|
description = "DeepSeek V4.1 Flash writes programs, answers questions about images and points; Molmo2 for a pointer role"
|
|
4
4
|
include = ["grok-medium.toml"]
|
|
5
5
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# grok-4.7 at low reasoning effort, for development. At medium effort xAI streams no
|
|
2
2
|
# reasoning, and OpenRouter cuts a request after about 5 minutes with nothing received:
|
|
3
|
-
# long replies are lost. Low effort answers in 13-60 s
|
|
3
|
+
# long replies are lost. Low effort answers in 13-60 s.
|
|
4
4
|
description = "grok-4.7 (low) writes programs, answers questions about images and points; Molmo2 for a pointer role"
|
|
5
5
|
include = ["grok-medium.toml"]
|
|
6
6
|
|
|
@@ -13,15 +13,12 @@ max_output_tokens = 16000
|
|
|
13
13
|
stream = true
|
|
14
14
|
timeout_seconds = 120
|
|
15
15
|
# Completions have no side effects; retry dropped connections and rate limits for up to
|
|
16
|
-
# 30 minutes (the
|
|
16
|
+
# 30 minutes (the environment waits while the model is called).
|
|
17
17
|
retries = 3
|
|
18
18
|
retry_seconds = 1800
|
|
19
19
|
|
|
20
|
-
# Questions about images inside programs
|
|
21
|
-
#
|
|
22
|
-
# sees the task and the images, as in Z2_v01, instead of a second, weaker model
|
|
23
|
-
# answering for it (1.1.0 asked qwen3.8-flash, whose answers about what an object is
|
|
24
|
-
# changed from one question to the next).
|
|
20
|
+
# Questions about images inside programs go to the main model itself: one model sees the
|
|
21
|
+
# task and the images, instead of a second, weaker model answering for it.
|
|
25
22
|
[vlm]
|
|
26
23
|
backend = "openrouter"
|
|
27
24
|
model = "x-ai/grok-4.7"
|
|
@@ -8,22 +8,13 @@ own under `~/.cache/harness/envs/` (`HARNESS_HOME` moves it), built from the
|
|
|
8
8
|
`[environment]` table of its manifest (`services/<name>.toml`,
|
|
9
9
|
`benches/<name>/bench.toml`).
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
environment
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
| `requirements-skills.txt` | what `install.sh` of an exported XPolicyLab policy installs into RoboDojo's policy environment: the packages of the analytic and learned skills |
|
|
19
|
-
| `cuda_toolkit.sh` | the CUDA 12.8 build toolkit cuRobo is compiled with (RoboDojo's and RoboTwin's environments) |
|
|
20
|
-
|
|
21
|
-
RoboTwin's two source edits and its own cuRobo build are the robotwin package's
|
|
22
|
-
(`environment/robotwin_edits.py`, `environment/robotwin_curobo.sh`).
|
|
23
|
-
|
|
24
|
-
Every install runs under the pins, so no service or benchmark can move torch, numpy,
|
|
25
|
-
Isaac Sim or websockets: a package that cannot be installed under them fails instead of
|
|
26
|
-
upgrading the core. An environment's directory is named by a hash of everything that
|
|
11
|
+
What the environments of services and benchmarks share is in the packages that bring them
|
|
12
|
+
(their `environment/` folders): the pins an install respects (`constraints` in the
|
|
13
|
+
`[environment]` table), and whatever a package's own environment needs to build.
|
|
14
|
+
|
|
15
|
+
An install runs under the pins its table names, so it cannot move a pinned
|
|
16
|
+
dependency: a package that cannot be installed under them fails instead of
|
|
17
|
+
upgrading it. An environment's directory is named by a hash of everything that
|
|
27
18
|
decides what is installed (its table and the pins, comments excluded), so changing a pin
|
|
28
19
|
builds the environments that use it anew the next time a run needs them and leaves the
|
|
29
20
|
others as they are.
|
|
@@ -42,12 +33,4 @@ something that uses it, and commit the manifest and the pins together.
|
|
|
42
33
|
`HARNESS_ENVIRONMENTS=project` (or `environments = "project"` in a deploy) installs
|
|
43
34
|
nothing but weights: every service and worker runs in the interpreter of the harness
|
|
44
35
|
itself. It is for a machine where one environment already holds everything, not a way
|
|
45
|
-
to install; that machine also sets what those environments would set
|
|
46
|
-
`OMNI_KIT_ACCEPT_EULA=YES` for RoboDojo's workers.
|
|
47
|
-
|
|
48
|
-
## Known deviations from upstream
|
|
49
|
-
|
|
50
|
-
- `isaacsim-kernel` declares `websockets==12.0`, which only Kit's asset-search
|
|
51
|
-
extensions use; headless simulation does not load them. XPolicyLab policy servers
|
|
52
|
-
need the websockets 13+ asyncio API, so RoboDojo's environment overrides it with 17.1
|
|
53
|
-
(`overrides` in `benches/robodojo/bench.toml`).
|
|
36
|
+
to install; that machine also sets what those environments would set.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
This conversation has no environment: no screen, no project folder and no browser.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
This conversation has no environment: no screen, no project folder and no browser.
|
|
2
|
+
|
|
3
|
+
- You have your own knowledge, the user's messages and files, plain Python in your
|
|
4
|
+
programs, and the connected tools listed below when there are any.
|
|
5
|
+
- Answer questions directly in plain text.
|
|
6
|
+
- Do not claim to have looked at, opened or changed anything on the user's computer.
|