OnPrem.LLM: Autonomous AI Agents with Sandboxed Execution

2026-03-18T03:29:38.000Z·2 min read
OnPrem.LLM AgentExecutor: 2-line autonomous AI agent with 9 built-in tools (file/shell/web), sandboxed execution, cloud+local model support.

OnPrem.LLM provides an AgentExecutor that runs autonomous AI agents with 9 built-in tools (file I/O, shell, web search/fetch) — supporting both cloud models (GPT, Claude, Gemini) and local models (Ollama, vLLM, llama.cpp).

What Is OnPrem.LLM

OnPrem.LLM is an open-source library for running LLMs on-premises. Its AgentExecutor pipeline enables fully autonomous agents that can use tools to complete complex tasks — all running locally or via cloud APIs.

The AgentExecutor

The core class provides autonomous agent capabilities with sandboxed execution:

from onprem.pipelines import AgentExecutor

# Full agent with all tools:
executor = AgentExecutor(model='anthropic/claude-sonnet-4-5')

# Safer: no shell access
executor = AgentExecutor(model='openai/gpt-5-mini', disable_shell=True)

# Minimal: file read/write only
executor = AgentExecutor(model='openai/gpt-5-mini', enabled_tools=['read_file', 'write_file'])

# Web research agent
executor = AgentExecutor(model='openai/gpt-5-mini', enabled_tools=['web_search', 'web_fetch'])

Built-in Tools (9 total)

ToolDescription
read_fileRead complete file contents
read_linesRead specific line ranges
edit_fileEdit files via find/replace
write_fileWrite complete file contents
grepSearch for patterns in files
findFind files by glob pattern
run_shellExecute shell commands
web_searchSearch the web
web_fetchFetch and read web content

Model Support

Works with any LiteLLM-supported model:

Sandbox

By default, agents are restricted to a working directory and cannot read or write outside it. Shell access can be disabled for additional security. Custom tools can be added as needed.

Significance

This demonstrates the growing trend of lightweight, self-contained agent frameworks. Rather than building complex multi-service architectures, developers can launch capable autonomous agents in a few lines of code with local sandboxing.


Source: OnPrem.LLM | HN: 13 points

↗ Original source
← Previous: Why AI Systems Don't Learn — Lessons from Cognitive ScienceNext: Swarmer AI Drones: 520% Nasdaq Debut After 100K+ Combat Missions →
Comments0