Frevana Agent App Runner
Paste the following into Codex or Claude Code and replace <AGENT_APP_URL> with a Frevana Agent App share link. Append a task or input if you already know what you want the App to do. Otherwise, the agent first reads the App's tasks and suggests what you can do.
Help me install this Agent App:
<AGENT_APP_URL>
Follow the instructions at https://frevana.com/SKILL.md
Browser authorization
The agent uses Python 3.10+ to install the pinned PyPI package in a user-owned virtual environment, then runs frevana-runner prepare "<share URL>". Platform-specific commands and task instructions are in the installation guide.
The share URL selects dev or production automatically; an explicit --environment must match it. On first use, open the printed authorization URL in a browser on this computer, sign in and choose Allow. The Runner receives the callback, stores credentials in the system credential store and renews them automatically. Preparing downloads the App snapshot and makes its jobs and scripts available locally. The agent uses frevana-runner exec when you choose a task.
Complete the browser authorization within 10 minutes. If the page says authorization could not be completed, run prepare again to open a fresh link; refreshing an expired page does not restart authorization.
Each environment has its own registration, credentials and cached results. Existing legacy Runner credentials are not imported. Copies from the same grant reuse saved results; a new grant starts a separate cache without deleting old files.
frevana-runner logout clears local production credentials. For dev use frevana-runner --environment development logout. To revoke the server authorization too, open the Authorized apps URL printed by logout and locate its grant ID.
Deployment prerequisites
Enable the agent_app_external_run scenario and assign the following operations through the existing OAuth scenario admin page in both dev and production, along with the business operations required by the package:
POST /agent-app-shares/:share_code/download— download the shared package.GET /subscriptions/user— check the authorized account's balance.GET /users/me— identify the account for persistent App instances (new in 0.1.2).PUT /ai-team/:team_id— register an App instance withtype: "skillpack"(new in 0.1.2).GET /credits/usage-by-run— query attributed run consumption (new in 0.1.2).
The Runner calls these routes beneath the environment's OAuth resource path, /agent-app-external-run, using its current access token. Before asking the user to authorize, it checks that the public resource metadata advertises the agent_app_external_run scope. The server checks current permissions on each request; adding an operation does not require new consent. Existing credentials, including older route-hash scopes, are reused and renewed without changing their grant or package cache. A preparation request rejected with HTTP 403 leaves the authorization intact so it can be reused after access is restored. Enable the new permissions before rolling out 0.1.2, publish the Runner before deploying the matching Web guide, and enable NEXT_PUBLIC_AGENT_APP_RUNNER_ENABLED=true independently for each Web environment.
App instances and run credit usage
prepare returns app_instance_id and auth_id in addition to the existing package metadata. It identifies the current account through /users/me and associates an instance UUID with the download descriptor's share_id (not the URL's share code). Instance records are saved at ~/.frevana/agent-app/ids/<environment>/<sha256(auth_id)>/<sha256(share_id)>.json. Each record contains the account, share and App IDs, app_instance_id, and a registered flag, without credentials. A file lock and atomic writes protect concurrent preparation. The UUID is saved before the first registration request, so retrying a lost response uses the same ID with the existing create-or-update endpoint. Once confirmed, registration is skipped. Reauthorization by the same account, snapshot updates and Runner upgrades reuse this cache; clearing it or using another computer creates a new instance. A legacy prepared package is registered on its first execution without another download.
# A new logical task gets a fresh UUID.
frevana-runner exec "<share URL>" -- <program> <args...>
# Subsequent steps, status checks and recovery keep the same RUN_ID.
frevana-runner exec --run-id "<RUN_ID>" "<share URL>" -- <program> <args...>
# Read the matching record array without executing a task.
frevana-runner usage "<share URL>" "<RUN_ID>"
--run-id must precede the share URL because everything after the share belongs to the child command. Before execution, the Runner saves the run's environment, account, share, App and instance IDs at ~/.frevana/agent-app/runs/<environment>/<sha256(auth_id)>/<sha256(share_id)>/<run_id>.json. Recovery validates this binding, including after reauthorization to the same account. It never guesses the latest run. Package outputs still use the existing grant-scoped cache, so keep the original work directory when recovering work.
A frevana_run_started event on stderr contains run_id and app_instance_id. The child and its descendants receive FREVANA_AGENT_RUN_ID and FREVANA_AGENT_APP_INSTANCE_ID, overriding inherited values without changing the parent shell. Skills forward attribution themselves; the relay does not inject headers for old skills. Reusing an ID groups attribution and does not make paid submissions idempotent.
After a script exits, the Runner reads /credits/usage-by-run?run_id=... with the current token, verifies that the authorization has not changed, and selects the row matching both the run and instance. A matching row emits frevana_run_usage on stderr with run_id, team_id, and credits_consumed. Values are cumulative, including earlier steps and recovery; do not add successive totals together. Async work may settle later, so query again when it completes. Recorded zero is valid. No matching record produces no consumption event or user-facing hint, including for old skills that omit attribution. Automatic query errors are also silent and preserve the script's stdout and exit code; the usage request has a 10-second network timeout. Explicit usage returns the matching array or [], and reports lookup errors with exit code 1. It never registers an instance, starts a task or infers consumption from balance changes.
Credit shortfalls and continuing work
frevana-runner credits "<share URL>" reads the current authorization's balance through GET /subscriptions/user. JSON output contains balance_status (known or unknown), available_credits (a number or null), top_up_url, and upgrade_url. Exit code 1 and an error mean the balance could not be confirmed, not that it is zero. This command does not need to download or execute the App and does not calculate task consumption.
During exec, an observed Frevana credit refusal produces at most one JSON event on stderr with event: "frevana_credit_required", code: "insufficient_credits", and the same billing links. The child process keeps its stdout, stderr and exit code; responses are forwarded unchanged and no request is retried. Observation covers bounded JSON error responses, failed task envelopes and SSE error events, including gzip/deflate. Each JSON body or SSE event is limited to 64 KiB for inspection; larger payloads, binary data and unsupported content encodings pass through without inspection. Scripts using a hardcoded API origin bypass the relay, so their explicit errors must still be handled using the guide.
The agent checks which results actually exist, explains the unfinished steps and offers the existing recharge and upgrade pages. The chat tells the user to use the authorized Frevana account and return with "continue" after purchasing. On return, the agent checks the balance and existing job status, then uses the App's existing resume support. The Runner does not terminate scripts, perform automatic payment or introduce a generic task-resume engine.
Publish the package and update the website
Run these commands from the Runner checkout. The release script uses uv and keeps the publishing token in macOS Keychain. On first use or after rotation, create a PyPI token scoped to frevana-agent-app-runner and paste it at the hidden terminal prompt.
uv run --script scripts/release.py configure-keychain
- Set the version in
pyproject.tomland update the package pins and virtual environment paths inSKILL.md. From the release checkout, runuv run --script scripts/release.py build. It runs the tests, builds a wheel and source distribution in a fresh directory underdist/, checks the metadata and smoke-tests a fresh installation of the wheel. - Run
uv run --script scripts/release.py publish <artifact-directory>with the directory printed by the build. The script uploads the two files, compares their SHA-256 hashes with PyPI and verifies a fresh installation of the exact published version. Keep the same directory for any upload retry. Before rolling out a release with new OAuth operations, verify the deployment prerequisites above and prepare a test share. - With
frevana-webchecked out next to this repo, runuv run --script scripts/release.py sync-guide. It checks that both artifacts for the guide's pinned version are on PyPI before copying the Markdown tofrevana-web/public/SKILL.md. For documentation-only edits, begin here using the existing published pin. - Include the guide in the Web change. After it lands in
master, run the Web repository's Deploy Production workflow frommasterand wait for it to succeed. Runuv run --script scripts/release.py verify-guideto compare the production response with the local Markdown. When introducing a new prompt link, switch the Web copy prompt after its destination is live.
Metadata
Release files for frevana-agent-app-runner 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| frevana_agent_app_runner-0.1.2.tar.gz | 45.8 kB | Without provenance | Details for frevana_agent_app_runner-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| frevana_agent_app_runner-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for frevana_agent_app_runner-0.1.2-py3-none-any.whl |
Total release size: 67.9 kB
Release files / frevana_agent_app_runner-0.1.2.tar.gz
| Download URL | frevana_agent_app_runner-0.1.2.tar.gz |
|---|---|
| Size | 45.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2c9e9d5a824da3ff3f3d33f7da116fa9f6e24e598813babddbcef5c6f6654a4a
|
|
BLAKE2b-256 checksum How to use checksums |
4eb11f4c0806536a2ac51406d58446ddf7e9fe070c1ba7995249f0abc73106ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / frevana_agent_app_runner-0.1.2-py3-none-any.whl
| Download URL | frevana_agent_app_runner-0.1.2-py3-none-any.whl |
|---|---|
| Size | 22.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fbcc47ceaaebf301a30e32d8948cad7b531f4008c5b79be9c9132c12c697bab7
|
|
BLAKE2b-256 checksum How to use checksums |
704db1567f29748fba9edf72b156cc1c72b80df27deac634057ec7dd82bc2dc4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for frevana-agent-app-runner 0.1.2
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.