PtcRunner (PtcRunner v0.9.0)

Copy Markdown View Source

BEAM-native Programmatic Tool Calling (PTC) library.

PtcRunner enables LLMs to write programs that orchestrate tools and transform data inside a sandboxed environment. The LLM reasons and generates code; the computation runs in an isolated interpreter with deterministic results.

Core Components

ComponentPurpose
PtcRunner.SubAgentAgentic loop: prompt → LLM → program → execute → repeat
PtcRunner.LispPTC-Lisp interpreter
PtcRunner.SandboxIsolated execution with timeout/memory limits
PtcRunner.ContextTools and memory container

Example

{:ok, step} = PtcRunner.SubAgent.run("What's 2 + 2?", llm: my_llm)
step.return  #=> 4

The SubAgent asks the LLM to write a program, executes it in the sandbox, and returns the result. See PtcRunner.SubAgent.run/2 for all options.

Guides