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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

toollane-0.0.3.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

toollane-0.0.3-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file toollane-0.0.3.tar.gz.

File metadata

  • Download URL: toollane-0.0.3.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.8

File hashes

Hashes for toollane-0.0.3.tar.gz
Algorithm Hash digest
SHA256 f3189407951197d4ccb99112f5756076ff4c859319f62d1048c204580f9f3256
MD5 4290ab8965d86a4d473f04a953f03671
BLAKE2b-256 1fe0479b2ffa025714929f45c4c287d19680ed4c49e408f67426a57153a72061

See more details on using hashes here.

File details

Details for the file toollane-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: toollane-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.8

File hashes

Hashes for toollane-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 bcc3b000730d9a3ac9556ebd0fc209c2db66a3a5c1209cb029eff171c79044ac
MD5 d492e8b58953010390df6b1102929e29
BLAKE2b-256 6988d890371e0c0a37e940d8419e18234d84dddfb683ecfc48a2f5562166aced

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page