Skip to main content
AgentMark supports reusable components so you can keep prompting patterns consistent across your prompts. Create components in the Dashboard or locally as files. In both cases, a component is an .mdx/.md file you import into your prompts.

Create a component

Create component dialog in the DashboardThe Create Component dialog prompts for the component name and drops a new .mdx file into the selected folder. After you edit and publish it, it’s available for import in any prompt on this app.
  1. Open the Files tab for your app.
  2. Click the kebab menu (⋮) next to the folder where the component should live.
  3. Select Create Component, give it a name, and click Create.
  4. Edit the component in the visual editor, then click Publish.

Using components

Import and use components in your prompts:
example.prompt.mdx
Component example:
math-instructions.mdx
In the calling prompt, the parent passes level as a prop; the component reads it as props.level. AgentMark scopes component props to the component, so they don’t collide with the parent prompt’s props. See TemplateDX Components for the full reference (props, conditional rendering, plain-markdown imports, and composition).

Have questions?

Reach out any time: