getpharos
The Python SDK for Pharos — the trust control plane for enterprise AI agents.
Submit an agent action to Pharos before it executes and receive a policy verdict
(allow / block / modify / escalate) plus a cryptographically sealed evidence record —
two outputs of one transaction. The client honors the verdict deadline, retries transient
failures, and falls back to a safe local default if the platform is unreachable.
The SDK is dependency-free (Python standard library only) so it installs anywhere.
Install
pip install getpharos
Requires Python 3.9+.
Quickstart
from pharos_sdk import PharosClient, PharosBlockedError
client = PharosClient(
base_url="https://pharos.example.com",
api_key="pk_...",
deadline_ms=800,
local_fail_mode="fail_closed", # or "fail_open" for reversible actions
)
try:
result = client.submit(
tenant_id="acme",
agent_id="billing-agent",
action={"type": "payment.transfer", "payload": {"amount": 30000}},
)
verdict = result["verdict"]
if verdict["decision"] == "allow":
... # proceed with the action
except PharosBlockedError as e:
print("blocked:", e.reason, e.citations)
Workflow continuation (escalation → human verdict → resume)
When an action escalates, park it and resume exactly once after a human decision:
resolved = client.await_resolution(
tenant_id="acme",
escalation_id=result["escalation"]["id"],
)
What you get
- Deadline-aware requests that respect the verdict budget.
- Local fail-mode: reversible actions fail open, irreversible actions fail closed, when Pharos is unreachable — the same semantics as the server.
- Framework adapters for CrewAI and the MS Agent Framework (
crewai_tool,ms_agent_tool), plus a genericgovern_tool/Governor.
Verification
Every verdict is backed by a sealed, hash-chained evidence record that any third party can verify offline from the exported bundle and the published public keyset — no Pharos infrastructure required. See the main repository for the evidence model and the offline verifier.
License
Apache-2.0.
Metadata
Release files for getpharos 0.2.0
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 |
|---|---|---|---|---|
| getpharos-0.2.0.tar.gz | 10.1 kB | With provenance | Details for getpharos-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| getpharos-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for getpharos-0.2.0-py3-none-any.whl |
Total release size: 19.3 kB
Release files / getpharos-0.2.0.tar.gz
| Download URL | getpharos-0.2.0.tar.gz |
|---|---|
| Size | 10.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
963c1f5f5f31d70c571a0d3a3a3173cbcb315c083d188ce04f6d3158895c9a4e
|
|
BLAKE2b-256 checksum How to use checksums |
b5314b8ac00ca23ac939cc8f96243b04fc73e1b8202f825f78e00ea31b58cb94
|
| 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 Aug 3, 2026.
Transparency logRelease files / getpharos-0.2.0-py3-none-any.whl
| Download URL | getpharos-0.2.0-py3-none-any.whl |
|---|---|
| Size | 9.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0c7079fa515750d0f7e10734a0c1f8312b28e72ceed4765ba23e11c803bbee63
|
|
BLAKE2b-256 checksum How to use checksums |
e441b35c35873eea5b8d64f7009f6db8a765f4c305770cd914f89960069cb10a
|
| 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 Aug 3, 2026.
Transparency logSecurity for getpharos 0.2.0
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
Both files in this release have been uploaded with provenance metadata.
Attestation for getpharos-0.2.0.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 Aug 3, 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.