Connect Homegrown AI Applications
Tenable One AI Exposure monitors custom-built homegrown AI applications (such as chatbots, copilots, and agents), whether they connect directly to a self-hosted model, a third-party LLM API, or a custom orchestration layer.
To integrate a homegrown application, you connect it to AI Exposure through an API and configure it to send prompts and responses to the platform as they occur.
AI Exposure structures these messages into conversations to provide context and visibility. The platform then analyzes these messages for risk and surfaces activity detections in your console, in the same way it monitors managed cloud AI services.
Prerequisites
Ensure that you have the following:
- A Tenable One Foundation or Advanced license for AI Exposure with an AI Governance add-on license.
- Required permissions:
- Permissions to manage integrations in AI Exposure.
- The AI Conversation permission, to view conversations in the console.
- The ability to modify the application code, so you can add minimal instrumentation where the application processes prompts and responses to send that activity to AI Exposure.
Step 1: Create an Integration for a Homegrown AI Application
You can use a single integration for one or more homegrown AI applications.
To create a homegrown AI application integration:
- In the AI Exposure console, go to Settings > Integrations > Add Integration.
- In the Integrations Library, select Homegrown AI Application.
The Create Homegrown AI Application wizard opens. -
Enter a Name for your integration.
The console displays this name.Note: The name need not be application-specific. You can use the same API authentication key for multiple homegrown applications. -
Click Finish.
AI Exposure creates the Homegrown AI Application integration and displays the following details:- Account ID — The integration ID, which the application includes in every request.
- API URL — The endpoint to which your application sends the data.
Secret — The API key required to authenticate the request.
Caution: Before you close the window, make sure that you copy the Secret and store it securely. You cannot view it again once the window is closed.
- Click Done.
Step 2: Authenticate API Requests
Store the Secret securely in your application. Include it as a bearer token in the Authorization header of every request (including mutations and queries) that you send to the API URL:
Authorization: Bearer <secret>
- secret — The secret API key generated when you created the integration.
Step 3: Send Conversation Data from Your AI Application
Your homegrown AI application sends three types of messages to the API: prompts (user input), responses (model output), and system prompts.
The application uses the InsertHomegrownAiApplicationMessages mutation to send prompts and responses to the AI Exposure platform, which reconstructs the individual messages into complete conversations for visibility and investigation, and also inspects them for risks.
Request Parameters
The mutation accepts the following request-level fields in input:
| Field | Required | Description |
|---|---|---|
| AccountId | Yes | The account (integration) to which the messages belong. |
| Messages | Yes | An array of message objects. The array must contain at least one message. Otherwise, the API returns the error Messages cannot be empty. See the message object fields below. |
Message Object Fields
Each object in Messages includes the following fields:
| Field | Required | Description |
|---|---|---|
| ApplicationName | Yes | Label that identifies which application sent this message. This is useful for correlating conversations with a specific application, especially when an integration contains multiple applications. |
| ConversationId | Yes | A stable identifier that groups messages belonging to the same conversation or session. |
| ConversationName | No | A human-readable name for the conversation that appears in the console. |
| Content | Yes | The text of the prompt, response, or system prompt. |
| Type | Yes | The message type: Prompt for user input, Response for model output, or SystemPrompt for the system-level instructions. |
| Time | Yes | The timestamp when the prompt or response occurred in your application. Format: ISO-8601, for example, 2026-09-28T14:03:00Z. |
| ModelName | No | The model that generated the response, for example, "gpt-4o". |
| Identity | No | The end user or service behind the message. An object with Name and Id fields. If you send Identity, Id is required. |
| ExternalId | No | Your identifier for the message. The API returns this identifier in the response so you can correlate it with your own records. |
Example Request (GraphQL)
MUTATION
InsertHomegrownAiApplicationMessages(
input: {
AccountId: "<accountId>"
Messages: [
{
ApplicationName: "Support Chatbot"
ConversationId: "conv-12345"
ConversationName: "Password reset help"
ExternalId: "msg-001"
Identity: { Id: "user-789", Name: "Jane Doe" }
ModelName: "gpt-4o"
Time: "2026-09-30T10:15:00Z"
Type: Prompt
Content: "How do I reset my password?"
}
{
ApplicationName: "Support Chatbot"
ConversationId: "conv-12345"
ExternalId: "msg-002"
ModelName: "gpt-4o"
Time: "2026-09-30T10:15:03Z"
Type: Response
Content: "Go to Settings > Security and click Reset Password."
}
]
}
) {
Messages {
ExternalId
Id
}
}
}
Step 4: Retrieve Analysis Results (Optional)
You can query analysis results via API or view them directly in the console. To query analysis results using the API, use the GetHomegrownAiApplicationMessageResult query.
Request Parameters
| Field | Required | Description |
|---|---|---|
| Id | Yes | The message ID received from the InsertHomegrownAiApplicationMessages mutation response. |
Response Fields
The API response returns:
- Id — The message ID from the original message.
- Status — The analysis status, which progresses from Pending to InProgress to Completed, or to Failed if the analysis does not complete successfully.
- Detections — When the Status changes to Completed, this field lists anything flagged for that message.
Each detection includes:- Id — The detection ID.
- ContentType — The type of content that triggered the detection.
- Rule — The name of the matched rule.
- RuleId — The ID of the matched rule.
- Severity — The severity level of the detection.
- Evidence — The content that supports the detection.
Example Request (GraphQL)
GraphQL
query {
GetHomegrownAiApplicationMessageResult(Id: "<message-id>") {
Id
Status
Detections {
Id
ContentType
Rule
RuleId
Severity
Evidence
}
}
}
Step 5: Verify the Integration
To confirm the integration is working correctly:
- Send a few test messages from your application.
-
Sign in to the AI Exposure console and go to the Conversations page. After a short processing delay, the test conversations appear in the console.
Note: You must have the AI Conversation permission to view the Conversations page. -
If data does not appear in the console, confirm the following items:
- The Authorization header is present and includes the correct secret.
- The AccountId matches your integration.
- Each message includes all required fields: ApplicationName, Content, ConversationId, Time, and Type.
View Analysis Results in the Console
After AI Exposure processes the messages, you can view the results from the analysis in the AI Exposure console on these pages:
- AI Activity Detections — Shows individual detections. Each detection shows the content type (for example, exposed credentials, PII, or jailbreak attempt), its severity, the identity that triggered it, and a link to the full conversation for context. For more information, see AI Activity Detections.
- AI Activity Issues — Shows related detections grouped together so recurring or related issues can be triaged as a single unit. For more information, see AI Activity Issues.
- Conversations — Shows the reconstructed prompt or response history behind any detection. To view conversations, you must have the AI Conversation permission. For more information, see AI Conversations.