ExperimentLane
An evidence-driven experimentation engine for AI agents. Record experiments, compare them against baselines, and get a deterministic decision about what to change next — one variable at a time.
The Python package mirrors the TypeScript implementation (@talocode/experimentlane) 1:1.
What is it
ExperimentLane tracks content and agent experiments as receipts: a baseline, a run, and the platform-exposed metrics that come back. It compares them, names a winner, picks the strongest and weakest signals, and tells the agent exactly what to change next while everything else stays constant.
Why it exists
Most agents ship a variation, see a number, and guess. That is how B-tests quietly become A/B/C/D tests and nothing is ever attributable.
ExperimentLane encodes the discipline most agents are missing: change exactly one independent variable at a time. It is a local, deterministic, no-frills engine any agent can embed, so experiments stay honest, small, and comparable.
Open engine first. The hosted power can come later — the same schema is shaped for the Talocode API surface.
Install
pip install talocode-experimentlane
Python 3.8+, no runtime dependencies.
Quickstart
from talocode_experimentlane import ExperimentLane, JsonStore
lane = ExperimentLane(JsonStore(".experimentlane"))
lane.init()
# 1. Define a lane for a platform's exposed metrics
shorts = lane.create_lane(name="youtube-shorts", platform="youtube_short")
# 2. Record a baseline (the control asset's platform-exposed metrics)
base = lane.create_baseline(
lane_id=shorts["id"],
metrics={"views": 480, "avg_view_percent": 75, "shares": 10, "subscribers": 2},
)
# 3. Create the experiment — exactly one variable changes
asset = lane.create_asset(lane_id=shorts["id"], title="reliability-short-2")
exp = lane.create_experiment(
lane_id=shorts["id"], asset_id=asset["id"], baseline_id=base["id"], variable="hook"
)
# 4. Record the receipt after the run
lane.add_receipt(
experiment_id=exp["id"],
metrics={"views": 624, "avg_view_percent": 87, "shares": 14, "subscribers": 3},
)
# 5. Compare and get one deterministic decision
result = lane.compare(experiment_id=exp["id"])
print(result["comparison"]["winner"]) # "experiment"
print(result["decision"]["line"]["nextExperiment"]) # "change only <weakest signal>"
print(result["decision"]["line"]["everythingElse"]) # "hold constant"
Canonical import: from talocode_experimentlane import ExperimentLane, JsonStore.
Auth / env
The local store needs no API key. Optional environment variable:
EXPERIMENTLANE_DIR— override the default data directory (default.experimentlane).
API surface
Everything is comparable-metrics only — absent metrics are "unavailable", never a failure.
| Method | Purpose |
|---|---|
create_lane |
Define a platform and its metric priority |
create_asset |
A piece of content or an agent run |
create_baseline |
The control — an asset snapshot or explicit metrics |
create_experiment |
An assignment changing exactly one variable |
add_receipt |
The platform-exposed metrics that came back |
compare |
Computes deltas, names winner, picks strongest/weakest signals |
next |
Recommends the next single variable to change |
validate_next |
Guardrail: reject proposals that change 2+ variables |
history |
Full audit trail per experiment |
lineage_of |
The reuse lineage of an asset back to its primary proof |
Platform schemas
Platforms (youtube_short, tiktok, instagram_reel, x_post, generic) map their exposed metrics. shares_per_view is derived from views + shares when both are present. A receipt may only contain metrics listed for its lane platform — unknown keys raise a clear error.
Guardrail codes
| Code | Meaning |
|---|---|
EXPERIMENT_OK |
Exactly one independent variable changed |
EXPERIMENT_INVALID |
2+ independent variables changed — reject |
CLI
experimentlane lane create --name my-shorts --platform youtube_short
experimentlane receipt add --experiment <id> --views 624 --shares 14
experimentlane compare --experiment <id>
experimentlane next --experiment <id> --propose hook,duration # guardrail check
Data lives in .experimentlane (override with EXPERIMENTLANE_DIR).
Related packages
Sibling installs for the Talocode ecosystem:
| Package | Install |
|---|---|
| StackLane | pip install talocode |
| Tera | pip install talocode-tera |
| Codra | pip install talocode-codra |
| DocuLane | pip install talocode-doculane |
| XSearchLane | npm i @talocode/xsearchlane |
Talocode ecosystem
| Product | Description |
|---|---|
| ExperimentLane | (this package) — evidence-driven experiment engine for agents |
| Tera | Capability API under Talocode Cloud |
| Codra | Coding agent / skills runtime |
| StackLane | Cloud backend: projects, API keys, credits, billing |
| SearchLane | Search API product |
| GateLane | Policy gates |
| ContextLane | Context management |
| ScreenLane | Screen capture pipeline |
| MemoryLane | Agent memory |
| Tradia | Trading agents |
| DevTool | Developer tooling |
| XProLane | X advanced tools |
| XSearchLane | X realtime search |
| Agent Browser | Browser control |
| InvoiceLane | Invoicing |
| GeoLane | Geolocation |
| ClipLoop | Clip builder |
| DocuLane | Office document tools for agents |
More: github.com/talocode · talocode.site · docs.talocode.site
License
MIT © Talocode.
Metadata
Release files for talocode-experimentlane 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| talocode_experimentlane-0.1.1.tar.gz | 14.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| talocode_experimentlane-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.2 kB
Release files / talocode_experimentlane-0.1.1.tar.gz
| Download URL | talocode_experimentlane-0.1.1.tar.gz |
|---|---|
| Size | 14.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
31b0a43eb49d162b963a362272cc1c7369ac36ff0523ca936a5e31f9fd5fd8b8
|
|
BLAKE2b-256 checksum How to use checksums |
cc2c238a68687f9d20e11e33025112b4760cfc6a1cbadd5ce4282696a07d24fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / talocode_experimentlane-0.1.1-py3-none-any.whl
| Download URL | talocode_experimentlane-0.1.1-py3-none-any.whl |
|---|---|
| Size | 16.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bdaa72c32c3752f6e21fb299e88ff8e900af4c34348d598f9b04a8e84c6c2ded
|
|
BLAKE2b-256 checksum How to use checksums |
b6e799754f405fe208230807bbc2e8dd9845d29a58b7b15e8883223a5dcc6224
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|