ToolLane (Python)
Part of LoopEngine — a runtime for defining and running AI agents through a transparent ReAct loop — scheduling approved tool calls into parallel/solo execution lanes. Works standalone too, no dependency on LoopEngine itself.
Ported line-for-line from the TypeScript implementation. See the root README for the pitch, the prior-art table, and the scope decisions — this file only covers what's specific to running the Python code.
Install
pip install -e ".[dev]"
Quickstart
PYTHONPATH=src python3 examples/quickstart.py
from toollane import ToolLane
tool_lane = ToolLane(is_safe=lambda call: call.name in {"read_file", "list_dir", "grep"})
for lane in tool_lane.plan(calls):
print(lane.mode, [c.name for c in lane.calls])
async for result in tool_lane.run(calls):
# result.status is "fulfilled" or "rejected" — one failure never
# stops the rest of the batch.
...
Test
pytest
Status
Lane scheduling, streamed execution via an async generator, and isolated
failure handling are real and tested. Published as
toollane on PyPI.
Release files for toollane 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| toollane-0.0.3.tar.gz | 5.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| toollane-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.2 kB
Release files / toollane-0.0.3.tar.gz
| Download URL | toollane-0.0.3.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f3189407951197d4ccb99112f5756076ff4c859319f62d1048c204580f9f3256
|
|
BLAKE2b-256 checksum How to use checksums |
1fe0479b2ffa025714929f45c4c287d19680ed4c49e408f67426a57153a72061
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.8
|
Release files / toollane-0.0.3-py3-none-any.whl
| Download URL | toollane-0.0.3-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bcc3b000730d9a3ac9556ebd0fc209c2db66a3a5c1209cb029eff171c79044ac
|
|
BLAKE2b-256 checksum How to use checksums |
6988d890371e0c0a37e940d8419e18234d84dddfb683ecfc48a2f5562166aced
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.8
|