# How we answer security questionnaires

An agent we run on Kortix — connected to the inbound questionnaire and our knowledge base of vetted answers and policies. It parses each question, drafts responses in the vendor's format, and flags anything it can't answer confidently.

Canonical page: https://openchatly.com/use-cases/security-questionnaire

Security questionnaires arrive in the middle of a sales cycle and hold the deal up
until they're answered. The questions are mostly ones we've answered before —
about our encryption, access controls, data handling, and policies — but they come
in different formats each time, a SIG one deal, a CAIQ the next, a custom
spreadsheet after that, and each has to be filled out in its own layout.

We run an agent on Kortix that drafts the answers from our vetted knowledge base.
This is how we answer our own security questionnaires, including the connections
and guardrails involved.

- **Team:** Kortix
- **Runs on:** Each inbound questionnaire
- **Connected systems:** Inbound questionnaire · Knowledge base
- **Mode:** Drafts only · security reviews before it's sent

## The problem

Most of a questionnaire is answers we already have. The same questions about
encryption at rest, SSO, incident response, and data retention come up on nearly
every one, and we've written vetted answers for them. But each questionnaire uses
a different format, so someone has to read every question, find the matching
approved answer, and paste it into the vendor's own layout — a SIG workbook, a
CAIQ, or a custom spreadsheet.

The common fixes are incomplete. A shared answer library still needs a person to
match each question to it by hand. Copying last deal's responses risks pulling an
answer that no longer fits. A generic AI drafter with no grounding will write
confident answers that aren't the vetted ones, which is exactly what can't happen
on a security document.

## What we built

On Kortix, each inbound questionnaire triggers an agent. It spawns an isolated
session (a cloud sandbox) with access to our knowledge base of vetted answers and
policy docs. It parses each question, matches it to our approved answers and
policies, drafts responses in the vendor's own format — SIG, CAIQ, or a custom
spreadsheet — and flags anything it can't answer confidently for a human. It
returns a filled draft for security to review before it goes back.

## How it works

### Copy the setup prompt into a new session

Open your Kortix workspace, start a new session, paste this prompt and send it.
The agent writes the agent file, the questionnaire skill and the 15-minute trigger, and opens a change request for you to review. Prefer
clicks? Choose **Use this template** instead.

**Setup prompt**

```
Set up a security questionnaire agent in this workspace.

1. Create the agent agents/security-questionnaire.md. Its job is to draft responses to inbound security questionnaires from our vetted answers. It may use the Gmail, Google Drive and Google Sheets connectors.

2. Create the skill skills/questionnaire-response/SKILL.md with these rules:
   - Check the Security Questionnaires label in Gmail. A thread that already has a draft reply has been worked. Skip it.
   - Parse every tab of the attachment into single questions, and keep each question's section, row and exact wording.
   - Answer only from the vetted answers in memory/security-answers.md. Flag a question with no confident match for a person. Never invent an answer.
   - Fill a copy of the vendor's own file (SIG, CAIQ or a custom spreadsheet) in the same layout. Never change the original.
   - Save the filled file as a Gmail draft reply on the original thread. Never send it.
   - Post the draft link and the flagged questions to #security.

3. Add a cron trigger questionnaire-check to kortix.yaml. It runs the security-questionnaire agent every 15 minutes with the prompt "Load the questionnaire-response skill and draft a response for every new questionnaire in the Security Questionnaires label."

4. Tell me which of these connectors are not connected yet.

5. Open a change request with all of it. Do not merge it.
```

### Connect your tools

Open **Connectors** in your workspace and connect the inbox where questionnaires
arrive and the files they come in. Credentials are brokered server-side and
never enter the agent's machine.

- **Gmail** (Required):
Reads each new questionnaire and its attached files.
- **Notion** (Optional):
Supplies approved answers when the library lives there.
- **Slack** (Required):
Posts the completed draft and its flags for security review.

### Run it once with this prompt

Merge the change request, then start a session with the
**security-questionnaire** agent and send this prompt. Check the drafted answers
and the flagged rows before you let the schedule take over.

**Prompt**

```
Draft a response to the oldest questionnaire in the Security Questionnaires label in Gmail that has no draft reply yet.

1. Read every tab of the attached file and list each question with its section and row.
2. Answer each question only from memory/security-answers.md. Flag any question without a confident match.
3. Fill a copy of the file in the vendor's own format. Do not change the original.
4. Save it as a Gmail draft reply on the same thread. Do not send it.
5. Post the draft link and the flagged questions to #security.
```

### Let the 15-minute schedule take over

The change request added this trigger to `kortix.yaml`. From now on the agent
checks the label every 15 minutes, and each questionnaire runs in a new session
on its own cloud computer. To change the interval, edit the cron line, or open
**Triggers** in the workspace.

**kortix.yaml**

```yaml
triggers:
  - slug: questionnaire-check
    name: Security questionnaire check
    on:
      cron: "0 */15 * * * *"
    run:
      agent: security-questionnaire
      prompt: Load the questionnaire-response skill and draft a response for every new questionnaire in the Security Questionnaires label.
```

### Hold every draft for security

The agent drafts and flags. It never sends. The filled file waits as a Gmail
draft on the original thread, and a person from security answers the flagged
questions and sends it. A question with no vetted answer is left for a person,
never answered from scratch.

### Read the draft summary

Each run ends with one message in #security. This is what a run looks like
in the session:

> **Security questionnaire check · 10:45**
>
> Prompt: Load the questionnaire-response skill and draft a response for every new questionnaire in the Security Questionnaires label.
>
> Drafted **1** new CAIQ questionnaire: **187** of **196** questions answered
> from the vetted set. **9** questions are flagged for security, mostly on
> subprocessors. The draft is saved on the original thread and not sent.

> **The pattern**
> An inbound questionnaire is the **trigger** that spawns a session with scoped
> **connectors** into the document and our knowledge base. The vetted answers and
> policies are encoded as **skills** and **memory**. The agent drafts and flags;
> security approves before anything is sent.

## Make it do more

Once it works, paste any of these into the same session.

**Grow the answer library**

```
When security answers a flagged question, add the approved answer to memory/security-answers.md in a change request.
```

**Flag unused answers**

```
On the first Monday of each month, list the answers in memory/security-answers.md that no questionnaire used in the last 90 days.
```

**Track due dates**

```
If a questionnaire email names a due date, put it at the top of the #security post and remind #security two days before it.
```

## Guardrails

The agent drafts a security document from our own vetted answers, so the access is
scoped and contained:

- **Isolation.** Every questionnaire runs in its own per-task isolated sandbox. The
  session reads the inbound document and the knowledge base it's scoped to, and
  only the filled draft is written back out.
- **Scoped secrets.** The credentials for the questionnaire source and the
  knowledge base are encrypted in the Secrets Manager and injected into the sandbox
  at runtime, scoped to the agents you grant them to.
- **Human approval gate.** The completed draft is reviewed by security before it
  goes back to the prospect, and any low-confidence question is left for a person
  rather than guessed.
- **Everything is code.** The agent's configuration, skills, and permissions are
  files in the repo, versioned and changed through a reviewed **change request**
  rather than a dashboard setting.

## The outcome

- **Every questionnaire:** Parsed, matched, and drafted in the vendor's format
- **Grounded:** Answers drawn only from our vetted set
- **Drafts only:** Security reviews before anything is sent

Inbound questionnaires now come back as filled drafts in whatever format they
arrived, with each answer drawn from our vetted knowledge base and the uncertain
ones flagged. Security spends its time reviewing and answering the hard questions
rather than matching and pasting, and nothing goes back to a prospect without a
person's sign-off.
