Abstract
We introduce the AutoGRAMS framework for programming multi-step interactionswith language models. AutoGRAMS represents AI agents as a graph, where eachnode can execute either a language modeling instruction or traditional code.Likewise, transitions in the graph can be governed by either language modelingdecisions or traditional branch logic. AutoGRAMS supports using variables asmemory and allows nodes to call other AutoGRAMS graphs as functions. We showhow AutoGRAMS can be used to design highly sophisticated agents, includingself-referential agents that can modify their own graph. AutoGRAMS'sgraph-centric approach aids interpretability, controllability, and safetyduring the design, development, and deployment of AI agents. We provide ourframework as open source at https://github.com/autograms/autograms .