Create an agent

Create an agent with a model, the instructions it follows on every reply and the tools it can use.

Before you start

You need a project. See Create a project.

Create an agent

  1. Add the agent. Its system is the instructions it follows on every reply; leave out model to use the project's default:
    agents/support.ts
    import { agent } from "veryfront/agent"; export default agent({  id: "support",  name: "Support assistant",  system: "Answer customer questions about orders and refunds. Keep replies to two sentences.",});
  2. Start the project with npm run dev. It syncs the project to Veryfront.
  3. Open Chat in Studio.
  4. Pick Support assistant.
  5. Ask "Can I get a refund on an order I placed yesterday?". You should now see Support assistant answer in two sentences or fewer.

Try it in a sandbox

  1. Create a project

  2. Add the agent

  3. Start it

  4. Ask it

Try it out

Next steps