English

Pel, A Programming Language for Orchestrating AI Agents

Programming Languages 2025-06-10 v2 Artificial Intelligence Emerging Technologies

Abstract

The proliferation of Large Language Models (LLMs) has opened new frontiers in computing, yet controlling and orchestrating their capabilities beyond simple text generation remains a challenge. Current methods, such as function/tool calling and direct code generation, suffer from limitations in expressiveness, scalability, cost, security, and the ability to enforce fine-grained control. This paper introduces Pel, a novel programming language specifically designed to bridge this gap. Inspired by the strengths of Lisp, Elixir, Gleam, and Haskell, Pel provides a syntactically simple, homoiconic, and semantically rich platform for LLMs to express complex actions, control flow, and inter-agent communication safely and efficiently. Pel's design emphasizes a minimal, easily modifiable grammar suitable for constrained LLM generation, eliminating the need for complex sandboxing by enabling capability control at the syntax level. Key features include a powerful piping mechanism for linear composition, first-class closures enabling easy partial application and functional patterns, built-in support for natural language conditions evaluated by LLMs, and an advanced Read-Eval-Print-Loop (REPeL) with Common Lisp-style restarts and LLM-powered helper agents for automated error correction. Furthermore, Pel incorporates automatic parallelization of independent operations via static dependency analysis, crucial for performant agentic systems. We argue that Pel offers a more robust, secure, and expressive paradigm for LLM orchestration, paving the way for more sophisticated and reliable AI agentic frameworks.

Keywords

Cite

@article{arxiv.2505.13453,
  title  = {Pel, A Programming Language for Orchestrating AI Agents},
  author = {Behnam Mohammadi},
  journal= {arXiv preprint arXiv:2505.13453},
  year   = {2025}
}

Comments

1. Updated author email address (I graduated so I added my alumni email). 2. Changed mono-font color to blue for better readability

R2 v1 2026-07-01T02:22:45.538Z