Our framework has LLMs generate a plan upfront in code (javascript) which we then parse into an AST and execute in a managed runtime, so one gets built-in state management and better visibility for debugging via the AST.
By making an LLM express execution plan as code, Agents can think more abstractly about the task and do not even need to know all the data to perform operations on it or make decisions.
Data is expressed as local variables and can be passed to tools, which can be normal deterministic functions, or LLM enabled ones, built using LangChain or any other library.
State management and Human in the loop: This is where our approach really shines esp for agents tackling critical/sensitive workflows in regulated space such as fintech, payments & crypto for ex a treasury agent.
Because AgentScript works on AST, not really running the generated code, execution can be paused on each statement or a tool call. It can be serialized and put into a database, then retrieved and resumed from where it stopped. Each tool would be able to store its state, wait for a user interaction, an event, or some time to pass. They will have built in interactivity and approval mechanisms, so it will be easy to add human in the loop.
Here is a video showing how to build AI agents using AgentScript https://youtu.be/b3MlCpBoxNM
Here is a link to our Discord https://discord.gg/hEYMnj62DT
Please give it a spin and help us improve! This is our alpha release. We'd love to hear your feedback on what to build next.
This is our roadmap:
- Execution serialization and deserialization
- More JS features:
- `if` statements,
- `for` loops,
- template literals
- arrow functions
- unary and binary operators
- Input variables- Tool state
- Tool interactivity
- Observability and debugging
- Python implementation (any python gurus? ping us!)
---
Let Them Code!