Hyperlambda Generator
Magic contains its own Hyperlambda Generator. This isn’t a single component, but goes through most parts of the platform that somehow allow you to create Hyperlambda code. It’s built as our own proprietary SLM (Small Language Model), fine-tuned with more than 600,000 training snippets, so it’s actually very strong on creating backend code, even though it’s using a “small base model”.

What makes it different
- It’s fast - Since it’s a small model, it typically generates your code in 1.5 to 5 seconds, allowing you to iterate rapidly, and allowing AI agents to create tools without noticeable delay.
- It cannot hallucinate function invocations - Every slot the generated code invokes is verified against the slots that actually exist in your cloudlet before the code is returned. If the model invokes something that doesn’t exist, the code is rejected and regenerated - You will never be handed code invoking made-up functions.
- It’s trained exclusively on Hyperlambda - More than 600,000 training snippets covering the entire platform; database access, HTTP endpoints, authentication, validation, email, file handling, scheduling, etc.
- It’s built for AI agents - The generator is available over the MCP server, allowing a connected AI agent such as Claude to create new endpoints - and hence new tools for itself - on demand.
You have to write “formal specifications using technical language”, in order for it to understand what to do. But if you’ve got some basic knowledge about software development, you should be able to rapidly understand how to use it. Below are some examples of prompts to give you an idea.
- “HTTP endpoint that selects rows from Artist table in chinook database, including Album rows for each individual artist. Use ArtistId as foreign key”
- “Executable Hyperlambda file that sends an email using [name], [email], [subject], and [body] arguments. Endpoint can only be executed by root and admin accounts”
How to use it
If you go to Hyper IDE for example, and you create a new Hyperlambda file (extension “.hl”), you can simply write normal text into the file, describing what you want the code to do. Then select your text and click the “Generate” button, and your description is sent through our LLM, transforming your English into working Hyperlambda that replaces your selection. This makes the workflow as natural as writing a comment; describe the intent, select it, generate - and the comment becomes code.
DISCLAIMER - Magic and Hyperlambda isn’t really an “all purpose language”, it’s an orchestration language. If you’re using it for complex algorithms, you’re doing something wrong. So whatever description you supply, must be something that is a good fit for Hyperlambda. Below is an example of the type of code the generator produces from a similar prompt.
/*
* Endpoint: chinook.artist.read
* Purpose: Reads artists from chinook database, including albums for each artist.
* Access: Root users only.
*/
.arguments
auth.ticket.verify:root
data.connect:chinook
data.read
table:Artist
include:x:@data.read/*
data.read
table:Album
where
and
ArtistId.eq:x:@.dp/#/*/ArtistId
yield
albums:x:@data.read/*
yield
artists:x:@data.read/*
Notice, if the AI creates wrong code, you can press CTRL+Z (or CMD+Z on a Mac) to undo the generator’s changes, then edit your description to be more specific and generate again.
Modifying your code with AI
Below your main code view in Hyper IDE and the Hyperlambda Playground, you can see an input textbox that says “Where the Machine Creates the Code”. This bar allows you to provide change instructions to the LLM. Examples of prompts you might want to test can be found below.

- Add a name argument and use this when sending the email
- Make the title argument mandatory
- Log all incoming arguments
- Etc …
Security
The generator is built to be safe to hand to an AI - or to your users - without supervision.
- It cannot hallucinate function invocations - The generator’s vocabulary is closed; every slot the generated code invokes is verified against the slots that actually exist in your cloudlet, and code invoking anything else is rejected and regenerated. Read the deep-dive at hyperlambda.dev.
- Generated endpoints are secured - Endpoints created by the generator declare their own authorisation requirements through [auth.ticket.verify], so RBAC applies to AI-generated code exactly as it applies to code you write yourself.
- Untrusted code can be sandboxed - Hyperlambda’s [whitelist] slot lets you execute partially untrusted Hyperlambda with an explicitly declared vocabulary, so even dynamically generated code can be constrained to exactly the slots you allow. See how whitelist executes partially untrusted Hyperlambda safely.
Frequently asked questions
What is the Hyperlambda Generator?
Magic's own proprietary SLM (Small Language Model), fine-tuned with more than 600,000 training snippets, that transforms natural language into working Hyperlambda code in typically 1.5 to 5 seconds.
Can it hallucinate function calls?
No. Every slot the generated code invokes is verified against the slots that actually exist in your cloudlet before the code is returned. If the model invokes something that does not exist, the code is rejected and regenerated.
Does it require an OpenAI API key?
No. Hyperlambda generation goes through our own model and is currently free of charge - no API key, and no per-token billing.
Where can I use it?
Everywhere code can be created in the dashboard: Hyper IDE, the Hyperlambda Playground, the Task Manager, SQL Studio, and the Generator - plus AI agents can use it over MCP to create new endpoints on demand.
How should I write my prompts?
Use formal specifications with technical language, naming your tables, arguments, and conditions precisely. If the result is wrong, press CTRL+Z to undo, refine your description, and generate again.
Can AI agents use the generator?
Yes. The generator is available over the MCP server, allowing a connected AI agent such as Claude to create new endpoints - and hence new tools for itself - on demand.