AgentMark supports reusable components to help you maintain consistent prompting patterns across your applications. Components can be created and managed in two ways:
Create Components via AgentMark
Create and manage components directly in the AgentMark platform:
- Navigate to the prompt section of AgentMark
- Click on the 3-dots menu option next to the folder
- Create a new component, with a given name and publish it
Local Components
Create components locally in your agentmark/
directory:
agentmark/
├── components/
│ ├── math-instructions.mdx
│ └── language-instructions.md
└── prompts/
└── example.prompt.mdx
- Create a new component in the templates directory
- Commit and push your changes to the connected git branch
Using Components
Import and use components in your prompts:
import MathInstructions from '../components/math-instructions.mdx';
<System>
You are a math tutor.
<MathInstructions level={props.difficulty} />
</System>
Component example:
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>
Learn More
For detailed information about component features and syntax, see the AgentMark Components Documentation.
Key features include:
- Props support
- Conditional rendering
- Plain markdown imports
- Component composition
Have Questions?
We’re here to help! Choose the best way to reach us: