Get started

How we run customer support with an AI agent

The support agent we run on Kortix — connected to Plain, our codebase, and Stripe. It triages and resolves inbound threads, and stops for human approval on anything sensitive.

support-agent asks to run a toolExpires in 58m
Refund $640 to order #4821?
Toolstripe.refunds.create
Amount640.00 USD
ReasonItem arrived damaged
CustomerMaya Lindqvist
Policy: refunds over $500 need a personDenyApprove
Written by
The OpenChatly Team
Published
July 3, 2026
Reading time
6 min read
Topics
Customer Support, Case Study, Enterprise

We run our own customer support on Kortix with an AI agent connected to Plain (our support tool), our codebase, and Stripe. Most support questions need product knowledge, engineering context, and billing data at the same time: a help-center chatbot can quote documentation but can't read the code behind a bug, confirm whether a subscription renewed, or take a scoped action on an account.

This write-up covers how the setup works: the connections, the session model, and the guardrails.

Team
Kortix — the company behind this platform
Support stack
Plain.com
Connected systems
Codebase · Stripe · Plain
Mode
Trigger-driven · human-gated

The problem

Support volume grows faster than the team. The questions that matter most are the ones a canned macro can't answer: "why was I charged twice?", "this button does nothing", "does your API support X?" Each one needs someone who understands the product, can read the code, and can check the customer's account — usually a senior engineer.

A help-desk bot handles the easy questions but not these. Hiring scales linearly with tickets. And giving a generic AI assistant real access to production systems is hard to justify in a security review.

What we built

Our support inbox in Plain is connected to an agent running on Kortix. Every inbound thread spawns its own isolated session with scoped access to the systems a support issue can touch: the product's knowledge, the codebase, and Stripe. It investigates, resolves what it can, and stops at a human for sensitive actions.

How it works

1

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 support skill and the trigger, and opens a change request for you to review. Prefer clicks? Choose Use this template instead.

Setup prompt

Set up a support queue agent in this workspace.

  1. Create the agent agents/support-agent.md. Its job is to work the Plain support queue. It may read the codebase and use the PLAIN_API_KEY and STRIPE_SECRET_KEY secrets.

  2. Create the skill skills/support-playbook/SKILL.md with these rules:

    • Work every new thread and every customer reply that has no answer yet.
    • For a bug report, search the codebase and recent changes for the code path before you reply.
    • For a billing question, look up the customer's plan, invoices and subscription in Stripe.
    • Resolve the thread when you can answer it fully. Otherwise draft a reply with the diagnosis attached and hand it to a person.
    • Refunds, plan changes and anything that touches a customer's money or account state need my approval. Never do them yourself.
    • Note each resolution that worked, so the next run is faster.
  3. Add a cron trigger support-triage to kortix.yaml. It runs the support-agent agent every 15 minutes with the prompt "Load the support-playbook skill and work every new or unanswered thread in Plain."

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

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

2

Connect your tools

Open Connectors in your workspace and connect your code host. Add your Plain and Stripe API keys as the PLAIN_API_KEY and STRIPE_SECRET_KEY secrets. Secrets are encrypted and injected at runtime, scoped to the agents you grant them to.

Plain

Reads new support threads and resolves or drafts replies.

Or useZendeskIntercom
Required
Stripe

Reads the customer's billing state for each thread.

Required
GitHub

Searches the code and recent changes behind a bug report.

Or useGitLab
Optional
3

Run it once with this prompt

Merge the change request, then start a session with the support-agent agent and send this prompt. Read its replies and drafts before you let the schedule take over.

Prompt

Work the Plain support queue once.

  1. Pull every new thread and every customer reply without an answer.
  2. For a bug report, search the codebase and recent changes for the cause.
  3. For a billing question, look up the customer's plan, invoices and subscription in Stripe.
  4. Reply directly when you can resolve the thread. Otherwise draft a reply with your diagnosis and leave it for me.
  5. If a thread needs a refund or a plan change, stop and ask me before you do anything.
