Turn business capabilities into clear tools.
A tool is one action your agent may request—such as reading a customer, sending an email or creating a refund. Quasentra protects the tool call; your normal application code still validates and performs the business operation.
Start with a normal function
def customer_read(customer_id: str) -> dict:
"""Read one customer by its public ID."""
if customer_id not in company_database:
raise ValueError("Customer not found")
return company_database[customer_id]
Quasentra converts the Python name customer_read into the security action customer.read. That action is what you use in the permissions dictionary and see in the dashboard. Default deny means a new or unlisted action cannot run automatically.
Design tools that are easy to secure
- One purpose: prefer invoice_read and invoice_pay over a universal run_command.
- Stable name: renaming a tool creates a new action, which starts denied.
- Typed inputs: use named parameters such as customer ID and amount.
- Useful docstring: explain exactly what the tool does.
- Business validation: still check IDs, balances and ownership inside your application.
- No secrets: never return passwords, tokens or unrestricted database clients to the model.
Choose names for your business
| Python tool | Security action | Typical permission |
|---|---|---|
| customer_read | customer.read | ALLOW |
| email_send | email.send | REQUIRE_APPROVAL |
| customer_delete | customer.delete | DENY |
Framework decorators
Keep using your framework's normal tool decorator: LangChain/LangGraph @tool, CrewAI @tool("name"), or OpenAI Agents @function_tool. Quasentra reads the resulting tool object when you apply its framework adapter.
Important boundary
Only give the agent the secured tool list. If the same sensitive function is also available through an unwrapped tool, direct client or leaked credential, that second path is outside the local security wrapper.