Skip to content
⌘K
InboxAsk a human

How to save money by optimizing your AI usage in Plain

Updated by Dustin

It's no secret that we're big believers in AI and the opportunities it unlocks, particularly around the customer experience. With that said, we often see a bit of a disconnect, given the velocity that companies are building and shipping product today, with the use of AI and what it actually costs to use it. Plain's AI products have incredible potential, but value is key — this guide is designed to help you maximize it.

Before you start

You'll need the following before you start:

  • Billing permissions: more specifically, edit access for the Credit usage page, and read access for the credits shown on workflow runs

  • Permission to edit workflows

What good looks like

Ideally, "good" means that you're only spending your AI credits where the output outweighs the cost — it means you're getting value out of your AI strategy.

What to consider

Consider using the 5 Whys method — it allows you to find the root cause of a problem by asking "why?" until you reach something you can fix. Ultimately, your goal is to locate and address root causes, not just symptoms, which can be a challenge when it comes to optimizing your AI usage.

How it works

  1. Write down the problem in one specific sentence.

  2. Ask why it happened, and write down the answer.

  3. Ask why that answer is true.

  4. Keep going until you reach a cause you can act on. That usually takes about five rounds, but stop when you get there.

  5. Fix the root cause, not just the symptom.

Example

  • Problem: Your AI usage bill doubled this month.

  • Why? The AI agent ran on far more threads than usual.

  • Why? It responded to automated emails, like delivery receipts and out-of-office replies, not just customer questions.

  • Why? A workflow sends every new thread to the AI agent.

  • Why? When the workflow was set up, nobody added a condition to skip automated or non-customer senders.

  • Root cause: The workflow has no filter for automated emails. Add a condition so the AI agent only runs on real customer threads.

How to implement

Use your credit usage dashboard to analyze your AI usage

We often see credit usage spikes come from workflows, not individual team members. To find the culprits, you’ll want to understand how to use your Credit usage dashboard effectively.

  1. Go to Settings → Credit usage and scroll to Credit spend.

  2. Look for rows where the Type column is "Sidekick Agent workflow action". These are Sidekick sessions that ran automatically (compared to "Sidekick Agent discussion", which are sessions triggered manually by a teammate).

  3. Under Spent by, note the workflows that keep appearing or are consuming the most Credits.

    Find the workflows that keep showing up in Credit spend
  4. Go to Workflows → Runs, click Filters, and choose that workflow to see all its runs side by side.

  5. Open a run to see which step used the credits.

    See which workflow step used the credits

Focus on Sidekick usage. Customer Agent and Connected Agent runs have fixed, predictable costs, but a Sidekick run can cost anywhere from 15 to more than 300 credits depending on the complexity of the task and the effort required to complete it.

Consider iterating on a workflow if it has a Sidekick step that runs on every thread, does fixed, deterministic work like copying data or setting labels, or costs very different amounts from one run to the next.

Replace Sidekick steps in workflows with cheaper alternatives

Workflows often have cheaper (sometimes better) ways to do the jobs Sidekick steps often get used for.

Label and priority-setting is typically one of the most common tasks we see Sidekick being used for. For some teams, especially those with complex, overlapping label taxonomies, this is the right move. However, consider that labels and priorities set by “AI selected” mode (this is a lightweight, non-configurable model built into Plain) only cost 1-2 credits per run. Compared to the 15-300+ credit range that a Sidekick session consumes, you’re saving at least 10x on credit usage at a minimum.

Let AI select labels for 1-2 credits a run

Plain comes standard with a number of native workflow actions — customers new to Plain will often use Sidekick as a way to write data to fields in Plain, or to external systems, but it’s worth checking out if your use case is covered by an existing native (read: free) action.

Turn routine Sidekick requests into customer cards

Many teams fall into the trap of using Sidekick for routine things; for example, checking a customer's plan type in your CRM, seeing if their last payment failed, or raising their seat limit in your backend. Users really start understanding how to use Sidekick efficiently once they recognize that it excels at doing the exact opposite: investigating, passing judgment on, and making recommendations for non-routine, non-deterministic tasks.

