Real-time URL trust scoring for AI agents
Project description
# 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. 👊
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentsafe_sdk-0.1.0.tar.gz.
File metadata
- Download URL: agentsafe_sdk-0.1.0.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57547987b4978fa93df19fdcf98d0cb93526e7afc1388be937d6b861298723d8
|
|
| MD5 |
d8e02c6e29a6fc30bfbf783c57a53927
|
|
| BLAKE2b-256 |
1cc172102ebada8602ac8f0a04c87512a92da147aeb6e72af493916895d46e68
|
File details
Details for the file agentsafe_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: agentsafe_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
946f34b6fccbae19fe3edc3c1c1acbe2f6573460a2486ba685e091fc91c9e192
|
|
| MD5 |
23245aeac01ea84361452698cddaafb3
|
|
| BLAKE2b-256 |
5ac5afb4fbdb1af1e06ffae13dc8d90fc94cedacbb902a12ae2ba784e24b5c9b
|