Safety Model
Ageniti is built around explicit exposure. Your app chooses which capabilities become actions and which surfaces are allowed to call them.
Visibility
Use visibility to describe who should be able to discover or use an action.
defineAction({
name: "create_task",
visibility: "public",
// ...
});Common meanings:
private: internal onlylocal: local development or operator usageagent: suitable for agent/tool usagepublic: safe for public manifests and docs
Private actions are hidden from public tool surfaces by default.
Supported Surfaces
Use supportedSurfaces to explicitly limit where an action can run.
defineAction({
name: "export_report",
supportedSurfaces: ["cli", "json", "dev"],
// ...
});If a runtime invocation arrives from an unsupported surface, it returns UNSUPPORTED_SURFACE.
Side Effects
Use sideEffects to communicate operational risk.
read: no external mutationwrite: changes external statedestructive: deletes, overwrites, cancels, closes, or performs irreversible work
Destructive actions require confirmation by default and are filtered from MCP and LLM adapters unless explicitly included.
Permissions
Permissions are declared on the action and enforced through the app-level permissionChecker.
createAgenitiApp({
actions,
permissionChecker({ action, context }) {
return action.permissions.every((permission) =>
context.auth?.permissions?.includes(permission)
) || "Missing required permission.";
},
});Ageniti does not replace your auth system. It gives your app a consistent hook for applying it across surfaces.
Public Metadata
Use publicMetadata for data that can safely appear in manifests, MCP tools, and LLM tool schemas.
Use metadata for internal app-only fields.
Confirmation
Set requiresConfirmation: true when an action should not run without an explicit confirmation flag.
Destructive actions inherit this behavior by default.
Practical Checklist
- Keep actions narrow and named clearly.
- Prefer structured output over prose-only strings.
- Mark write and destructive operations honestly.
- Limit high-risk actions with
supportedSurfaces. - Use
permissionspluspermissionCheckerfor real authorization. - Put safe usage guidance in
descriptionanddocs. - Review generated manifests before publishing.