> ## Documentation Index
> Fetch the complete documentation index at: https://docs.oasm.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Chat Agent

> Query, analyze, and manage your attack surface with an AI-powered chat assistant in natural language

The Chat Agent is an AI-powered assistant built into the OASM console. It lets security teams interact with their attack surface data using natural language — asking questions about assets and vulnerabilities, or letting the assistant run multi-step analysis across your workspace.

You reach the chat interface from the console navigation: **Overview → New Chat** (console route /agents). From there you can start a conversation immediately, or connect your own AI provider first (see [Connect a provider](#connect-a-provider)).

<Info>
  Each workspace member connects their own provider and API key. Conversations are scoped to the member who created them and are not shared with other workspace members.
</Info>

## Key concepts

| Concept              | Description                                                                                                                                   |
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| **Mode**             | How the assistant behaves: Answer mode for quick questions, Agent mode for multi-step analysis                                                |
| **Provider**         | The AI service that powers your conversations. Supported providers: **OpenAI**, **Anthropic**, or **Custom** (any OpenAI-compatible endpoint) |
| **Model**            | The specific AI model used for a conversation, selected per conversation                                                                      |
| **Conversation**     | A saved chat session between you and the assistant, including all messages and results                                                        |
| **Workspace memory** | A long-term memory the assistant reads and writes across conversations, so context accumulates over time                                      |
| **MCP**              | A standard way to connect the assistant to additional tools and data sources                                                                  |

## Agent modes

The mode selector in the chat UI chooses how the assistant behaves. The assistant works in two ways: **Answer mode** (quick questions) and **Agent mode** (it runs multi-step analysis for you).

### Answer mode

**Answer mode** — conversational Q\&A over your workspace data. The assistant answers questions about your attack surface using the data already collected in your workspace, such as assets, vulnerabilities, targets, and scan results.

Use Answer mode when you need a quick answer:

* "How many assets are publicly exposed?"
* "Which vulnerabilities are open and what is their severity?"
* "What technologies run on our public-facing servers?"
* "Summarize the latest scan results for our main domain"

Answer mode is read-only: it queries workspace data and does not run extended multi-step workflows.

### Agent mode

**Agent mode** — autonomous multi-step analysis. The assistant plans and executes a sequence of analysis steps against your workspace, using tools and workspace memory to reach a conclusion.

Use Agent mode when a task spans multiple steps:

* Correlate findings across assets, vulnerabilities, and targets to identify exposure chains
* Drill into a suspected issue, gather supporting evidence, and summarize remediation guidance
* Produce an analysis report for a group of related findings

During execution, the assistant's tool calls and results are streamed into the conversation, so you keep full visibility into what it is doing.

### Choosing a mode

|              | Answer mode                   | Agent mode                             |
| ------------ | ----------------------------- | -------------------------------------- |
| **Purpose**  | Quick conversational Q\&A     | Autonomous multi-step analysis         |
| **Scope**    | Workspace data lookups        | Planned sequences of analysis steps    |
| **Best for** | "Which services are exposed?" | "Investigate this exposure end to end" |

## Connect a provider

Before the assistant can answer, connect an AI provider with your own API key.

<Steps>
  <Step title="Open the Connect Provider form">
    In the console, navigate to **Agents → Providers → Connect** (console route /agents/providers/connect).
  </Step>

  <Step title="Fill in the provider details">
    The **Connect Provider** form contains three required fields:

    * **Provider**\* — one of **OpenAI**, **Anthropic**, or **Custom**
    * **API Key**\* — your provider API key (the field placeholder shows the key format)
    * **Model**\* — the default model to use for your conversations

    For a **Custom** provider, also provide the OpenAI-compatible endpoint URL for your provider.
  </Step>

  <Step title="Save the configuration">
    Click **Save**. The provider is now available to your conversations.
  </Step>
</Steps>

<Info>
  Provider configuration is per member: each member connects their own provider and key, and conversations are scoped to the member who created them. Your provider credentials are never shared with other workspace members.
</Info>

### Supported providers

| Provider      | Notes                                            |
| ------------- | ------------------------------------------------ |
| **OpenAI**    | OpenAI models                                    |
| **Anthropic** | Anthropic models                                 |
| **Custom**    | Any OpenAI-compatible endpoint with a custom URL |

Existing assistant configurations can be edited later from the assistant edit page.

## Start a conversation

<Steps>
  <Step title="Create a new chat">
    From the console, go to **Overview → New Chat** (console route /agents). The chat UI opens with the prompt area "Need help with a security issue?".
  </Step>

  <Step title="Configure mode and model">
    Use the **mode selector** to choose Answer or Agent mode, and the **model selector** to pick the model for this conversation. The model selector shows the models available for your connected provider.
  </Step>

  <Step title="Attach context (optional)">
    The chat input includes a **file upload** control. You can attach a file to give the assistant additional context for the conversation.
  </Step>

  <Step title="Send your first message">
    Type a question or pick a suggested prompt. Suggested prompts include:

    * "Which network services are publicly accessible in my setup?"
    * "What entry points need security hardening in my workspace?"
    * "What endpoints lack proper rate limiting?"
  </Step>
</Steps>

## Ask questions or let the assistant analyze

Once a conversation is open, the assistant answers in whichever mode you selected:

* In **Answer** mode, ask a direct question about your workspace data and read the answer.
* In **Agent** mode, describe the analysis you want. The assistant plans the steps, executes them, and streams the results into the conversation.

The same AI analysis also powers the per-vulnerability **Analyze** action on the [Vulnerability](/vulnerability) page, so the assistant and the vulnerability analysis share the same provider configuration.

## Workspace memory

The assistant remembers context about your workspace across conversations. This workspace-scoped memory persists between sessions, so the assistant remembers prior findings, decisions, and analysis relevant to your workspace instead of starting from scratch each time.

* Memory is scoped to the **workspace**, not to an individual conversation.
* It accumulates context as you use the assistant, improving answers over time.

<Info>
  Because workspace memory accumulates context, keep it focused: avoid storing secrets or provider API keys in conversation content (see [Security](#security)).
</Info>

## Additional tools and data sources

The assistant can connect to additional tools and data sources, such as internal knowledge bases or external services. It uses MCP, a standard way for AI assistants to reach external tools and data.

For the full story, including how external AI clients connect to your workspace, see [MCP Server](/settings/mcp) and [Integrations](/integrations).

## Review conversation history

Every conversation is saved automatically.

* The chat UI shows your **Recent conversations**.
* Select **View all conversations →** (console route /agents/conversations) to open the full conversation list and reopen any past session.
* You can review the full message history, including tool executions and results, at any time.

## Security

<Danger>
  Never paste a provider API key into a chat message. Chat content — including workspace memory — is part of your workspace data and is not a secure channel for credentials.
</Danger>

* Provider API keys are **encrypted** and **masked** in storage. They are sent only to your chosen provider to fulfill model requests.
* Keep your provider key **private to your own member account**; each member connects their own key.
* If you suspect a key was exposed, rotate it at the provider and update your connection in **Agents → Providers**.
* Workspace API keys used by MCP and automation are separate from provider keys — see [API keys](/api-keys).

## Best practices

* Use **Answer** mode for quick, direct questions; use **Agent** mode for multi-step analysis that needs planning and tool use.
* Keep API keys per-member private — never share them in prompts or conversation content.
* Let workspace memory accumulate context; revisit past conversations instead of re-running the same analysis.
* Review conversation history regularly to keep a record of what the assistant found and what actions followed.
* Pair the chat assistant with the vulnerability **Analyze** action for a consistent view of your findings — see [Vulnerability](/vulnerability).

## Related resources

<Card icon="shield" title="Vulnerability" horizontal href="/vulnerability">
  Run the per-vulnerability Analyze action powered by the same AI configuration
</Card>

<Card icon="plug" title="MCP Server" horizontal href="/settings/mcp">
  Connect external AI assistants to your workspace data over the Model Context Protocol
</Card>

<Card icon="key" title="API keys" horizontal href="/api-keys">
  Manage workspace API keys used by workers, MCP, and automation
</Card>

<Card icon="blocks" title="Integrations" horizontal href="/integrations">
  See how the chat assistant and MCP fit into the wider OASM ecosystem
</Card>
