Getting Started
Lets walk through building a simple hello world Margarita script. So you can start learning Margarita.
uv for a fast, isolated
install that won't touch your system Python.
uv tool install margarita
margarita --version
.mgx filehello.mgx. The << >> block
builds the prompt and @effect run sends it to the LLM.
<<
Write out a simple Greeting!
>>
@effect run
margarita run. Margarita executes the script top to bottom —
logging, setting state, rendering the prompt, and calling the LLM at
@effect run. The agent's response is printed to stdout.
margarita run hello.mgx
┳┳┓
┃┃┃┏┓┏┓┏┓┏┓┏┓┓╋┏┓
┛ ┗┗┻┛ ┗┫┗┻┛ ┗┗┗┻
┛