Chat Agents
Note
Chat agents were previously called chat modes.
Chat agents tailor Assistant’s behavior for specific tasks by providing unique instructions and tools. Click the agent selector dropdown at the bottom of the chat pane to switch between agents.
It’s also possible to create custom chat agents to suit your specific workflows and requirements.
Default chat agents
- Ask: Provides answers and code suggestions without automatic execution
- Edit: Suggests code changes for you to apply to files
- Agent: Autonomously executes work including running code and modifying files
- Plan: Creates detailed step-by-step plans before execution
View detailed descriptions and example prompts
| Agent | Description | Example Prompts |
|---|---|---|
| Ask | Provides answers to questions, helps with debugging, and generates code suggestions. The Ask agent offers code you can apply in your Editor or run in the Console, but it will not edit or run code automatically. |
“How do I plot a histogram in Python?” “Why am I getting a syntax error in my R script?” “Can you explain what this function does?” |
| Edit | Suggests code changes based on your prompts that you can apply to your files. The Edit agent helps you modify existing code but requires your approval for each change. |
“Refactor this function to improve readability.” “Convert this R code to Python.” “Add error handling to this script.” |
| Agent | Determines the steps needed for your request and autonomously carries out the work. The Agent can execute code in the Console, create and modify files, and identify next steps based on previous results. |
“Create a new Python file and set up a basic data analysis workflow.” “Install the required packages and run the code in the Console.” “Generate a summary report from my current dataset.” |
| Plan | Creates a step-by-step plan to accomplish your request. The Plan agent retrieves relevant context and develops a detailed plan, which it presents for your review before proceeding with execution. |
“Outline the steps needed to analyze a dataset and generate visualizations.” “Plan how to test and debug this R script.” “Create a plan to display my data in an interactive Shiny app.” |
Custom chat agents
Adding custom chat agents allows you to:
- Create specialized agents for specific tasks or workflows
- Tailor the Positron Assistant’s behavior and available tools for different use cases
Create a custom chat agent
- Run the command Chat: New Custom Agent… and follow the prompts to create a new chat agent file.
- Edit the newly created
.agent.mdfile to specify the chat agentdescription, thetoolsthe chat agent can use, as well as the chat agent prompt content. - Once you have created a custom chat agent, it will be available in the agent selector dropdown in the chat pane.
Tip
To learn more about the format of custom agents, see the following VS Code documentation:
- Custom agent file structure
- Note: Positron Assistant does not support the
modelfield at this time.
- Note: Positron Assistant does not support the
- Custom agents in VS Code