Skip to main content

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)

Source distribution for toollane 0.0.3
File Size Uploaded
toollane-0.0.3.tar.gz 5.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for toollane 0.0.3
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page