🚀 layer.AI is currently in Early Access / Pilot Program. API and features are subject to change.

Protect your AI Agents before they execute actions.

The Managed Policy Engine for AI Agents.
Centralized permission control via SDK for agents interacting with tools, APIs, and databases.

Decision, Not Execution

layer.AI acts as a decision layer. We do not execute any actions; we simply respond with Allow or Deny.

Zero Maintenance

Managed Service: Clients don't need to write policy files or manually configure rules. We handle everything.

Safe by Design

We do not store business logic or full tool call payloads. Decisions are primarily based on action and resource identifiers.

Why layer.AI?

Ensuring safety in the autonomous era.

The Autonomous Risk

AI Agents may perform unintended actions, such as deleting data or accessing confidential information without supervision.

Missing Guardrails

Standard tool-calling mechanisms lack a built-in security layer between the agent and your critical resources.

Complex Logic

Building custom permission logic is complex, time-consuming, and highly prone to security errors.

layer.AI acts as a security interceptor layer that validates every action before it happens.

System Architecture Overview

AI Agent (Tool Call)
→
layer.AI SDK (.check)
→
Policy Engine (Cloud)
→
Allow / Deny
→
Agent Executes or Halts

Note: layer.AI does not execute actions. It provides decisions only.


Overview

layer.AI is the centralized decision layer for AI security. By integrating our SDK, your agents are protected by a managed policy engine that evaluates tool calls against centrally managed safety rules

Getting Started (Before Coding)

Our onboarding process is designed to be seamless.

1
Contact Us: Contact the layer.AI team to start your Pilot or Early Access program.
2
Submit Information:
  • Email and Owner details
  • Agent Name
  • A list of Actions and Resources the agent will use.
3
Receive Credentials: We provide your API Key and Agent ID.

Managed Service

Clients do NOT need to use Swagger UI, create their own policies, or configure rules. The layer.AI team configures all policies for you based on our agreement.

Quick Start (SDK Usage)

You must call .check() before executing any real action within your agent's tool-calling logic:

python
import requests

API_BASE_URL = "https://layer-ai-api-production.up.railway.app"
API_KEY = "API_KEY_HERE"

def layerai_request(agent_id: str, action: str, resource: str, content: str):
    payload = {
        "agent_id": agent_id,
        "action": action,
        "resource": resource,
        "content": content
    }

    headers = {
        "Authorization": f"Bearer {API_KEY}",
        "Content-Type": "application/json"
    }

    res = requests.post(
        f"{API_BASE_URL}/api/agent/request",
        json=payload,
        headers=headers,
        timeout=10
    )

    res.raise_for_status()
    return res.json()


# ===== TEST =====
if __name__ == "__main__":
    result = layerai_request(
        agent_id="agent_id_here",
        action="action_test",
        resource="resource_test",
        content="test content"
    )

    print(result)

How Permissions Work

  • Action: What the agent intends to do (e.g., send_email).
  • Resource: The target being acted upon (e.g., internal_mailing_list).
  • Policies are evaluated in real-time on the cloud.
  • Policies are managed centrally by layer.AI as a managed service.

Error Handling

layer.AI provides the decision, but the flow control remains in your hands:

try:
    layerai_request(agent_id="agent_id_here", action="api_call", resource="external_service")
except PermissionError:
    # Explicitly blocked by Policy
    handle_blocked_flow()
except ConnectionError:
    # Network issue: Decide whether to retry or fail-safe
    retry_check()
except ValueError:
    # Invalid configuration (Check API Key or Agent ID)
    alert_admin("Invalid configuration")

Reliability & Safety Note

layer.AI is strictly a Decision Layer:

  • No Tool Execution: We do not execute actions on your behalf.
  • Privacy: We do not persist business payloads or sensitive content from your tool calls.
  • Ideal For: MVPs, internal tools, and pilot programs during the Early Access phase.