Data Access Exit Point

Data Access Exit Point

Description

The Data Access Exit Point serves as a customizable gatekeeper between your Profound AI agent and your connected data sources. By using a custom Node.js exit program, you can inspect and validate every SQL query the agent attempts to execute, giving you complete oversight of what data, that you’ve allowed in the Data Access tab, it can access and how. When the agent attempts to run a query, Profound AI calls your Node.js exit script and passes an object containing details about the request. You can analyze this information, apply custom logic, and determine whether to allow or deny access.

This feature adds an important security and governance layer — ensuring that sensitive information remains protected while still allowing agents to perform powerful data operations. It’s especially useful in environments where compliance, data privacy, or role-based access rules must be enforced dynamically.

Use Cases

  • Preventing non-admin users from querying sensitive tables or fields.

  • Restricting access based on department, role, or session context.

  • Enforcing compliance policies or internal audit requirements.

  • Logging or monitoring query attempts for security tracking.

Properties Provided to Exit Point

The script will receive an object with various properties, such as:

  • sqlStatement – The SQL statement the agent intends to execute.

  • sqlComponents – Parsed elements of the SQL query, available if parsing succeeds.

  • identity – User authentication details, allowing validation based on the user’s Authentication.

  • sessionData – Additional session context provided via the Session Data Exit Point.

Restricting Data Access

If your logic determines that the agent shouldn’t access certain data, you can throw an error from the exit program. This signals to the agent that the request is not authorized and prevents the query from running.