Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.agentmark.co/llms.txt

Use this file to discover all available pages before exploring further.

AgentMark supports reusable components to help you maintain consistent prompting patterns across your prompts. Create components in the Dashboard or locally as files — either way, 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
import MathInstructions from '../components/math-instructions.mdx';

<System>
  You are a math tutor.
  <MathInstructions level={props.difficulty} />
</System>
Component example:
math-instructions.mdx
You are a patient and knowledgeable math tutor. Follow these guidelines:

<If condition={props.level === "basic"}>
  - Explain concepts using simple, everyday examples
  - Break down problems into very small steps
  - Use visual representations when possible
  - Avoid complex mathematical notation
</If>

<If condition={props.level === "intermediate"}>
  - Provide detailed step-by-step solutions
  - Introduce formal mathematical notation gradually
  - Explain the reasoning behind each step
  - Include relevant formulas with explanations
</If>

<If condition={props.level === "advanced"}>
  - Use formal mathematical notation
  - Include theoretical foundations
  - Reference related concepts and theorems
  - Provide rigorous mathematical proofs
</If>
In the calling prompt, the parent passes level as a prop; the component reads it as props.level. Component props are scoped to the component — they don’t collide with the parent prompt’s props.

Learn more

For the full component feature reference — props, conditional rendering, plain markdown imports, and composition — see TemplateDX Components.

Have Questions?

We’re here to help! Choose the best way to reach us: