Show HN: Realizing Karpathy's Prediction for Natural Language Programming

2 weeks ago 1

Hi everyone,

Andrej Karpathy's posted in early 2023 (https://x.com/karpathy/status/1617979122625712128) -

> "The hottest new programming language is English"

I have worked tirelessly years to realize this vision. I built a Natural Language Programming stack for building AI Agents. I think it is the first true Software 3.0 stack.

The core idea: Use LLMs as CPUs! You can finally step debug through your prompts and get reliable, verifiable execution. The stack includes a new language, compiler, developer tooling like VSCode extension.

Programs are written as markdown. H1 tags are agents, H2 tags are natural language playbooks (i.e. functions), python playbooks. All playbooks in an agents run on the same call stack. NL and python playbooks can call each other.

Quick intro video: https://www.youtube.com/watch?v=ZX2L453km6s

Github: https://github.com/playbooks-ai/playbooks (MIT license)

Documentation: https://playbooks-ai.github.io/playbooks-docs/getting-starte...

Project website: runplaybooks.ai

Example Playbooks program -

# Country facts agent This agent prints interesting facts about nearby countries ## Main ### Triggers - At the beginning ### Steps - Ask user what $country they are from - If user did not provide a country, engage in a conversation and gently nudge them to provide a country - List 5 $countries near $country - Tell the user the nearby $countries - Inform the user that you will now tell them some interesting facts about each of the countries - process_countries($countries) - End program ```python from typing import List @playbook async def process_countries(countries: List[str]): for country in countries: # Calls the natural language playbook 'GetCountryFact' for each country fact = await GetCountryFact(country) await Say("user", f"{country}: {fact}") ``` ## GetCountryFact($country) ### Steps - Return an unusual historical fact about $country

There are a bunch of very interesting capabilities. A quick sample -

- "Queue calls to Extract table of contents for each candidate file" - Effortless calling MCP tools, multi-threading, artifact management, context management

- "Ask Accountant what the tax rate would be" is how you communicate with other agents

- you can mix procedural natural language playbooks, ReAct playbooks, Raw prompt playbooks, Python playbooks and external playbooks like MCP tools seamlessly on the same call stack

- "Have a meeting with Chef, Marketing expert and the user to design a new menu" is how you can spawn multi-agent workflows, where each agent follows their own playbook for the meeting

- Coming soon: Observer agents (agents observing other agents - automated memory storage, verify/certify execution, steer observed agents), dynamic playbook generation for procedural memory, etc.

I hope this changes how we build AI agents going forward for the better. Looking forward to discussion! I'll be in the comments.

Read Entire Article