Routeweiler

An async HTTP client that pays 402 responses automatically across x402, L402, MPP-Tempo and Stripe, with budgets and audit traces.

Stars
★ 33
Last updated
4mo ago
FARS reviewed
Sep 26, 2026
License
Apache-2.0
Primary language
Python

At a glance

How it runs
Library / SDK
Works with
Universal · cross-platform
Cost
Free, no paid service needed
Setup effort
Medium · a few setup steps
You'll need
Python 3.11+eth_account (EVM rails)LND node with admin macaroon and TLS cert (Lightning rail)Stripe API key and saved payment method (MPP-SPT rail)Shell / CLINetwork accessLocal filesystem
Typical use
Developers building autonomous agents that call paid APIs and want the 402 handshake handled inside the HTTP layer instead of per-rail payment code.
Not a fit if
  • Projects that only call free APIs and never hit paid auth
  • Teams wanting a managed service and not holding their own keys
  • Production systems that need a stable 1.0 API surface
Maintenance
Commits in the last 6 monthslast commit 2026-07-26

What does this agent do, and when should you use it?

Routeweiler is an async Python HTTP client for AI agents that intercepts 402 Payment Required responses and pays them without extra application code. It routes each challenge across four rails — x402 (EVM/Base), L402 (Lightning), MPP-Tempo (stablecoin) and MPP-SPT (Stripe) — using typed FundingSource objects, and it never transmits private keys out of your own process. Around that core sit local SQLite budget envelopes (BudgetEnvelope) that enforce per-session or per-agent spend caps with Ed25519-signed draw receipts, a Policy layer for host-based deny rules and per-call spend limits, and a TraceSink.sqlite recorder that writes one TraceEvent per call including the on-chain transaction hash. It ships on PyPI for Python 3.11+, is Apache-2.0 licensed, and is currently marked Beta. If you only need free endpoints, the payment machinery stays out of the way, but nearly all of its value shows up once a server asks to be paid.

You construct Routeweiler(funding=[...]) with any combination of Funding.base_usdc/Funding.base_sepolia_usdc, Funding.tempo_usdc/Funding.tempo_pathusd_moderato, LightningFundingSource.create(lnd, network=...), and Funding.stripe(api_key, customer, payment_method, currency). On each await client.get(url), the client reads the server's 402 challenge, applies Policy rules (RuleMatch(url_matches=...), deny, max_per_call_minor_units), and picks the best rail the server accepts. The chosen funding source then signs or authorises the payment locally: EIP-3009 transferWithAuthorization for USDC on Base, a BOLT-11 invoice paid through an LND gRPC LndClient, a Tempo type-0x76 charge transaction, or a Stripe Shared Payment Token minted at pay time. If a BudgetEnvelope is configured, reserved and settled amounts are checked before settling and BudgetExceededError is raised when a payment would breach the cap. With TraceSink.sqlite, every call — paid or free — produces one TraceEvent row with request_id, selected_rail, http_status and the transaction hash. The call returns the normal HTTP response.

  1. Developers building autonomous agents that call paid APIs and want the 402 handshake handled inside the HTTP layer instead of per-rail payment code.
  2. Teams that hold both an EVM wallet and an LND node and want routing to choose between x402 and L402 per challenge.
  3. Platform teams that need to cap spend per agent session and get a hard error rather than an over-budget charge.
  4. Finance or compliance workflows that need a local, queryable audit trail of every payment with its rail and on-chain hash.
  5. Product teams already using a saved Stripe card who want agents to make small USD/EUR/GBP purchases without crypto signing.
  6. Prototyping against Base mainnet, Base-Sepolia, or the Tempo Moderato testnet before committing to a rail.

Key setup facts

Pulled from the install and usage notes below. The project README has the current values.

Install / run
  • pip install routeweiler
Environment variables
PRIVATE_KEY STRIPE_API_KEY
Config files
response.json
Runtime
Python 3.11+

How do you install or deploy this agent?

Python 3.11+ is required.

pip install routeweiler

The x402 and MPP-Tempo rails additionally need eth_account to build a signing wallet. The L402 rail needs a running LND node plus an admin macaroon and TLS certificate path. The MPP-SPT rail needs a Stripe secret key, a customer id, and a saved payment method id.