Consider implementing customer cards into your Plain workspace. Customer cards pull information from external systems (like your backend or Stripe, for example) into the thread sidebar any time a thread is opened, ensuring that the human working on it has the right context to investigate; the primary benefit with respect to this guide is that Sidekick no longer has to pull this information, which means you can repurpose the credits you would have spent on those tool calls.

Moreover, Sidekick can actually use the context within customer cards, improving its accuracy and efficiency overall provided you’re enriching the thread with the right context.

Add a customer card with your own data

Cards also support actions in the form of manual workflow buttons — when wired up correctly, you can allow your human agents to do some cool things like changing a plan type in your backend or processing a refund, right from the thread sidebar with a single button click.

Run a workflow from a customer card's button

Setting up cards does require a bit of technical know-how (i.e. understanding APIs, webhooks, general scripting), but you can honestly pass the bulk of the work to an LLM by giving it our docs and API schema and letting it go to work.

Have the Customer Agent collect context before handing off

One cool thing about the Customer Agent is that it can be configured with Custom instructions. Why is this relevant? Because it can be configured to collect additional context from customers before handing off to your team. The more context it collects, the less digging around your human users (and/or Sidekick agent) have to do. And it takes considerably less effort to diagnose an issue with that information in hand, which means you’re spending less on your Sidekick runs.

Here’s how you can get this set up:

  1. Go to Agents → Customer Agent → Preferences and find the Custom instructions box.

  2. Write one instruction for each kind of question, saying what the Customer Agent should ask the customer and when to hand the thread over to your team. For example, Before you hand off a billing question, ask for the invoice number and the billing email on the account, unless the customer already gave them. Hand off once they reply.

  3. Click Save. The Customer Agent starts following the instruction from the next customer message it handles.

    Ask for the details your team needs before handoff
  4. Try it out in the Playground tab by sending a sample question on that topic. The reply should ask for the details you listed.

    Check the Customer Agent asks for the details
  5. When the Customer Agent hands a thread off, it leaves your team an internal note saying why, what the customer needs, and what it already tried. If a workflow sends those threads to Sidekick, open it and add a line to its Sidekick step's Prompt telling Sidekick to read that note first. You'll recognize the workflow by the Customer Agent unassigned event on its trigger. For example, Read the Customer Agent's handoff note first, and don't repeat the searches it lists.

A few gotchas to consider:

  • Make sure to be specific with your custom instructions and when your agent should take a specific action — you want to clearly identify the conditions in which an instruction should be carried out.

Turn repeated requests into skills

Predictability is king when it comes to understanding + planning out your usage, but AI is anything but; there are often hundreds of ways to get to the right answer, which means usage for the same question/task can vary wildly if the prompt you’re feeding your agent is too broad. You can mitigate this effectively by setting up agent skills instead, which allow you to set up a structured set of instructions for your agent to follow. Think of them as guidelines/guardrails — a model will be that much more confident of its answer with the correct path laid out for it.

  1. Go to Agents → Sidekick Agent → Skills, click Create skill, and choose Build with Agent.

  2. Click Send, then answer Sidekick's questions about the skill you’re asking it to build: the steps to follow, the tools to use, and what the answer should look like.

    Build a skill with Sidekick
  3. Open the new skill under Your skills and read what Sidekick saved. When should the Sidekick Agent use this skill? tells Sidekick which requests it's for, and Instructions holds the steps. Edit either one, then click Save.

  4. Click Test skill to try it out. Sidekick opens with a message asking it to run the skill.

  5. Type / in the message box of a new Sidekick session and pick the skill to use it.

    Pick a skill with / in Sidekick

If you already have the steps written down, choose Create manually instead of Build with Agent and write the skill yourself. Skills work in workflows too: a Sidekick step can use any skill that's switched on in your workspace, whenever its task matches what the skill says it's for.

Gate workflow Sidekick steps with conditions

Use condition blocks in your workflows to control which threads Sidekick is triggered on. Teams often see the most value from Sidekick when they shift human time and effort away from long, complex investigations to it, but not every thread requires one.

Gate Sidekick behind an If/else block

Fit the prompt, tools and effort to the task

