An AI agent that writes and executes JavaScript on the fly

AiAgentRunJS is a demonstration of autonomous AI agent workflows built with LangGraph.js. The agent can reason about tasks, generate JavaScript code, execute it in a controlled environment, and iterate based on results — a pattern increasingly used in developer tooling and workflow automation.

Technologies used

LangGraph.js, Node.js, LLM orchestration, sandboxed JS execution

Use cases

  • Automated data transformation pipelines
  • Developer assistant workflows
  • Prototype AI agents before production deployment
  • Integration with n8n and other automation tools

Result

A working reference implementation for building tool-using AI agents in JavaScript, published on GitHub for the developer community.