# AgentSafe Python SDK
Real-time URL trust scoring for AI agents. Block phishing, scam sites, and malicious redirects before your agent interacts with them.
## Installation
````pip install agentsafe```
## Quick Start
from agentsafe import AgentSafe
client = AgentSafe(api\_key="your\_api\_key")
result = client.check("https://example.com", action="payment")
print(result.score) # 0-100
print(result.recommendation) # TRUSTED or RISKY
print(result.blocked) # True or False
## Raise on Block
from agentsafe import AgentSafe
client = AgentSafe(api\_key="your\_api\_key")
\# Raises exception if URL is blocked
client.check\_or\_raise("https://example.com", action="payment")
## Environment Variable
import os
from agentsafe import check
os.environ\["AGENTSAFE\_API\_KEY"] = "your\_api\_key"
result = check("https://example.com", action="payment")
## LangChain Integration
from agentsafe import AgentSafe
safe = AgentSafe(api\_key="your\_api\_key")
def safe\_browse(url: str) -> str:
  safe.check\_or\_raise(url, action="browse")
  # proceed with browsing...
  return "Safe to proceed"
## Actions
- browse — general browsing
- payment — making a payment
- login — logging into a site
- download — downloading a file
## Get an API Key
Visit [agentsafe.app](https://agentsafe.app) to get your API key.
## License
MIT
Save it. 👊
Metadata
Release files for agentsafe-sdk 0.1.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 |
|---|---|---|---|---|
| agentsafe_sdk-0.1.0.tar.gz | 3.0 kB | Without provenance | Details for agentsafe_sdk-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agentsafe_sdk-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for agentsafe_sdk-0.1.0-py3-none-any.whl |
Total release size: 6.4 kB
Release files / agentsafe_sdk-0.1.0.tar.gz
| Download URL | agentsafe_sdk-0.1.0.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
57547987b4978fa93df19fdcf98d0cb93526e7afc1388be937d6b861298723d8
|
|
BLAKE2b-256 checksum How to use checksums |
1cc172102ebada8602ac8f0a04c87512a92da147aeb6e72af493916895d46e68
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / agentsafe_sdk-0.1.0-py3-none-any.whl
| Download URL | agentsafe_sdk-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
946f34b6fccbae19fe3edc3c1c1acbe2f6573460a2486ba685e091fc91c9e192
|
|
BLAKE2b-256 checksum How to use checksums |
5ac5afb4fbdb1af1e06ffae13dc8d90fc94cedacbb902a12ae2ba784e24b5c9b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Security for agentsafe-sdk 0.1.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.