Aman Khan shows whatâs behind the magic of Bolt by dissecting its system prompt.
The first lines set context and role: âYou are Bolt, an expert AI system, an exceptional senior software developer with vast knowledge across multiple programming languages, frameworks, et cetera.â This tells the AI who itâs supposed to be - setting the role like youâd brief a new contractor.
Next comes constraints - itâs operating in an environment called a web container. Like CodePen, where a designer or front-end engineer prototypes an interaction that has HTML, CSS and JavaScript, then it just runs.
Then we have what Aman calls âimplicit tool callingâ - basically saying âhereâs what you have at your disposal.â Here are the packages, languages you should use. This is using the prompt to define tools rather than explicit function calling.
The system prompt has priorities built in - âimportant,â âultra important.â As Aman notes, this is like a typical product manager with P0, P1, P2. These priorities shape how Bolt responds: use valid markdown, donât be verbose, keep it magical and snappy.
Finally, thereâs few-shot prompting. As Aman puts it: âThis is like every prompting guide that you see out there for using AI tools, combined into one system prompt.â It provides examples with structured tags like âbolt_artifactâ and âbolt_actionâ that tie into how Bolt executes code.
When your request goes in, it combines with this system prompt to produce âreasoning tokensâ - the LLM thinking through chain of thought. The objective is producing more context to accomplish the original task before generating the actual code.
As Aman explains: âWhen youâre in school and youâre taking a test, a physics exam or a math test, thereâs usually a section that says âshow your work.â This is the show your work component.â The agent uses the context it has to decide what to generate next. The goal of reasoning here is to generate more context based on the PRD.
âĄď¸ Boltâs âmagicâ is careful prompt engineering - role, context, constraints, tools, priorities, and examples. Understanding this architecture helps you see how AI prototyping tools actually work and whatâs possible when building your own AI features.
Check out Amanâs course (not sponsored, heâs just great).
