Metadata-Version: 2.4
Name: talocode-reliabilitylane
Version: 0.1.0
Summary: Reliability patterns for AI agents — match failures, plan retries, verify work, resolve incidents from a curated dataset
Project-URL: Homepage, https://github.com/talocode/reliabilitylane
Project-URL: Documentation, https://docs.talocode.site
Project-URL: Repository, https://github.com/talocode/reliabilitylane
Project-URL: Issues, https://github.com/talocode/reliabilitylane/issues
Author: Talocode
License-Expression: MIT
Keywords: agent,ai,cli,incident,mcp,patterns,reliability,retry,sdk,talocode,verification
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == 'dev'
Description-Content-Type: text/markdown

# ReliabilityLane

Reliability patterns for AI agents. Match a failure symptom to a known pattern, plan a retry with backoff, verify work against a checklist, and resolve incidents with a playbook — all from a curated, deterministic dataset. No LLM guessing.

## Why it exists

Agents fail in predictable ways: they retry the same broken call forever, trust a green check without verifying the end state, grade their own work, lose context, and let a language model do arithmetic. ReliabilityLane turns those failures into deterministic rules so agents fail safer, retry smarter, and prove their work.

Open dataset and CLI today. Hosted power behind them.

## Install

```bash
pip install talocode-reliabilitylane
```

## Quickstart

```python
from reliabilitylane import ReliabilityLaneClient

client = ReliabilityLaneClient()  # reads TALOCODE_API_KEY, TALOCODE_BASE_URL

# Plan a retry for a 500
plan = client.retry_plan(status=500)
print(plan["strategy"]["name"], plan["nextDelayMs"])

# Match a failure symptom to a pattern
match = client.match(symptom="it keeps retrying the same call forever")
print(match["matches"][0]["pattern"]["name"])

# Verify a deployment
result = client.verify(
    area="deployment",
    evidence={"Deploy command exited with a success status": True},
)
print(result["verdict"], result["pending"])
```

No key needed for the local deterministic engine:

```python
from reliabilitylane import match_failure, plan_retry, verify, incident_for

plan_retry(status=429)                      # rate-limit strategy, jittered delay
match_failure(symptom="retries forever")    # retry-hammering pattern
verify(area="code", evidence={"Lint passes": True})
incident_for(symptom="deploy failed")
```

## Auth / env

- `TALOCODE_API_KEY` — hosted API key from StackLane Cloud
- `TALOCODE_BASE_URL` — defaults to `https://api.talocode.site`

## API surface

### Hosted endpoints (`/v1/reliabilitylane/*`)

| Method | Route | Credits | Returns |
|--------|-------|---------|---------|
| GET | `/v1/reliabilitylane/health` | 0 | service status |
| GET | `/v1/reliabilitylane/pricing` | 0 | credit table |
| GET | `/v1/reliabilitylane/capabilities` | 0 | dataset sizes + endpoints |
| GET | `/v1/reliabilitylane/patterns` | 1 | all failure patterns |
| GET | `/v1/reliabilitylane/patterns/:id` | 1 | single pattern |
| POST | `/v1/reliabilitylane/match` | 1 | matched patterns for a symptom |
| GET | `/v1/reliabilitylane/retries` | 1 | all retry strategies |
| POST | `/v1/reliabilitylane/retry-plan` | 1 | retry plan for an error |
| GET | `/v1/reliabilitylane/checklists` | 1 | all verification checklists |
| POST | `/v1/reliabilitylane/verify` | 1 | checklist verdict from evidence |
| GET | `/v1/reliabilitylane/playbooks` | 1 | all incident playbooks |
| POST | `/v1/reliabilitylane/incident` | 2 | playbook for a failure |
| GET | `/v1/reliabilitylane/antipatterns` | 0 | anti-patterns to avoid |

Credits: patterns/retry/verify 1 cr, incident 2 cr, reads from dataset 0–1 cr.

### Client methods

`health`, `pricing`, `capabilities`, `patterns`, `retries`, `checklists`, `playbooks`, `antipatterns`, `match(symptom=..., error=..., category=...)`, `retry_plan(status=..., code=..., message=...)`, `verify(area=..., checklist=..., evidence={...})`, `incident(symptom=..., error=...)`.

### Local engine

`classify_error`, `match_failure`, `plan_retry`, `verify`, `incident_for`, `get_reliabilitylane_pricing`, `get_reliabilitylane_capabilities`.

## CLI

```bash
reliabilitylane match "it keeps retrying the same call forever"
reliabilitylane retry-plan --status 429
reliabilitylane verify --area deployment --evidence "Service responds"
reliabilitylane incident "deploy failed"
reliabilitylane antipatterns
reliabilitylane patterns
reliabilitylane retries
reliabilitylane checklists
reliabilitylane playbooks
reliabilitylane list
reliabilitylane pricing
reliabilitylane capabilities
```

## Related packages

| Package | Install |
|---------|---------|
| ReliabilityLane (this package) | `pip install talocode-reliabilitylane` · `npm i @talocode/reliabilitylane` |
| RetryLane | `npm i @talocode/retrylane` |
| CalcLane | `pip install talocode-calclane` |
| SearchLane | `pip install talocode-searchlane` |
| XSearchLane | `npm i @talocode/xsearchlane` |
| DocuLane | `pip install talocode-doculane` |
| Codra | `pip install talocode-codra` |
| Tera | `pip install talocode-tera` |
| StackLane | `pip install talocode` |

## Talocode ecosystem

| Product | Repo |
|---------|------|
| **ReliabilityLane** (this repo) | [github.com/talocode/reliabilitylane](https://github.com/talocode/reliabilitylane) |
| Tera | [github.com/talocode/tera](https://github.com/talocode/tera) |
| Codra | [github.com/talocode/codra](https://github.com/talocode/codra) |
| SearchLane | [github.com/talocode/searchlane](https://github.com/talocode/searchlane) |
| StackLane | [github.com/talocode/stacklane](https://github.com/talocode/stacklane) |
| GateLane | [github.com/talocode/gatelane](https://github.com/talocode/gatelane) |
| ContextLane | [github.com/talocode/contextlane](https://github.com/talocode/contextlane) |
| ScreenLane | [github.com/talocode/screenlane](https://github.com/talocode/screenlane) |
| MemoryLane | [github.com/talocode/memorylane](https://github.com/talocode/memorylane) |
| Tradia | [github.com/talocode/tradia](https://github.com/talocode/tradia) |
| DevTool | [github.com/talocode/devtool](https://github.com/talocode/devtool) |
| XProLane | [github.com/talocode/xprolane](https://github.com/talocode/xprolane) |
| XSearchLane | [github.com/talocode/xsearchlane](https://github.com/talocode/xsearchlane) |
| Agent Browser | [github.com/talocode/agent-browser](https://github.com/talocode/agent-browser) |
| InvoiceLane | [github.com/talocode/invoicelane](https://github.com/talocode/invoicelane) |
| GeoLane | [github.com/talocode/geolane](https://github.com/talocode/geolane) |
| ClipLoop | [github.com/talocode/cliploop](https://github.com/talocode/cliploop) |

More: [github.com/talocode](https://github.com/talocode) · [talocode.site](https://talocode.site) · [docs.talocode.site](https://docs.talocode.site)

## License

MIT © Talocode