How do you use this agent?

Minimal working example — build a LocalAccount from an environment variable and fund requests with Base USDC:

import asyncio
import os
from eth_account import Account
from routeweiler import Routeweiler, Funding

signer = Account.from_key(os.environ["PRIVATE_KEY"])

async def main():
    async with Routeweiler(funding=[Funding.base_usdc(wallet=signer)]) as client:
        response = await client.get("https://api.example.com/data")
        print(response.json())

asyncio.run(main())

Add tracing and a spend cap:

from routeweiler import BudgetEnvelope, Funding, Routeweiler, TraceSink

async with Routeweiler(
    funding=[Funding.base_usdc(wallet=signer)],
    trace_sink=TraceSink.sqlite("routeweiler.db"),
    budget_envelope=BudgetEnvelope(
        id="session-abc",
        cap_minor_units=500,
        cap_currency="usd",
        allowed_rails=["x402", "l402"],
        ttl_seconds=3_600,
    ),
) as client:
    response = await client.get("https://api.example.com/data")

Deny a host and cap per-call spend. A reference currency is mandatory when you use max_per_call_minor_units:

from routeweiler import Policy, PolicyRule, RuleMatch, Routeweiler

async with Routeweiler(
    funding=[...],
    policy=Policy(
        currency="usd",
        rules=[
            PolicyRule(
                name="deny analytics",
                when=RuleMatch(url_matches="*.tracking.io"),
                deny=True,
            ),
            PolicyRule(
                name="cap per call",
                when=RuleMatch(url_matches="*"),
                max_per_call_minor_units=500,
            ),
        ]
    ),
) as client:
    ...

Stripe as a funding source:

from routeweiler import Funding

funding = Funding.stripe(
    api_key=os.environ["STRIPE_API_KEY"],
    customer="cus_ABC123",
    payment_method="pm_XYZ789",
    currency="usd",
)

Inspect traces with the sqlite3 CLI:

sqlite3 ./routeweiler.db 'SELECT request_id, selected_rail, http_status FROM trace_events;'

Safety boundaries, hardening & integrations

Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.

Declared capability surface (blast radius)

Local shell command execution

Can run terminal commands; pair with approval gates or container/OS sandboxing.

Local filesystem read/write

Modifies local files; work on a clean Git branch or dedicated worktree.

Outbound network access

Makes outbound requests; verify telemetry settings and model data routing on private repos.

What are this agent's strengths and limitations?

Pros
  • One client covers four payment protocols — x402, L402, MPP-Tempo and MPP-SPT — so you don't write a separate integration per rail.
  • Key material stays in your process: signing happens through a local eth_account.LocalAccount or your own LND node, and the client does not transmit private keys.
  • Budget enforcement is concrete and per envelope, with cap_minor_units, allowed_rails, ttl_seconds, and Ed25519-signed draw receipts for reserved and settled amounts.
  • Built-in SQLite tracing writes one TraceEvent per call with selected_rail, http_status and the on-chain transaction hash.
  • Policy supports case-insensitive host globs and full-URL patterns plus a per-call minor-unit ceiling.
Limitations
  • Marked Beta, and pre-1.0 minor releases may contain breaking changes.
  • The L402 rail requires operating your own LND node and supplying an admin macaroon and TLS cert.
  • Spend caps only exist when a BudgetEnvelope is supplied; tracing still works without one but nothing is enforced.
  • Using max_per_call_minor_units without Policy.currency or an envelope cap_currency raises ValueError at construction.
  • Rail coverage is limited to the documented networks (Base, Base-Sepolia, Tempo Moderato testnet, Stripe currencies), so other chains need different tooling.

How does this agent compare with similar options?

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
Routeweiler This agent 53 · Major gaps Library / SDKFree ★ 33 4mo ago Python —
MartinLoop 64 · Some gaps — ★ 262 6d ago TypeScript Codex · Claude Code · OpenAI API
The Penniless Agent 53 · Major gaps Agent plugin / skillFree + model costs ★ 31 today JavaScript Claude Code
PlatformPlatform Multi-Agent Development Platform 62 · Some gaps CLIFree + model costs ★ 446 4mo ago C# Claude Code

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Major gaps
53/ 100 5-point scale 2.7 / 5
Trust 12/29
Reliability 8/14
Adaptability 12/18
Convention 11/18
Effectiveness 7/13
Verifiability 3/8
Why each dimension lost points
Trust12 / 29 · 2.1/5

