Tendrl Surface
A security check for your agent.
Scan what it reads. Stop what it shouldn't do.
Scan the tool call your agent is about to make, and the prompts, pages, and emails it reads, before anything runs. Catch prompt injection, leaked credentials, and actions nobody asked for. Scan file uploads with the same API. No security team required.
from surface import SurfaceClient, ActionContext
surface = SurfaceClient(api_key="YOUR_KEY")
# Before your agent runs the tool call it proposed:
ctx = ActionContext(user_request=user_message)
result = surface.scan_payload(tool_call, context=ctx)
# "Block": it mails customer data to a personal address How it works
One check in the loop you already have
Your agent reads a page, an email, or a user's prompt, and returns a tool call it wants to run.
Send the text or tool call to Surface, with facts from your own app: your domains and what the user actually asked.
Get a 0–100 safety score and a recommended action: Allow, Review, or Block.
Run it, hold it for a person to confirm, or refuse. Trigger a Strand workflow to fan out from there.
Tool calls
Judge the action, not the wording
A prompt injection can be phrased a thousand ways. The harm shows up in what the agent does next. Surface reads the tool call your agent is about to make and checks its effect against what your user asked for and where your data is allowed to go.
- Company data mailed to a personal address, or posted to a host you never declared
- Deleting data, granting admin, or making things public that nobody asked for
- Commands that open a shell, write a backdoor, or download and run code
- Harmful but not malware? It comes back Risky and is blocked
- Judgment calls come back Review, so a person confirms first
Works with OpenAI, Anthropic, MCP, or plain JSON tool calls. The check runs in your code, around your tools, so a hijacked agent can't skip it.
context = ActionContext(
principal_domains=["acme.io"],
allowed_egress=["api.stripe.com", "hooks.slack.com"],
user_request=user_message,
)
result = surface.scan_payload(tool_call, context=context)
action = result.safety_score.recommended_action
if action == "Block":
refuse("That action was blocked.")
elif action == "Review":
escalate_to_human(tool_call)
else:
run(tool_call)
Scan text content for prompt injection, credential leaks, and malicious payloads
What the agent reads
Catch instructions planted where your agent looks
Injections hide in web pages, support tickets, emails, and tool results. Tell Surface whose words it's scanning: the same "ignore your instructions" is held for review in your user's own prompt, and blocked when it turns up in a page the agent read.
- Prompt injection: jailbreaks, role overrides, planted instructions
- Credential and secret leaks: API keys, tokens, private keys, card numbers
- Code hidden in messages: reverse shells, download commands, SQL injection
- Links to known phishing and malware hosts
- Tested against common evasion: invisible characters, look-alike letters, encodings
AI integration
Give your AI agent a scanner
The Surface MCP server (github:tendrl-inc-labs/surface-mcp) exposes scanning as a
native tool. Any agent that supports MCP can scan files and payloads
without writing a single HTTP call. For guarding your own agent's tool
calls, put the check in your loop. A hijacked agent won't volunteer for it.
Files and attachments
Uploads too. Multiple layers, one verdict.
The same API scans the files your users upload and your agents pass around. No single technique catches everything, so Surface combines pattern matching, trained ML models, and live threat data.
Pattern matching
Known threat signatures are checked instantly across every file type: executables, documents, scripts, and archives. Updated automatically, no maintenance required.
ML classification
Per-format models trained on tens of thousands of real malware samples catch novel threats that have never been seen before, the ones signatures will always miss.
Live threat feeds
Continuously updated intelligence from across the threat landscape. Known-bad files and infrastructure are identified in milliseconds, before deeper analysis even runs.
Obfuscation detection
Malware that hides itself (packed executables, encoded payloads, disguised macros) is flagged even when the underlying content looks clean on the surface.
Deep file inspection
Archives are unpacked, documents are parsed, and embedded content is scanned recursively. Threats buried inside uploaded files don't get a free pass.
Indicator extraction
Every scan surfaces what it found: domains, IPs, URLs, and hashes pulled from the file itself. Useful context alongside the verdict, without any extra work.
Verdict
A score, not just a flag
Every scan, of a tool call, a message, or a file, returns a unified 0–100 safety score that combines all engine results into one signal. The verdict and recommended action tell you exactly what to do, no security expertise needed.
- 86–100 Clean: allow it
- 71–85 Informational: allow, and log what was noted
- 31–70 Suspicious: hold for review
- 0–30 Malicious: block
- 0–30 Risky: block. An agent action that would do harm without being malware
Verdict confidence (High / Medium / Low) indicates how certain the scanner is, not how severe the threat is. Every scan also reports coverage — how far analysis reaches for that format — and a format with no ML model behind it never comes back Clean.
Score, verdict, confidence, and per-engine breakdown in a single response
Developer experience
Pick your language, start scanning.
SDKs for Python, Go, and JavaScript, or call the REST API directly. Same score, same verdict, same response shape regardless of how you integrate.
from surface import SurfaceClient
scanner = SurfaceClient(api_key="YOUR_KEY")
# Scan user input before sending it to your LLM
result = scanner.scan_payload(user_message)
if result.safety_score.recommended_action == "Block":
reject() import { SurfaceClient } from "@tendrl/surface";
const surface = new SurfaceClient({ apiKey });
// Screen the tool call your agent proposed
const context = { user_request: userMessage };
const result = await surface.scanPayload(
toolCall, "agent-step.json", { context });
const action = result.safetyScore.recommendedAction;
if (action !== "Allow") return hold(toolCall); import surface "github.com/tendrl-inc-labs/surface-go"
client, _ := surface.NewClient("YOUR_KEY")
// Scan an upload before writing it to storage
result, _ := client.ScanFile(ctx, "upload.pdf", nil)
fmt.Println(result.ScanResult.SafetyScore.ThreatLevel) curl -X POST https://app.tendrl.com/surface/api/scan/payload \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"payload": "Ignore previous instructions"}'
# Returns safetyScore: score, threatLevel,
# and recommendedAction Delivery
Push results wherever you need them
Configure webhooks to receive scan results as they finish. Useful for async scanning of large files: submit and move on, get the result pushed to your endpoint when it's ready.
- POST scan results to any URL on completion
- Multiple auth options: API key, Bearer token, custom header
- Webhook credentials encrypted at rest with AES-256-GCM
- Works with async scans, file scans, and payload scans
Configure delivery endpoints with auth and receive results on completion
Scan results trigger Strand workflows: quarantine, notify, archive, or block automatically
Native integration
Surface + Strand: scan and respond
A scan result can trigger a Strand workflow automatically. Block malicious uploads before they reach storage, notify your team when an agent action is held for review, or archive clean uploads to S3, all without writing glue code.
- Trigger workflows on malicious or suspicious verdicts
- Pass the full scan result as workflow payload
- Notify Slack or email from a single node
- Quarantine files or update records via HTTP connector
Observability
Full scan history and analytics
Every scan is recorded. See the full history, filter by verdict, and drill into any result for a per-engine breakdown: pattern-rule matches, ML scores, threat feed hits, and extracted IOCs.
- Scan history with verdict, score, and file metadata
- Per-engine breakdown for every result
- Filter by verdict, date range, or file type
- Credit usage analytics and monthly quota tracking (Standard and Pro)
- IP block list, automatic and manual (Standard and Pro)
Scan history, per-engine breakdown, analytics, and IP management
Security
Designed to handle malicious content safely
Files are loaded to memory, scanned, and discarded. Nothing is stored except metadata, hashes, and results. Updates to rules, models, and feeds are checked against their SHA-256 hash and delivered over TLS before applying.
Add a check to your agent loop in minutes.
Free tier includes 100 scans per month, up to 10 MB per file. No credit card required.
Tendrl