Three things determine how many credits a Sidekick run uses on a given task: the prompt you give it, the tools it's allowed to use, and the effort it spends on the task. Consider scoping down your Sidekick actions/discussions in your workflows; a broad task with lots of tools gives Sidekick more to figure out, therefore making it both more expensive and less efficient. And take the time to match the model’s effort level to the task at hand — it doesn’t make sense burning credits on a high-effort run if the task is to summarize the thread.

As a general rule of thumb:

  • Low effort: best for summaries, drafting responses, and managing comms across platforms

  • Medium effort: a good daily driver; can be used for the vast majority of tasks

  • High effort: best for deep investigations across tools + repos, and tasks involving extensive reasoning + judgment

You can see this in action by following these steps:

  1. Click Workflows in the menu on the left, then open the workflow you want Sidekick to work in, or click Add workflow and then Start from scratch to make a new one.

  2. Click the Trigger block on a new workflow, choose when it should run, then click Back.

  3. Click Sidekick Agent action in the Editor tab to add it to the canvas, then drag from the dot on the right edge of the block before it, such as Trigger, onto the new step to connect them.

  4. Write the Prompt so it names one task and what the answer should look like. For example, Summarize this thread in 3 bullets: the problem, what we did, and the outcome. Add it as a note to the thread.

  5. Click each service the task needs under Tools and switch on only the tools it uses.

    Give Sidekick one task and only the tools it needs
  6. Click the effort picker at the bottom right of the Prompt box, which reads Medium to start, and choose Low effort, Medium effort, or High effort to fit the task.

    Match Sidekick's effort to the task
  7. Click Save changes, or Publish workflow if the workflow is still a draft.

Connect your own agent

Plain also allows you to bring your own agents into your workspace, so if your team has already built an AI agent of its own, it can work on threads and in sessions just like the Customer Agent and Sidekick do. These are called Connected Agents and are much more cost-effective since the work happens outside of Plain — we only charge a flat 15-credit infrastructure maintenance fee for each thread assigned to your connected agent, or for each internal discussion started with it (compared with 100 credits for the Customer Agent, and the 15-300+ credit variable range for Sidekick).

It’s a great option for companies who have already invested in their own agents and/or want more control over their agent’s configurability. You can get started by following the steps below:

  1. Go to Agents, click Add agent under Connected agents, fill in Agent name, pick a Template, and click Create agent. Our Connected Agents developer docs cover the rest of the setup, including building the agent.

    Add your own agent to Plain
  2. Open a Start Agent discussion step in a workflow, click the picker at the bottom right of First message, and choose your agent instead of Sidekick Agent to hand it sessions.

  3. Add an Assign to step and pick your agent to have it work on threads.

Troubleshooting/FAQ

Why did Sidekick's results get worse after I lowered the effort?

On Low, Sidekick spends less effort on the task it’s been given — you’ll notice this more on tasks that require extensive investigation + reasoning.

Try this: set the step back to Medium effort, then narrow its prompt and tools instead.

Why does my gated workflow skip threads that need Sidekick?

An If/else block checks its branches from top to bottom and goes with the first one that matches, so a thread could have landed in an earlier branch, or could have potentially not matched a condition at all.

Try this: go to Workflows → Runs, click Filters, and choose Thread to find that thread's run. Open it to see which branch it took, then widen the condition.

See every workflow that ran on a thread
Why doesn't Sidekick use my skill?

Sidekick decides when to use a skill from its description, and a session only has the skills that were saved and switched on when it started.

Try this: check that the skill is switched on under Agents → Sidekick Agent → Skills. Then rewrite its description to say which requests it's for, and start a new session or pick the skill explicitly with /.

Why doesn't my card's button run the workflow?

There are two common causes.

The workflow can't be run by hand

  • A button can only run a published workflow with a Manual trigger.

  • Try this: open the workflow and check for the "Published" badge and for Manual under Trigger.

The card isn't on a thread

  • A button runs its workflow on a thread, so it doesn't work where the card shows outside one.

  • Try this: open one of the customer's threads and click the button there.

Why can't I see credits on workflow runs, or open the Credit usage page?

Both need billing permissions.

Try this: ask for billing permissions on your workspace.

Without billing permissions, Credit usage is blocked