README explicitly states private keys stay in-process and are never transmitted, and provides Policy deny rules, budget envelopes, and a TraceSink audit trail, giving real substance to data_flow_transparency and sensitive_data_handling (2). least_privilege scores only 1: the L402 example requires an LND admin.macaroon (highest-privilege credential) and the Stripe example uses sk_live_ keys, with no least-privilege or scoping guidance. user_confirmation scores 1: payments execute automatically after 402 interception, with no per-transaction human confirmation or threshold gate, only budget caps. external_effects scores 1: it performs real on-chain transactions and Lightning payments, irreversible external side effects, with no documented dry-run or simulation mode. rollback scores 1: only Ed25519-signed receipts and budget reserve/settle are mentioned; no refund or compensation path after payment failure. dependency_security scores 1: dependencies include x402, lnd-grpc-client, stripe, but there is no lockfile, no hash pinning, and no vulnerability scanning configuration. source_attribution scores 1: pyproject lists an author and repo URLs, but publisher identity is unverified, and the README LICENSE link is a relative ../../LICENSE path that may break on PyPI rendering.

Reliability8 / 14 · 2.9/5

self_consistency scores 2: README descriptions align with pyproject metadata, the CI matrix (3.11-3.14), and test markers, with no evident contradictions. failure_messages scores 2: README names specific exceptions (EnvelopeNotFoundError, BudgetExceededError, construction-time ValueError) with their trigger conditions, giving clear error semantics. dependency_availability scores only 1: dependencies are public PyPI packages, but no lockfile pins versions, crewai is excluded on 3.14, and niche packages like lnd-grpc-client are unverified; static review cannot confirm resolution succeeds.

Adaptability12 / 18 · 3.3/5

audience_and_scenarios scores 2: aimed at developers building paid agents, covering four rails (x402/L402/MPP-Tempo/MPP-SPT) plus LangGraph, CrewAI, and OpenAI Agents integration tests, with clear scenarios. capability_boundaries scores 2: README clearly delimits supported networks (Base, Base-Sepolia, Bitcoin, Regtest, Moderato), currencies, and unsupported behavior (no cap enforcement without an envelope). trigger_precision scores 2: url_matches host-glob versus full-URL matching, the slash-based distinction, and case-insensitivity are precisely specified. environment_fit scores 2: requires Python 3.11+, with prerequisites (LND node, Stripe key, EVM wallet) documented.

Convention11 / 18 · 3.1/5

license scores 3: the repository contains the full Apache-2.0 text, pyproject declares license and license-files, and classifiers agree, with ample evidence. information_architecture scores 2: README is layered into install, quick start, rails, funding sources, tracing, budgets, policy, releases, and license, clearly organized. install_notes scores 2: gives the pip command and Python version requirement, but omits configuration details for external dependencies like LND and Stripe. naming_stability scores 2: public API names (Routeweiler, Funding, Policy, BudgetEnvelope, TraceSink) are consistent and semantically clear. examples_and_faq scores 2: multiple runnable code examples are provided, but there is no FAQ section. known_limitations scores only 1: only the no-envelope-no-cap behavior and pre-1.0 breaking changes are noted; known limitations and unsupported scenarios are not systematically listed. versioning_changelog scores 2: SemVer adherence, stable/beta channels, and tag formats are described, but there is no concrete CHANGELOG file. maintenance_responsibility scores only 1: only an author email and Issues link exist, the publisher is unverified, and there is no maintenance commitment, security disclosure channel, or response-time statement.

Effectiveness7 / 13 · 2.7/5

output_usability scores 2: it returns standard httpx responses, and TraceEvent includes request_id, selected_rail, http_status, and on-chain tx hash, queryable via sqlite3, giving good output usability. marginal_value scores 2: it consolidates 402 payment negotiation, multi-rail routing, budgets, and auditing into a single HTTP client, a clear increment for agent payment scenarios. cost_benefit scores only 1: it pulls in heavy dependencies (eth-account, x402, lnd-grpc-client, stripe, cryptography) and requires an LND node or Stripe account, making integration and operations costly, with no lightweight alternative or cost comparison in the README.

