Add identity-based tool authorization to SuperAGI autonomous agents. Replace API keys with cryptographic identity, eliminate credential sprawl, enable fine-grained scope control for tools.
Add the SuperAGI xLink adapter to your project:
# npm npm install @private.me/superagi-xlink # pnpm pnpm add @private.me/superagi-xlink # yarn yarn add @private.me/superagi-xlink
Replace API key-based tool authentication with xLink identity in under 10 lines:
from superagi.tools.base_tool import BaseTool from private_me_superagi_xlink import with_xlink_auth # Wrap your tool class with xLink identity-based auth @with_xlink_auth(scopes=["payments:send", "payments:read"]) class PaymentTool(BaseTool): name = "PaymentTool" description = "Execute financial transactions" def _execute(self, amount: float, recipient: str): # Tool automatically validated against agent identity # No API keys, no credential injection return self.xlink.send({ "to": recipient, "amount": amount })
The @with_xlink_auth decorator:
Define fine-grained permissions for each tool. Agents can only invoke tools their identity authorizes:
from superagi.agent.super_agi import SuperAgi from private_me_superagi_xlink import XLinkIdentity # Create agent with identity-based tool access identity = XLinkIdentity.generate( agent_id="finance-agent-001", scopes=["payments:send", "analytics:read"] ) agent = SuperAgi( agent_id="finance-agent-001", tools=[PaymentTool, AnalyticsTool, ReportingTool], xlink_identity=identity ) # ✅ Agent can use PaymentTool (has "payments:send" scope) # ✅ Agent can use AnalyticsTool (has "analytics:read" scope) # ❌ Agent CANNOT use ReportingTool (missing "reports:write" scope)
Multiple agents with distinct identities can collaborate securely:
# Analytics agent (read-only access) analytics_identity = XLinkIdentity.generate( agent_id="analytics-001", scopes=["payments:read", "analytics:read"] ) # Payment agent (write access) payment_identity = XLinkIdentity.generate( agent_id="payment-executor-001", scopes=["payments:send", "payments:read"] ) # Approval agent (authorization scope) approval_identity = XLinkIdentity.generate( agent_id="approval-gate-001", scopes=["approvals:grant"] ) # Each agent has cryptographically distinct identity # No shared credentials, no lateral movement risk
No API keys in config files, environment variables, or agent memory. Identity is cryptographic, not textual.
Tools validate scopes before execution. Unauthorized invocations blocked at decorator level, not runtime.
Define permissions per tool, per agent. No "admin" keys with full system access.
Identity is permanent. No expiration, no refresh logic, no cascading failure from expired credentials.
Every tool invocation tied to agent identity. Perfect attribution for compliance and debugging.
Add decorator, define scopes, done. No infrastructure changes, no secret management platform.
For production deployments, integrate with xLink Trust Registry for centralized identity management:
from private_me_superagi_xlink import TrustRegistry # Initialize trust registry (file-based or Redis-backed) registry = TrustRegistry(storage="file://./trust-registry.json") # Register agent identities registry.register( agent_id="finance-agent-001", scopes=["payments:send", "analytics:read"], metadata={"team": "finance", "tier": "production"} ) # Validate at runtime if registry.has_scope("finance-agent-001", "payments:send"): # Execute privileged operation pass
Revoke or grant scopes without redeploying agents:
# Revoke scope immediately (all active agents reflect change) registry.revoke_scope("finance-agent-001", "payments:send") # Grant new scope registry.grant_scope("analytics-001", "reports:write") # Changes propagate in <100ms (in-memory + broadcast)
3-month free trial for all tiers. No credit card required.
Volume discounts available for 5+ ACIs. Subscribe now or contact sales.