Skip to main content

agentsafe

agentsafe stores encrypted configuration values in a project-local appconfig file. Encryption and decryption are performed by a customer-managed OCI KMS key; the file never contains plaintext or key material.

agentsafe init --profile DEFAULT --compartment <compartment-ocid> \
  --crypto-endpoint <vault-crypto-url> --key-id <key-ocid>
agentsafe set OPENAI_API_KEY
agentsafe get OPENAI_API_KEY

agentsafe set NAME VALUE is available for automation, but command-line arguments can be exposed in shell history and process listings. Prefer the hidden prompt (omit VALUE) or pipe the value to standard input.

Python SDK

Install the OCI provider extra in the application environment:

python -m pip install "agentconfigsafe[oci]"

Configure the KMS settings once with agentsafe init (shown above), or supply them directly when constructing AgentSafe. The default store is appconfig in the process's current directory; pass an explicit path when the application does not run from its project directory.

from pathlib import Path

from agentsafe import AgentSafe, KeyNotFoundError

safe = AgentSafe(
    Path("/srv/my-service/appconfig"),
    profile="DEFAULT",
    compartment="ocid1.compartment.oc1..example",
    crypto_endpoint="https://example-crypto.kms.us-phoenix-1.oraclecloud.com",
    key_id="ocid1.key.oc1..example",
)

try:
    api_key = safe.get("OPENAI_API_KEY")
except KeyNotFoundError:
    # Configure the secret before starting the application.
    raise RuntimeError("OPENAI_API_KEY has not been configured") from None

# Pass ``api_key`` directly to your API client; do not log it or write it to disk.

Settings resolve in this order: constructor arguments, AGENTSAFE_* environment variables, then ~/.agentsafe/config. The KMS provider defaults to OCI; the OCI profile, compartment OCID, crypto endpoint, and key OCID must all be configured. get() decrypts only for the duration of the call; list_keys() returns names without decrypting values.

The PyPI distribution is named agentconfigsafe; the Python import and CLI remain agentsafe.

Metadata

Release files for agentconfigsafe 0.1.1

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

Source distribution (sdist)

Source distribution for agentconfigsafe 0.1.1
File Size Uploaded Provenance Actions
agentconfigsafe-0.1.1.tar.gz 17.8 kB With provenance Details for agentconfigsafe-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agentconfigsafe 0.1.1
File Interpreter ABI Platform Actions
agentconfigsafe-0.1.1-py3-none-any.whl Python 3 none any Details for agentconfigsafe-0.1.1-py3-none-any.whl

Total release size: 29.6 kB

Release files / agentconfigsafe-0.1.1.tar.gz

Download URL agentconfigsafe-0.1.1.tar.gz
Size 17.8 kB
Tags Source
SHA-256 checksum
How to use checksums
3970ebed395c52322d0c109296748381c0d08616ba5b0442ee8b2bc1a7f89229
BLAKE2b-256 checksum
How to use checksums
aafd0457edfbee66efafd4b661680c2866fca3cbc5ae26fbcef2c92ad4c2659b
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 Sep 15, 2026.

Transparency log

Release files / agentconfigsafe-0.1.1-py3-none-any.whl

Download URL agentconfigsafe-0.1.1-py3-none-any.whl
Size 11.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
02dd65bc16320d9307f7ac4dc904e5c524c6e147a17085f1a0f28734bb327d2f
BLAKE2b-256 checksum
How to use checksums
06fd77ea85cb1a1490f92d3e8a0acf20a4d3947e2d7615338cb0ab883736c77d
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 Sep 15, 2026.

Transparency log

Security for agentconfigsafe 0.1.1

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.

Select from 2 files

Attestation for agentconfigsafe-0.1.1.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 Sep 15, 2026.

Transparency log

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.

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