Skip to main content

Recurse SDK

Author, package, and deploy Recurse applications.

Installation

Python 3.14 or newer is required. Install Recurse from PyPI:

pip install recurse-sdk

This installs both the recurse command and the Python API. Check the installation:

recurse --help

If you prefer uv, install the CLI as an isolated tool:

uv tool install recurse-sdk

Add the Python API to an application:

uv add recurse-sdk

Running or deploying an application also requires uv on your PATH to build its package.

The distribution ships two things:

  • The recurse Python package: manifest validation, standards-based application packaging (recurse.build_bundle), and the runtime context tools use during a run (recurse.context).
  • The recurse command: browser login, encrypted runtime-secret management, direct runs, MCP deployment, artifact retrieval, and billing.

Quickstart

An application is a directory with an agent.yaml manifest, a system prompt, a tool module, and a uv lockfile. See the runnable examples and authoring and deployment guide:

  • examples/tiny-tuner — tune a classifier against held-out validation F1.
  • examples/rna-fold-lab — design RNA sequences against an independent forward-fold oracle.
  • examples/backpack-3d — write, render, visually critique, and revise a 3D backpack using Astra and complete Python modeling programs.
recurse login
recurse secret set github-token
recurse secret list
recurse run examples/tiny-tuner --inputs inputs.json --secret GITHUB_TOKEN=github-token
recurse deploy examples/tiny-tuner --as mcp --cpu 1 --memory-mib 1024 \
  --secret GITHUB_TOKEN=github-token
codex mcp add recurse -- recurse mcp serve <deployment-id>
claude mcp add recurse -- recurse mcp serve <deployment-id>

For Codex, apply the startup and tool timeout settings shown in the guide after adding the server.

Documentation

Contributing

Run ./check.sh for formatting, lint, types, tests, generated-reference checks, and package builds. The SDK and examples must reach 100% statement and branch coverage. The RNA and backpack examples' tests and dependencies live under their own tests directories and use separate locked environments.

Install the same gate before committing:

uv tool install pre-commit
pre-commit install

Publishing

pyproject.toml sets readme = "README.md", so package builds embed this README as the PyPI description. Editing it on GitHub does not update an existing release: PyPI retains the metadata from that release's first upload. To publish a corrected description with the next SDK release:

  1. Choose an unpublished version, update project.version in pyproject.toml, and run uv lock. Update the SDK version reported in src/_recurse_cli.py and its matching CLI tests. Also run uv lock --directory examples/rna-fold-lab/tests and uv lock --directory examples/backpack-3d/tests to refresh their local SDK dependency.
  2. Run ./check.sh to validate the release and build its wheel and source distribution in dist/.
  3. Inspect the wheel's .dist-info/METADATA and the source distribution's PKG-INFO. Their description must match the current README, with pip install recurse-sdk first and uv tool install recurse-sdk as an optional alternative.
  4. With PyPI publishing access, upload only the two files for that version using uv publish dist/recurse_sdk-<version>-py3-none-any.whl dist/recurse_sdk-<version>.tar.gz, replacing <version> with the selected version.
  5. Check the new release's description on PyPI and the default project page. In a fresh Python 3.14 environment outside this checkout, run pip install recurse-sdk, pip check, and recurse --help. Confirm pip show recurse-sdk reports the published version.

Version 0.1.0 retains its original description. Publish a new version to refresh the default project page; PyPI does not allow replacing previously uploaded files.

License

Licensed under the Apache License 2.0.

Release files for recurse-sdk 0.1.6

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

Source distribution (sdist)

Source distribution for recurse-sdk 0.1.6
File Size Uploaded
recurse_sdk-0.1.6.tar.gz 38.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for recurse-sdk 0.1.6
File Interpreter ABI Platform
recurse_sdk-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 78.8 kB

Release files / recurse_sdk-0.1.6.tar.gz

Download URL recurse_sdk-0.1.6.tar.gz
Size 38.6 kB
Tags Source
SHA-256 checksum
How to use checksums
dbed9ab743cf1ae6da8dfcfb50ba6be9ef0780bb1737039318230f127cc2b17e
BLAKE2b-256 checksum
How to use checksums
bc836ae5a2fa919d3aa9422ea08704f59e03fdaadf07321817c7a068e96e7f53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","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 / recurse_sdk-0.1.6-py3-none-any.whl

Download URL recurse_sdk-0.1.6-py3-none-any.whl
Size 40.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b4a120a978238021e753cf8f79c57686c07916d79bae34c4bb11f72fb482d90f
BLAKE2b-256 checksum
How to use checksums
16a5a9c72390307cd95405215b48e2509075623c1b29e498a3fe525874874652
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","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 history Release notifications | RSS feed

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.8

2 release files

0.1.7

2 release files

This release

0.1.6 This release

2 release files

0.1.5

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

0.0.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