Start here

Protect your first agent in 5 minutes.

This page shows the smallest useful setup. Quasentra will register the agent, discover its tools, sync the permissions and check every protected tool call automatically.

What you will buildOne support agent that may read a customer, but may not delete one.

1. Install Quasentra

python -m pip install quasentra

If you use LangChain, LangGraph, CrewAI or OpenAI Agents, finish these shared steps first and then open the matching framework guide.

2. Add your API key

Generate a key from Dashboard → API Keys. Store it in an environment variable, not inside Python code.

# .env or your hosting platform's secret settings
QUASENTRA_API_KEY=ask_live_replace_me
Local testing: if Quasentra runs on your computer, also set QUASENTRA_URL=http://127.0.0.1:8080. On the hosted service, the SDK already defaults to https://quasentra.com.

3. Protect the agent

import os
from quasentra import Quasentra

security = Quasentra(
    api_key=os.environ["QUASENTRA_API_KEY"],
    base_url=os.getenv("QUASENTRA_URL", "https://quasentra.com"),
)

def customer_read(customer_id: str):
    """Read one customer record."""
    return company_database[customer_id]

def customer_delete(customer_id: str):
    """Delete one customer record."""
    del company_database[customer_id]

@security.protect(
    "support-agent",
    permissions={
        "customer.read": "ALLOW",
        "customer.delete": "DENY",
    },
)
def build_agent():
    return MyAgent(tools=[customer_read, customer_delete])

agent = build_agent()

What happens automatically?

01Agent registration

support-agent appears in the dashboard.

02Tool discovery

customer_read becomes action customer.read.

03Permission sync

Read is allowed; delete is blocked before its function runs.

04Audit evidence

Every allow or deny decision appears in Decisions.

Customize this for your agent

Change thisUse your own value
support-agentA stable ID such as sales-agent or invoice-reviewer. Do not change it on every run.
MyAgentYour existing agent class or factory. Quasentra does not replace your LLM.
tools=[...]The real callable tools your agent is allowed to request.
permissions={...}Choose ALLOW, DENY or REQUIRE_APPROVAL for each discovered action.
Using a framework?

Keep the same tools and permissions; only the final adapter call changes.

LangChain →LangGraph →CrewAI →OpenAI Agents →