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 --application <name> --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. init stores named application
profiles only in ~/.agentsafe/config. The ciphertext store is created on the
first set; by default it 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"),
application="billing",
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.
~/.agentsafe/config stores named application profiles, so different
applications can use separate profiles, compartments, vault endpoints, and
keys. agentsafe init --application billing ... registers that named profile;
use application="billing" when constructing an SDK instance to select it.
Settings resolve in this order: constructor arguments,
AGENTSAFE_* environment variables, the selected application's appconfig,
then ~/.agentsafe/config as a machine-wide fallback. 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.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 |
|---|---|---|---|---|
| agentconfigsafe-0.1.2.tar.gz | 20.4 kB | With provenance | Details for agentconfigsafe-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agentconfigsafe-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for agentconfigsafe-0.1.2-py3-none-any.whl |
Total release size: 32.7 kB
Release files / agentconfigsafe-0.1.2.tar.gz
| Download URL | agentconfigsafe-0.1.2.tar.gz |
|---|---|
| Size | 20.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
05b7580aca0e07f80869c2d25a5e7a8c9205b4ddbe42087d2b6a7683665c0d93
|
|
BLAKE2b-256 checksum How to use checksums |
6340558686268994899ec086222ece9b3ebf7365791505c87c6bfaee0382b481
|
| 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 logRelease files / agentconfigsafe-0.1.2-py3-none-any.whl
| Download URL | agentconfigsafe-0.1.2-py3-none-any.whl |
|---|---|
| Size | 12.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f6926205b063b642c277a2043983a1acb7f291078482a4ec4ab449bc553889ce
|
|
BLAKE2b-256 checksum How to use checksums |
eb701ec0ae454eba6a10a19a2f10a800d97dbf6221af74e3d4c384814961bc61
|
| 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 logSecurity for agentconfigsafe 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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for agentconfigsafe-0.1.2.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 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.