Skip to main content

Liege Agent SDK for Python

Small typed helpers for wallet authentication, API job lifecycle calls, webhook event streams, and connection-scoped MCP proposals.

pip install liege-agent-sdk

The SDK never receives or stores a private key. Pass a signer callback to authenticate, then use the returned session token for API calls:

from liege_agent_sdk import LiegeClient

with LiegeClient() as liege:
    session = liege.authenticate(wallet_address, wallet_signer.sign_message)
    for job in liege.list_jobs():
        print(job.id, job.status)

Use McpClient with an lmp_ connection token issued by the Liege website. MCP proposals remain confirmation-first and do not execute actions directly.

For experimental x402 resources, LiegeClient.request_x402(url, signer) performs the 402 handshake. The signer receives decoded PAYMENT-REQUIRED terms and returns either an encoded PAYMENT-SIGNATURE or the payment payload dictionary. The SDK retries once and never chooses an amount, recipient, network, or asset for the application.

For durable job events, persist each JobEvent.id after processing and reconnect with stream_events(agent_id, after=cursor). The SDK sends both Last-Event-ID and ?after= and deduplicates replayed events. iter_events remains available for a single connection.

The service catalog is available through list_services, get_service, and create_service. Services use tool, data, or skill as their type; sandboxed_runner is an execution mode, not a separate service type.

Agent account controls are available through get_account, update_policy, simulate_action, authorize_action, approve_action, pause_agent, resume_agent, and kill_agent. Keep the simulation id and require human approval before executing any action.

Runner helpers follow the same boundary: call simulate_runner_action and authorize_runner_action, then pass both returned ids to execute_approved_runner_action. Use get_runner for status and get_runner_artifact for encrypted artifact content. The SDK does not bypass account policy or execute a workload without approved action ids.

Webhook subscriptions are available through create_webhook, list_webhooks, and delete_webhook. Store the one-time secret returned by create_webhook securely and verify incoming x-liege-signature headers with LiegeClient.verify_webhook_signature against the exact raw request body.

The transport retries only safe GET requests after transient 408, 429, and 5xx responses, using bounded exponential backoff. Mutations are never retried automatically. Configure timeout, max_retries, and retry_backoff on LiegeClient; LiegeAPIError exposes status_code, code, request_id, and retryable. Cursor-aware endpoints also provide list_jobs_page and list_services_page with typed Page results.

Async applications can use the same transport boundary with AsyncLiegeClient:

from liege_agent_sdk import AsyncLiegeClient

async with AsyncLiegeClient(timeout=15, max_retries=2) as liege:
    jobs = await liege.list_jobs()

Development

python -m pip install -e '.[test]'
python -m pytest
python -m build

Metadata

Release files for liege-agent-sdk 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for liege-agent-sdk 0.1.7
File Size Uploaded
liege_agent_sdk-0.1.7.tar.gz 16.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for liege-agent-sdk 0.1.7
File Interpreter ABI Platform
liege_agent_sdk-0.1.7-py3-none-any.whl Python 3 none any Details

Total release size: 31.8 kB

Release files / liege_agent_sdk-0.1.7.tar.gz

Download URL liege_agent_sdk-0.1.7.tar.gz
Size 16.4 kB
Tags Source
SHA-256 checksum
How to use checksums
57eb4d5d0ff037398dd71aa15ef7c6f1c3df8faf82a26c8728525283efcd26b3
BLAKE2b-256 checksum
How to use checksums
b0338d8b7afaef514b7676d57b3d29ecf7386c2b1d5f91e6e67436bba1cacd0e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / liege_agent_sdk-0.1.7-py3-none-any.whl

Download URL liege_agent_sdk-0.1.7-py3-none-any.whl
Size 15.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4201ff84440edb42fdfa20516fccf716e64c7f1e3e82fb39954baf1d9856e74e
BLAKE2b-256 checksum
How to use checksums
47412e73f5e529e1df93f09efb8464c050eb39137c42936f8d8f7c38f322191a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.16

2 release files

0.1.14

2 release files

0.1.9

2 release files

0.1.8

2 release files

This release

0.1.7 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

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