Getting Started
Learn how to create your first AI agent using AIML
Getting Started with AIML
This guide will help you create your first AI agent using the AIML language.
Basic Structure
At the end of the day, an AIML file is just a markdown (MDX to be precise) file with a more forgiving syntax parser and some intrinsic XML/JSX elements.
Here's a minimal example:
Here if the model doesn't start with "Agent:" we add it to the output using a script element.
AIML will handle conversion to/from streams making easy things easy and hard things possible!
Key Concepts
Frontmatter
The frontmatter section at the top of the file (between ---
markers) defines default settings:
System Prompt
The text immediately following the frontmatter serves as the system prompt for your agent:
Elements
Elements are XML/JSX-style tags that define your agent's behavior:
Comments
Use JSX-style comments to add notes that won't be sent to the LLM:
Creating Your First Agent
Let's create a simple agent that thinks about a response before answering:
Next Steps
- Learn more about Language Syntax
- Explore available Core Elements
- Check out more Examples
- Dive into Advanced Features