Verifiability3 / 8 · 1.9/5

claim_traceability scores only 1: most README capability claims (routing, budgets, tracing, credential recovery) are not tied to specific source files or tests, so static review cannot locate implementation evidence. cross_source_corroboration scores only 1: README, pyproject, CI config, and test conftest partially corroborate each other on dependencies, Python versions, and test markers, but core payment logic has no cross-file support. fact_inference_separation scores only 1: README mixes marketing phrasing ('financial operating system for AI agent fleets') with factual description, without distinguishing verified facts from design intent, leaving readers unable to tell what is implemented versus planned.

Risks and how to mitigate them
  • L402 integration requires an LND admin.macaroon (highest-privilege credential) and the Stripe example uses sk_live_ keys; switch to least-privilege macaroons and test keys, and document credential scoping.
  • Payments execute automatically after 402 interception, with no per-transaction human confirmation or amount threshold; add explicit confirmation for high-value or first-time payments.
  • It performs real on-chain transactions and Lightning payments, irreversible external side effects; no dry-run or simulation mode is documented, so validate on testnets first.
  • Dependencies have no lockfile or hash pinning and include heavy or niche packages (x402, lnd-grpc-client, stripe); pin versions and run vulnerability scanning before production use.
  • Publisher identity is unverified and the README LICENSE relative link may break on PyPI rendering; verify the maintainer and security disclosure channel before production adoption.
  • README mixes marketing phrasing with factual description, and most capability claims are not tied to specific source files or tests; static review cannot confirm the actual implementation quality of payment routing and budget logic.
Evidence confidence: Low Reviewed Sep 26, 2026 Reviewed revision 809bc696114d
See the full review method →
Maintain this project? Add the FARS badge to your README

The badge shows the current review score and verdict and links back to this page. It refreshes about once an hour after a re-review.

FARS

[![FARS review](https://followagents.com/badge/routeweiler-python-sdk.svg)](https://followagents.com/en/agents/routeweiler-python-sdk)
<a href="https://followagents.com/en/agents/routeweiler-python-sdk"><img src="https://followagents.com/badge/routeweiler-python-sdk.svg" alt="FARS review"></a>

FAQ

What happens if I don't set a BudgetEnvelope?
No cap is enforced. The README states that tracing still works without an envelope but no spending limit applies; you must pass a BudgetEnvelope or an existing envelope id to get enforcement.
Do my private keys or Stripe secrets leave my machine?
Per the docs, no. EVM signing uses a local eth_account.LocalAccount, L402 pays through your own LND node, and for Stripe you supply the secret key, customer id and payment method id locally so Stripe can mint the Shared Payment Token.
Do I need accounts on all four rails?
No. You can pass any combination to funding=[...] and the router picks a rail the server accepts according to Policy; with only one source configured, only that rail is available.
How is the budget tracked once payments clear?
The envelope tracks reserved and settled amounts with Ed25519-signed draw receipts, and raises BudgetExceededError when a payment would breach the cap. Reusing an existing envelope id leaves that envelope unchanged.
Where do the traces live and how do I read them?
TraceSink.sqlite("./routeweiler.db") writes to a local SQLite file you can query directly, e.g. SELECT request_id, selected_rail, http_status FROM trace_events;.
Is Routeweiler free?
Yes. Routeweiler is free to use and does not need a paid service.
Is Routeweiler open source?
Yes. The source code is on GitHub (nikoSchoinas/routeweiler-python-sdk) under the Apache-2.0 licence.
Is Routeweiler safe to use?
FollowAgents' FARS review (Sep 26, 2026) scored Routeweiler 12/29 on trust and safety. None of the eight safety controls the review checks for was missing outright.
Is Routeweiler still maintained?
Development has slowed: the latest commit on GitHub is from 2026-07-26, within the last six months but not the last 30 days.
Who makes Routeweiler?
Routeweiler is published on GitHub by the account nikoSchoinas. FollowAgents has not verified which person or company is behind that account.
Was this page helpful?
View on GitHub ↗ Install ↓

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related concepts