📚 API ReferenceComponents
<Prompt>
Learn how to use the Prompt Component to have your Agent think.
When it's time for your agent to .think()
, it will concatenate all of its prompts, in the order they are rendered in React, and use that prompt for inference to generate the next action. Therefore the prompts you use form the bread and butter of your agent's thought process and have a large impact on its behavior.
Import
Usage
Prompts can be either static (strings) or dynamic (depending on external data or memory). You can render anything you like inside of a prompt tag, and your agent will consider it when thinking!
You can have a complete, working Agent with an agent.tsx
file using just the Agent
tag and the Prompt
tag.