Client SDK and worker runtime for the AIR platform
Project description
Papermap AIR Python SDK
Build applications and outbound tool workers for the Papermap Agentic Infrastructure Runtime (AIR).
Install
pip install papermap-air
Python 3.10 or newer is required.
Start a run from your application
Create a project and agent in the AIR console, issue an app key from the project settings page, and keep the key in your secret manager.
import asyncio
import os
from air import AirClient
async def main() -> None:
async with AirClient(
os.environ["AIR_BASE_URL"],
os.environ["AIR_APP_KEY"],
) as client:
run = await client.runs.create(
agent_id="support-agent",
input={"question": "Where is order 1042?"},
context={"tenant_id": "acme"},
)
result = await client.runs.wait(run.id, timeout=120)
print(result.output)
asyncio.run(main())
Run a tool worker
Put your tool declarations in tools.py:
from air import tool
@tool
def lookup_order(order_id: str, context: dict) -> dict:
"""Look up an order in the customer's system."""
return {
"order_id": order_id,
"tenant_id": context["tenant_id"],
"status": "shipped",
}
Issue a worker key from the AIR project, store it as an environment variable, and start the worker:
export AIR_BASE_URL="https://airapi.example.com"
export AIR_WORKER_KEY="<worker-key>"
export AIR_WORKER_ENV="production"
air worker start --module tools
Newly discovered tools appear as pending in the AIR console. Review and enable them before attaching them to an agent version.
Keys
- App keys let an application create runs and read their results.
- Worker keys let an outbound worker register tools and claim tool calls.
- Never commit either key or pass a worker key through the
--keyCLI option in shared or production environments. PreferAIR_WORKER_KEY.
License
Proprietary. Copyright Papermap. All rights reserved.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file papermap_air-0.1.0.tar.gz.
File metadata
- Download URL: papermap_air-0.1.0.tar.gz
- Upload date:
- Size: 10.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e9d77473390310208a2043470ff8a49b3df815ce0f4a659fe27b7039e67828b
|
|
| MD5 |
b8603d0c5ffee1e3420dab456a56e33e
|
|
| BLAKE2b-256 |
0a6e4912bcbf2d996517d97a5c43dca16538e5f59f5cf4c9487275815a9da626
|
Provenance
The following attestation bundles were made for papermap_air-0.1.0.tar.gz:
Publisher:
publish-sdk.yml on Papermap-ai/papermap-air
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
papermap_air-0.1.0.tar.gz -
Subject digest:
1e9d77473390310208a2043470ff8a49b3df815ce0f4a659fe27b7039e67828b - Sigstore transparency entry: 2155933980
- Sigstore integration time:
-
Permalink:
Papermap-ai/papermap-air@2ae3c73aeca6b88456d1a9b0b1223428f892bff0 -
Branch / Tag:
refs/tags/sdk-v0.1.0 - Owner: https://github.com/Papermap-ai
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-sdk.yml@2ae3c73aeca6b88456d1a9b0b1223428f892bff0 -
Trigger Event:
push
-
Statement type:
File details
Details for the file papermap_air-0.1.0-py3-none-any.whl.
File metadata
- Download URL: papermap_air-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57549a9372439306d4d611aa420742929c1f5b45d4210975ee26186492411ff8
|
|
| MD5 |
1caacb042aeb3f62b2f432925dadfc5b
|
|
| BLAKE2b-256 |
7ea0e7b9a491639f390531e406c43dda3dc4c62ffe3d93cb01a62ca8ba263aa7
|
Provenance
The following attestation bundles were made for papermap_air-0.1.0-py3-none-any.whl:
Publisher:
publish-sdk.yml on Papermap-ai/papermap-air
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
papermap_air-0.1.0-py3-none-any.whl -
Subject digest:
57549a9372439306d4d611aa420742929c1f5b45d4210975ee26186492411ff8 - Sigstore transparency entry: 2155934003
- Sigstore integration time:
-
Permalink:
Papermap-ai/papermap-air@2ae3c73aeca6b88456d1a9b0b1223428f892bff0 -
Branch / Tag:
refs/tags/sdk-v0.1.0 - Owner: https://github.com/Papermap-ai
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-sdk.yml@2ae3c73aeca6b88456d1a9b0b1223428f892bff0 -
Trigger Event:
push
-
Statement type: