agentsafe-sdk
v1.0.1
Published
JavaScript/TypeScript SDK for AgentSafe - URL trust scoring for AI agents
Maintainers
Readme
# agentsafe-sdk
JavaScript/TypeScript SDK for [AgentSafe](https://agentsafe.app) - Real-time URL trust scoring for AI agents.
## Installation
npm install agentsafe-sdk
## Usage
import { AgentSafe } from 'agentsafe-sdk';
const client = new AgentSafe('your-api-key');
// Check a URL
const result = await client.check('https://example.com', 'browse');
console.log(result.score); // 0-100
console.log(result.recommendation); // SAFE, CAUTION, RISKY
console.log(result.blocked); // true if RISKY
// Check and throw if blocked
await client.checkOrRaise('https://example.com', 'browse');
## Quick Check
import { check } from 'agentsafe-sdk';
// Uses AGENTSAFE\_API\_KEY environment variable
const result = await check('https://example.com');
## Actions
- browse - General web browsing
- payment - Payment pages
- login - Login pages
- download - File downloads
## Links
- [API Docs](https://api.agentsafe.app/api/docs)
- [Website](https://agentsafe.app)
