Skip to content

Create a Custom Agent

A custom agent is an agent you define for one workspace or folder. It is useful when your task has specific rules, tone, context, or repeated workflow.

Use a custom agent when you want instructions like:

  • “Always write in a concise product style.”
  • “Act as a research assistant for this topic.”
  • “Review plans and point out missing risks.”
  • “Help maintain this code project and explain changes clearly.”
  1. Open the target folder

    Choose the workspace folder where the agent should live.

  2. Choose Add Custom Agent

    Click the folder + menu or right-click the folder, then choose Add Custom Agent.

  3. Edit the agent file

    OpAgent creates an agent file and opens it in the editor. Update the name, description, and instructions.

  4. Save the file

    Save the file. The folder should show the custom agent after OpAgent refreshes the workspace.

  5. Try a small task

    Ask the agent to do one focused task. If the answer is not right, edit the instructions and try again.

You can keep the generated file and only edit the human-readable parts. A simple agent can look like this:

---
name: Product Writing Agent
description: Helps write clear product notes and release announcements.
tags: user
---
You are a product writing assistant for this workspace.
When helping:
- write in clear, direct language;
- prefer short paragraphs and concrete examples;
- ask one clarifying question if the goal is unclear;
- keep the final answer easy to paste into a Markdown document.

Good custom agent instructions are specific and short.

Include:

  • the role the agent should play;
  • the type of work it should help with;
  • the style or format you prefer;
  • what the agent should avoid.

Avoid:

  • long rules that conflict with each other;
  • secrets, tokens, or private credentials;
  • vague instructions like “be better” without examples.

Start with plain instructions first. After the agent works well, you can extend it with skills or tools if your workflow needs them.

Keep the agent simple until you know what repeated task it should own.