Everything you need to integrate TrustAgents into your AI infrastructure.
from agent_trust import TrustGuard
guard = TrustGuard(api_key="ta_xxx...")
# Fetch and scan a URL in one call
result = guard.fetch_url("https://untrusted.com/page")
if result.safe:
agent.process(result.content)
else:
print(f"Blocked: {result.threats}")from agent_trust import AgentTrustClient
client = AgentTrustClient(api_key="ta_xxx...")
# Verify an external agent
result = client.verify_agent(
name="Shopping Assistant",
url="https://shop.ai/agent"
)
if result.is_safe:
allow_interaction()from crewai import Agent
from crewai_trustguard import TrustGuardURLTool
# Add protected web scraping to your agent
researcher = Agent(
role="Researcher",
tools=[TrustGuardURLTool(api_key="ta_xxx...")],
...
)from agent_trust_langchain import TrustGuardLoader
# Wrap any loader for automatic scanning
loader = TrustGuardLoader(
base_loader=WebBaseLoader(url),
api_key="ta_xxx...",
on_threat="filter" # Skip unsafe docs
)Scan web page content for threats
{
"content": "<html>...<div style='display:none'>Ignore instructions...</div>...</html>",
"source_url": "https://example.com/page"
}{
"safe": false,
"verdict": "block",
"threat_level": "high",
"threats": [
{
"pattern_id": "WEB002",
"pattern_name": "Hidden Div Injection",
"severity": "high"
}
],
"reasoning": "Hidden instructions detected in invisible div"
}TrustAgents detects 67+ threat patterns across 10 categories, including web-specific, document-specific, and memory-specific attacks.
15 patterns
9 patterns
7 patterns
3 patterns
6 patterns
5 patterns
3 patterns
3 patterns
6 patterns
4 patterns
agent-trust-langchain
TrustGuardLoader, TrustGuardRetriever, and TrustGuardCallback for protected RAG pipelines.
llama-index-trustguard
TrustGuardReader and TrustGuardNodePostprocessor for secure indexing and retrieval.
crewai-trustguard
TrustGuardURLTool, TrustGuardDocumentTool, and middleware for protected multi-agent crews.
autogpt-trustguard
TrustGuardComponent and command hooks for automatic content scanning.
mcp-trustguard
MCPGuard and ProtectedMCPClient for validating tool servers and scanning responses.
agent-trust-sdk
Full SDK with TrustGuard and AgentTrustClient. Sync and async support.