Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

docs(pam): add AI Session Insights docs and Anthropic connection page

bernie-gc156ea338f72
diff --git a/docs/docs.json b/docs/docs.json
index a6c64ee838..5de4e374b9 100644
--- a/docs/docs.json
+++ b/docs/docs.json
@@ -106,6 +106,7 @@
"group": "Connections",
"pages": [
"integrations/app-connections/1password",
+ "integrations/app-connections/anthropic",
"integrations/app-connections/auth0",
"integrations/app-connections/aws",
"integrations/app-connections/azure-app-configuration",
@@ -895,6 +896,7 @@
"documentation/platform/pam/product-reference/access-policies",
"documentation/platform/pam/product-reference/auditing",
"documentation/platform/pam/product-reference/session-recording",
+ "documentation/platform/pam/product-reference/ai-session-insights",
"documentation/platform/pam/product-reference/credential-rotation",
{
"group": "Web Access",
diff --git a/docs/documentation/platform/pam/product-reference/ai-session-insights.mdx b/docs/documentation/platform/pam/product-reference/ai-session-insights.mdx
new file mode 100644
index 0000000000..8972294abc
--- /dev/null
+++ b/docs/documentation/platform/pam/product-reference/ai-session-insights.mdx
@@ -0,0 +1,93 @@
+---
+title: "AI Session Insights"
+sidebarTitle: "AI Session Insights"
+description: "Learn how Infisical uses AI to automatically summarize PAM session activity."
+---
+
+AI Session Insights automatically generates a summary of what happened during a PAM session once it ends. Instead of manually reviewing raw logs, administrators get a concise, human-readable overview of the user's activity along with any flagged actions that may warrant further review.
+
+<Warning>
+ AI Session Insights are generated by a large language model and may not be fully accurate. Summaries and warnings should be used as a starting point for investigation, not as a definitive record of session activity. Always refer to the raw session logs for authoritative information.
+</Warning>
+
+## How It Works
+
+When a session ends (whether the user disconnects, it times out, or an admin terminates it), Infisical asynchronously processes the session logs using the AI model configured for that resource. The model produces a structured output containing:
+
+- **Summary**: A 2–4 sentence overview of what the user was trying to accomplish during the session, grouping related actions together.
+- **Warnings**: Specific actions the model flagged as potentially destructive or suspicious (e.g., a `DROP TABLE` on a production database or a `rm -rf` on a server). Each warning includes a short description and, for database sessions, a reference to the specific log entry.
+
+The insights are encrypted at rest using the same KMS key as the rest of your project's data.
+
+## Supported Resources
+
+AI Session Insights are currently supported for the following resource types:
+
+- **PostgreSQL**: Summarizes SQL queries and flags destructive or suspicious operations such as dropping tables, bulk deletes, and privilege changes.
+- **SSH**: Summarizes terminal commands and flags dangerous operations such as file deletion, privilege escalation, or data exfiltration attempts.
+
+<Note>
+ Support for additional resource types is planned for future releases.
+</Note>
+
+## Prerequisites
+
+- An [Anthropic App Connection](/integrations/app-connections/anthropic) configured in your organization. This is the connection Infisical uses to call the Claude API on your behalf.
+
+## Configuration
+
+AI Session Insights are configured per resource. To enable them:
+
+<Steps>
+ <Step title="Open the resource">
+ Navigate to your PAM project and click on the resource you want to configure.
+ </Step>
+ <Step title="Edit Session Recording settings">
+ On the resource detail page, click the **Edit** button in the **Session Recording** section.
+
+ ![Session Recording Edit](/images/pam/product-reference/ai-session-insights/session-recording-edit.png)
+ </Step>
+ <Step title="Enable AI Insights">
+ Toggle **AI Insights** on. Two additional fields will appear:
+
+ - **App Connection**: Select the Anthropic connection to use for generating summaries.
+ - **Model**: Choose the Claude model to use. We recommend **Claude Sonnet 4.6** for a balance of quality and cost, or **Claude Opus 4.6** for the most detailed analysis.
+
+ ![AI Insights Configuration](/images/pam/product-reference/ai-session-insights/ai-insights-configuration.png)
+ </Step>
+ <Step title="Save">
+ Click **Update Details** to save the configuration. AI Insights will be generated for all new sessions on this resource going forward.
+ </Step>
+</Steps>
+
+## Viewing AI Insights
+
+After a session ends, Infisical processes the logs and generates insights in the background. To view them:
+
+1. Navigate to the **Sessions** page in your PAM project.
+2. Click on a completed session.
+3. The **AI Insights** card appears at the top of the session detail page, showing the summary and any warnings.
+
+![AI Insights Card](/images/pam/product-reference/ai-session-insights/ai-insights-card.png)
+
+For PostgreSQL sessions, each warning links directly to the relevant log entry so you can inspect the raw activity in context. SSH warnings do not include log entry references.
+
+## FAQ
+
+<AccordionGroup>
+ <Accordion title="Does Infisical share my session data with Anthropic?">
+ AI Insights uses the Anthropic connection you configure in your organization, meaning requests go through your own API key and are subject to your agreement with Anthropic. Only the logs from the specific session being summarized are included in the request. No secrets, credentials, or other project data are shared. Refer to [Anthropic's privacy policy](https://www.anthropic.com/legal/privacy) for details on how they handle API inputs.
+ </Accordion>
+ <Accordion title="Can I use AI Insights with any Claude model?">
+ AI Insights supports Claude Sonnet 4.6, Claude Opus 4.6, and Claude Haiku 4.5. Sonnet 4.6 is recommended for most use cases as a balance of quality and cost.
+ </Accordion>
+ <Accordion title="How long does it take for insights to appear after a session ends?">
+ Insights are generated asynchronously and typically appear within a few seconds to a minute after a session ends, depending on the length of the session logs and the model selected. For very long sessions, generation may take longer.
+ </Accordion>
+ <Accordion title="Can I configure different AI models for different resources?">
+ Yes. AI Insights are configured per resource, so each resource can use a different Anthropic connection or Claude model. This lets you apply a more powerful model to high-risk resources and a lighter model elsewhere.
+ </Accordion>
+ <Accordion title="What happens if the session log is very long?">
+ If the session logs exceed the size limit, Infisical will not generate an AI summary for that session. The raw logs are always available to review regardless of session length.
+ </Accordion>
+</AccordionGroup>
diff --git a/docs/documentation/platform/pam/product-reference/session-recording.mdx b/docs/documentation/platform/pam/product-reference/session-recording.mdx
index 85472ed47a..79270be678 100644
--- a/docs/documentation/platform/pam/product-reference/session-recording.mdx
+++ b/docs/documentation/platform/pam/product-reference/session-recording.mdx
@@ -48,6 +48,12 @@ You can use the search bar to quickly find relevant information:
**Individual session page:** Search within that specific session's logs to pinpoint activity.
![PAM Individual Session Search](/images/pam/product-reference/session-recording/individual-session-page-search.png)
+## AI Insights
+
+Infisical can automatically generate an AI-powered summary of each session's activity once it ends. The summary includes a plain-language overview of what the user did and highlights any actions that may warrant further review.
+
+See [AI Session Insights](/documentation/platform/pam/product-reference/ai-session-insights) to learn how to configure this feature.
+
## FAQ
<AccordionGroup>
diff --git a/docs/images/app-connections/anthropic/anthropic-app-connection-created.png b/docs/images/app-connections/anthropic/anthropic-app-connection-created.png
new file mode 100644
index 0000000000..b0e7d7c532
Binary files /dev/null and b/docs/images/app-connections/anthropic/anthropic-app-connection-created.png differ
diff --git a/docs/images/app-connections/anthropic/anthropic-app-connection-form.png b/docs/images/app-connections/anthropic/anthropic-app-connection-form.png
new file mode 100644
index 0000000000..9694b9c5c5
Binary files /dev/null and b/docs/images/app-connections/anthropic/anthropic-app-connection-form.png differ
diff --git a/docs/images/app-connections/anthropic/anthropic-app-connection-option.png b/docs/images/app-connections/anthropic/anthropic-app-connection-option.png
new file mode 100644
index 0000000000..ae990ef62e
Binary files /dev/null and b/docs/images/app-connections/anthropic/anthropic-app-connection-option.png differ
diff --git a/docs/images/app-connections/anthropic/step-1.png b/docs/images/app-connections/anthropic/step-1.png
new file mode 100644
index 0000000000..df8be39369
Binary files /dev/null and b/docs/images/app-connections/anthropic/step-1.png differ
diff --git a/docs/images/app-connections/anthropic/step-2.png b/docs/images/app-connections/anthropic/step-2.png
new file mode 100644
index 0000000000..6e093d9714
Binary files /dev/null and b/docs/images/app-connections/anthropic/step-2.png differ
diff --git a/docs/images/pam/product-reference/ai-session-insights/ai-insights-card.png b/docs/images/pam/product-reference/ai-session-insights/ai-insights-card.png
new file mode 100644
index 0000000000..af0ad80f3d
Binary files /dev/null and b/docs/images/pam/product-reference/ai-session-insights/ai-insights-card.png differ
diff --git a/docs/images/pam/product-reference/ai-session-insights/ai-insights-configuration.png b/docs/images/pam/product-reference/ai-session-insights/ai-insights-configuration.png
new file mode 100644
index 0000000000..cdd868be94
Binary files /dev/null and b/docs/images/pam/product-reference/ai-session-insights/ai-insights-configuration.png differ
diff --git a/docs/images/pam/product-reference/ai-session-insights/session-recording-edit.png b/docs/images/pam/product-reference/ai-session-insights/session-recording-edit.png
new file mode 100644
index 0000000000..c81cfcca0e
Binary files /dev/null and b/docs/images/pam/product-reference/ai-session-insights/session-recording-edit.png differ
diff --git a/docs/integrations/app-connections/anthropic.mdx b/docs/integrations/app-connections/anthropic.mdx
new file mode 100644
index 0000000000..9803540572
--- /dev/null
+++ b/docs/integrations/app-connections/anthropic.mdx
@@ -0,0 +1,100 @@
+---
+title: "Anthropic Connection"
+description: "Learn how to configure an Anthropic connection for Infisical."
+---
+
+Infisical supports connecting to Anthropic using an **API Key**. This connection is used to power [PAM AI Session Insights](/documentation/platform/pam/product-reference/ai-session-insights).
+
+## Prerequisites
+
+- An [Anthropic account](https://console.anthropic.com/) with access to the API
+- Sufficient API credits or an active billing plan on your Anthropic account
+
+## Create an Anthropic API Key
+
+<Steps>
+ <Step title="Navigate to API Keys">
+ In the [Anthropic Console](https://console.anthropic.com/settings/keys), go to **Settings** → **API Keys** and click **Create Key**.
+
+ ![Anthropic API Keys](/images/app-connections/anthropic/step-1.png)
+ </Step>
+ <Step title="Name and create the key">
+ Give the key a descriptive name (e.g. `infisical-pam`) and click **Create Key**. Copy the generated API key, as it will only be shown once.
+
+ ![Anthropic Create Key](/images/app-connections/anthropic/step-2.png)
+ </Step>
+</Steps>
+
+<Tip>
+ Create a dedicated API key for Infisical rather than reusing an existing one. This makes it easy to rotate or revoke access independently.
+</Tip>
+
+## Create Anthropic Connection in Infisical
+
+<Tabs>
+ <Tab title="Infisical UI">
+ <Steps>
+ <Step title="Navigate to App Connections">
+ In your Infisical dashboard, go to **Organization Settings** → **App Connections**.
+
+ ![App Connections Tab](/images/app-connections/general/add-connection.png)
+ </Step>
+ <Step title="Select Anthropic Connection">
+ Click **Add Connection** and choose **Anthropic** from the list of available connections.
+
+ ![Select Anthropic Connection](/images/app-connections/anthropic/anthropic-app-connection-option.png)
+ </Step>
+ <Step title="Fill out Connection Form">
+ Complete the form with:
+ - A **name** for the connection (e.g. `anthropic-prod`)
+ - An optional **description**
+ - Your **Anthropic API Key** (from the steps above)
+
+ ![Anthropic Connection Form](/images/app-connections/anthropic/anthropic-app-connection-form.png)
+ </Step>
+ <Step title="Connection Created">
+ After clicking **Create**, Infisical validates the key against the Anthropic API. Your **Anthropic Connection** is then ready to use for [PAM AI Session Insights](/documentation/platform/pam/product-reference/ai-session-insights).
+
+ ![Anthropic Connection Created](/images/app-connections/anthropic/anthropic-app-connection-created.png)
+ </Step>
+ </Steps>
+ </Tab>
+ <Tab title="API">
+ Create an Anthropic connection via the API.
+
+ ### Sample request
+
+ ```bash Request
+ curl --request POST \
+ --url https://app.infisical.com/api/v1/app-connections/anthropic \
+ --header 'Content-Type: application/json' \
+ --data '{
+ "name": "my-anthropic-connection",
+ "method": "api-key",
+ "credentials": {
+ "apiKey": "<YOUR-ANTHROPIC-API-KEY>"
+ }
+ }'
+ ```
+
+ ### Sample response
+
+ ```bash Response
+ {
+ "appConnection": {
+ "id": "e5d18aca-86f7-4026-a95e-efb8aeb0d8e6",
+ "name": "my-anthropic-connection",
+ "description": null,
+ "version": 1,
+ "orgId": "6f03caa1-a5de-43ce-b127-95a145d3464c",
+ "createdAt": "2025-04-23T19:46:34.831Z",
+ "updatedAt": "2025-04-23T19:46:34.831Z",
+ "isPlatformManagedCredentials": false,
+ "app": "anthropic",
+ "method": "api-key",
+ "credentials": {}
+ }
+ }
+ ```
+ </Tab>
+</Tabs>