rare-agent-sdk
CLI tooling for the Rare agent identity lifecycle.
What It Is
rare-agent-sdk keeps its historical package name for now, but the supported public surface is CLI-only. It helps an agent register, manage identity, request upgrades, issue attestations, and complete Rare login flows against Rare-compatible platforms.
Who It Is For
- Agent operators and tool builders that want a packaged CLI
- Teams choosing between Rare hosted signing and self-hosted keys
- Operators testing end-to-end login and attestation flows locally
Why It Exists
Rare login is not just a single token exchange. Agents need to manage keys, sign fixed protocol payloads, refresh attestations, handle human verification upgrades, and produce delegation material for platforms. This package ships the Agent CLI and local signer needed to operate that lifecycle.
How It Fits Into Rare
rare-identity-protocoldefines the public protocol rulesrare-agent-sdkprovides the Agent CLI and local signer toolingRare Platform Kitis the platform-side toolkit that verifies what this CLI produces
Quick Start
pip install rare-agent-sdk
Use the hosted Rare API:
rare register --name alice --rare-url https://api.rareid.cc
rare refresh-attestation --rare-url https://api.rareid.cc
rare show-state --rare-url https://api.rareid.cc
Production Notes
agent_idis the Ed25519 public key and remains the primary identity key.- Two operating modes are supported:
hosted-signer: Rare manages signing on behalf of the agent.self-hosted: the agent keeps its own private key.
- Self-hosted keys are stored separately from the JSON state file under
~/.config/rare/keys/with0600permissions. rare-signerlets you keep the private key out of the main CLI process by signing over local IPC.- Imported Python modules under
rare_agent_sdkare internal implementation details and are not a supported public API.
Common CLI Flows
# start a local signer for self-hosted mode
rare-signer
# register and manage identity
rare register --name alice
rare register --name alice --key-mode self-hosted
rare set-name --name alice-v2
rare refresh-attestation
# request human verification upgrades
rare request-upgrade --level L1 --email alice@example.com
rare send-l1-link --request-id <request_id>
rare upgrade-status --request-id <request_id>
rare request-upgrade --level L2
rare start-social --request-id <request_id> --provider linkedin
# produce login material for a third-party platform
rare issue-full-attestation --aud platform
rare login --platform-url http://127.0.0.1:8000/platform
rare login --platform-url http://127.0.0.1:8000/platform --public-only
rare login --platform-url http://127.0.0.1:8000/platform --aud platform
rare platform-check --platform-url http://127.0.0.1:8000/platform
# recovery and inspection
rare doctor
rare recovery-factors
rare recover-hosted-token-email
rare recover-hosted-token-email-verify --token <token>
rare recover-hosted-token-social-start --provider x
rare show-state --paths
rare login is URL-first. By default it reads aud from the platform challenge response. Add --aud only to pin the expected audience and fail if the platform returns a different value.
Troubleshooting
Recent CLI error responses include a runtime block with:
python_executablesdk_versioncli_module_path
Use these commands to confirm the shell command, Python environment, and installed package all match:
which rare
python3 -m pip show rare-agent-sdk
python3 - <<'PY'
import sys, importlib.metadata, rare_agent_sdk.cli
print("python:", sys.executable)
print("rare-agent-sdk:", importlib.metadata.version("rare-agent-sdk"))
print("cli:", rare_agent_sdk.cli.__file__)
PY
To bypass shell PATH issues, run the CLI through the same Python interpreter explicitly:
python3 -m rare_agent_sdk.cli --rare-url https://api.rareid.cc show-state
To distinguish local environment issues from Rare API availability, verify the API directly:
curl -i -sS https://api.rareid.cc/healthz
curl -i -sS -X POST https://api.rareid.cc/v1/agents/self_register \
-H 'content-type: application/json' \
--data '{"name":"diag-agent"}'
Development
pip install -r requirements-test.lock
pip install -e .[test] --no-deps
pytest -q
python -m build
Related Repositories
- Main Rare repository:
https://github.com/Rare-ID/Rare
Metadata
Release files for rare-agent-sdk 0.2.5
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 |
|---|---|---|---|---|
| rare_agent_sdk-0.2.5.tar.gz | 28.8 kB | With provenance | Details for rare_agent_sdk-0.2.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rare_agent_sdk-0.2.5-py3-none-any.whl | Python 3 | none | any | Details for rare_agent_sdk-0.2.5-py3-none-any.whl |
Total release size: 47.7 kB
Release files / rare_agent_sdk-0.2.5.tar.gz
| Download URL | rare_agent_sdk-0.2.5.tar.gz |
|---|---|
| Size | 28.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ba201ee4b3b6dddff9aa3e90b0418b4a93c37e4732a18aa0480b5c34b78fc092
|
|
BLAKE2b-256 checksum How to use checksums |
8f34b23dce1a8a5fddb2830e86cac15b74a32aff661c47b5ddcbdb0ceea0b6b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Apr 27, 2026.
Transparency logRelease files / rare_agent_sdk-0.2.5-py3-none-any.whl
| Download URL | rare_agent_sdk-0.2.5-py3-none-any.whl |
|---|---|
| Size | 19.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3e8547431f67fd8c3bedb739c5c4d5758c6b5139bd5b893f9c048bf7e8519a14
|
|
BLAKE2b-256 checksum How to use checksums |
1726ccdbbabf999a6686d5cf0f203d3c90a6bd2e683d619f7b79a32a8e09c835
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Apr 27, 2026.
Transparency logSecurity for rare-agent-sdk 0.2.5
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for rare_agent_sdk-0.2.5.tar.gz
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 Apr 27, 2026.
Transparency logA 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.