Skip to Main Content
Lightning Talk Intermediate Apache License 2.0

Designing an Agent-Level Programming Language: How We Built a Custom Bytecode VM and Sandbox for AI Agents inside Python

Proposal status is Withdrawn
Harsha Vardhan
Harsha Vardhan
Session Description

In the current AI landscape, agentic orchestration relies heavily on large language models (LLMs) emitting fragile JSON payloads, unstructured markdown, or raw Python code. These patterns create significant engineering challenges: high token overhead from structural schemas, severe security vulnerabilities when running generated code on host systems, and a lack of deterministic runtime limits.

To address this, we introduce INTHON: an open-source, Python-hosted programming language layer designed from the ground up for agentic execution. Instead of forcing LLMs to write verbose configuration schemas, INTHON provides a minimal, token-efficient grammar parsed via Lark EBNF. The codebase implements both an AST-walking interpreter for interactive debugging and a stack-based virtual machine (InthonVM) that runs loops up to 50x faster.

In this talk, we will dissect the architecture of INTHON, covering:

  1. Lexing & Parsing: How we designed a grammar optimized for LLM code generation, reducing token footprints by 40-70% compared to traditional JSON tool-calling formats.

  2. The PyBridge Sandbox: How we intercept Python module imports using a secure proxy wrapper (InthonPyObject) to enforce strict execution policies (disallowing os, sys, and subprocess while permitting numpy and pandas).

  3. First-Class Agentic Primitives: Designing native language support for human-in-the-loop approval gates (approve...before), episodic storage engines, and resilient retry loops with exponential backoff.

  4. The Virtual Machine: A look inside our register/stack-based VM, instruction compilation, and resource metering (limits on max cost, runtimes, and tool-call counts).

We will conclude with a live demonstration of INTHON, showing how a single, 15-line script can automatically spins up a sandboxed agent and render a clean, interactive user-facing web dashboard using our built-in UI compiler.

Key Takeaways
  1. The Core Limitations of JSON & Raw Python Code Gen: Why traditional agent orchestration patterns fall short on token usage, safety, and DX.

  2. Grammar Design for LLMs: Principles of writing clean EBNF grammars that LLMs can generate with low error rates and minimum tokens.

  3. Building a Python Sandbox: How to build a custom import hook and object proxy to intercept unsafe dynamic attribute lookups.

  4. Language-Integrated UI: A blueprint for compiling structured agent specifications directly into reactive web dashboards.

References

Session Categories

Introducing a FOSS project or a new version of a popular project
Contributing to FOSS
Technology architecture
Engineering practice - productivity, debugging
Talk License: Apache License 2.0

Speakers

Harsha Vardhan
Harsha Vardhan Founder & Chief Scientist | HarVa Groups

🌱 Envisioning a futuristic tech landscape through innovation and education at HarVa Groups. Curiosity in technology fuels my every day. As the Founder and CEO since 2020, I've steered our mission from mere concepts to transformative tech solutions. Let's dive deeper into my journey.

I began my professional saga with a love for various domains, from music to politics, and of course, technology. Today, I use those diverse interests to drive forward-thinking projects at HarVa, aiming to simplify and beautify tech interactions. Our noteworthy efforts include the HydroLexi Dictionary App, Scandy, and HydroGen—an AI-powered code generator.

While tech is my mainstay, I'm also penning my first horror story for kids, "The Shadowed Silence," feeding my passion for storytelling. Every day, as I intertwine technology with creativity, I strive to make learning accessible and engaging to all.

Throughout my career in leadership and innovation, I've lived by a simple philosophy: keep learning, keep evolving. This outlook not only propels our projects at HarVa but also shapes the solutions we craft. From software development to UI/UX and AI, my toolkit is continuously expanding.

🚀 If you are passionate about changing the tech game or just intrigued by the nexus of creativity and technology, let’s connect. Email me at harvagroups@gmail.com or drop me a message here. Excited to explore what we can achieve together!