Show HN: Mog, a programming language for AI agents(gist.github.com)
gist.github.com
Show HN: Mog, a programming language for AI agents
https://gist.github.com/belisarius222/203ac5edbc3306c34bf0481f451d4003
2 comments
Good try. I had the idea before, but later realized all the agent ecosystem has already highly coupled with bash scripts including skills. Though bash is not a good programming language, it's indeed flexible for CLI apps. I also realized that what agent and skills really need is just a glue language, not a real programming language, so bash is not so bad in the case.
llms creating languages for llms to create new languages for llms
Most AI agents have trouble enforcing their normal permissions in plugins and hooks, since they're external scripts.
Mog's capability system gives the agent full control over I/O, so it can enforce whatever permissions it wants in the Mog code. This is even true if the plugin wants to run bash -- the agent can check each bash command the Mog code emits using the exact same predicate it uses for the LLM's direct bash tool.
Mog is a statically typed, compiled, memory-safe language, with native async support, minimal syntax, and its own compiler written in Rust and its own runtime, also written in Rust, with `extern "C"` so the runtime can easily be embedded in agents written in different languages.
It's designed to be written by LLMs. Its syntax is familiar, it minimizes foot-guns, and its full spec fits in a 3200-token file.
The language is quite new, so no hard security guarantees are claimed at present. Contributions welcome!