4

Let the 15-minute schedule take over

The change request added this trigger to kortix.yaml. From now on the agent checks the queue every 15 minutes, each run in a new session on its own cloud computer. To change the time, edit the cron line, or open Triggers in the workspace.

kortix.yaml
triggers:- slug: support-triage  name: Support queue triage  on:    cron: "0 */15 * * * *"  run:    agent: support-agent    prompt: Load the support-playbook skill and work every new or unanswered thread in Plain.
5

Hold refunds and plan changes for approval

The agent reads the codebase and Stripe freely and replies in Plain. A refund, a plan change or any other change to a customer's money or account state stops for a person. An automated session waits at most 30 minutes for a person, then stops without changing anything, and the next run asks again.

6

Read the triage summary

Each run ends with a short summary of the threads it worked. This is what a run looks like in the session:

Support queue triage · 10:15
Load the support-playbook skill and work every new or unanswered thread in Plain.
Worked for 3m 37s
plain · list threadscodebase · searchstripe · retrieve subscriptionstripe · list invoicesplain · reply to thread × 3plain · add note

Worked 5 threads. Resolved 3 directly, including a double charge that was one paid invoice and one pending authorization. Drafted 1 bug diagnosis for engineering, and 1 refund request is waiting for approval.

Illustrative example. Your queue and resolutions differ.

Summary

Connect the support platform via a trigger, give the agent scoped connectors into the systems an issue can touch, encode product knowledge as skills and memory, and gate sensitive actions behind a human. Each inbound thread then runs in its own session.

Make it do more

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

Spot repeat issues

When three or more threads in one day report the same problem, post one summary to #support with the threads and the likely cause.

Turn answers into help articles

After you resolve a thread that the help docs do not cover, draft a help article from your answer and leave it for review.

Weekly support digest

Every Friday, post to #support the top 5 topics of the week, how many threads you resolved and how many you handed off.

Guardrails

Giving an agent access to the codebase, Stripe, and the support inbox is a security question as much as a product one. The controls on Kortix:

  • Isolation. Each thread runs in its own isolated sandbox on its own branch. A session can install, run, and experiment to reproduce a bug, and only what it's explicitly allowed to send is written back out.
  • Scoped secrets. The Plain, Stripe, and GitHub credentials are encrypted in the secrets manager and injected into the sandbox at runtime, scoped to the agents you grant them to.
  • Human approval gates. Irreversible actions (money, account state) require a person to approve.
  • Everything is code. The agent's persona, skills, and permissions are files in the repo — versioned and changed through a reviewed change request rather than a dashboard setting.

The outcome

Coverage without a night shift
24/7
Many inbound threads resolved before a human opens them
First-touch
Product knowledge, Stripe, and the codebase in one agent
3 systems

The agent handles the investigation-heavy tickets that used to pull a senior engineer off their work, and when it escalates, it escalates with the diagnosis attached. Customers get an answer to the question at any hour.

The setup relies on four pieces: sandbox isolation to contain each session, a secrets manager to broker tokens, human approval gates for irreversible actions, and memory that improves as threads are resolved.

On this page

  • The problem
  • What we built
  • How it works
  • Make it do more
  • Guardrails
  • The outcome

Run this yourself

Install this exact setup — agent, connectors, schedule, and guardrails — in a guided flow.

More use cases.

  • How we handle GDPR data-subject requests on a deadline

    Legal·July 11, 2026

  • OpenChatly

    How we keep our docs in sync with the code

    Documentation·July 5, 2026

  • OpenChatly

    How we QA every pull request automatically

    QA·July 5, 2026

Own your AI.Start today, in our cloud.

Start for free

OpenChatly is the AI workspace for everything. One person directing, agents executing, from goal to finished work.

©2026 OpenChatly AI.沪ICP备2025124785号-5

Resource guide

  • Product overview
  • Skills marketplace

Terms of service

  • User agreement
  • Privacy policy

Contact us