A simple framework for LLM-powered applications
Project description
LLMProc
LLMProc: A Unix-inspired operating system for language models. Like processes in an OS, LLMs execute instructions, make system calls, manage resources, and communicate with each other - enabling powerful multi-model applications with sophisticated I/O management.
Table of Contents
- Why LLMProc over Claude Code?
- Installation
- Quick Start
- Features
- Documentation
- Design Philosophy
- License
Why LLMProc over Claude Code?
| Feature | LLMProc | Claude Code |
|---|---|---|
| License / openness | ✅ Apache-2.0 | ❌ Closed, minified JS |
| Token overhead | ✅ Zero. You send exactly what you want | ❌ 12-13k tokens (system prompt + builtin tools) |
| Custom system prompt | ✅ Yes | 🟡 Append-only (via CLAUDE.md) |
| Tool selection | ✅ Opt-in; pick only the tools you need | 🟡 Opt-out via --disallowedTools* |
| Tool schema override | ✅ Supports alias, description overrides | ❌ Not possible |
| Configuration | ✅ Single YAML/TOML "LLM Program" | 🟡 Limited config options |
| Scripting / SDK | ✅ Python SDK with function tools | ❌ JS-only CLI |
*
--disallowedToolsallows removing builtin tools, but not MCP tools.
Installation
# Basic install - includes Anthropic support
pip install llmproc
# Install with all providers: openai/gemini/vertex/anthropic
pip install "llmproc[all]" # other supported extras: openai/gemini/vertex/anthropic
# Or run without installing (requires uv) and run the CLI
uvx llmproc --help
Note: Only Anthropic models currently support full tool calling. OpenAI and Gemini models have limited feature parity. For development setup, see CONTRIBUTING.md.
Quick Start
Python usage
# Full example: examples/multiply_example.py
import asyncio
from llmproc import LLMProgram # Optional: import register_tool for advanced tool configuration
def multiply(a: float, b: float) -> dict:
"""Multiply two numbers and return the result."""
return {"result": a * b} # Expected: π * e = 8.539734222677128
async def main():
program = LLMProgram(
model_name="claude-3-7-sonnet-20250219",
provider="anthropic",
system_prompt="You're a helpful assistant.",
parameters={"max_tokens": 1024},
tools=[multiply],
)
process = await program.start()
await process.run("Can you multiply 3.14159265359 by 2.71828182846?")
print(process.get_last_message())
if __name__ == "__main__":
asyncio.run(main())
Configuration
LLMProc supports TOML, YAML, and dictionary-based configurations. See examples for various configuration patterns and the YAML Configuration Schema for all available options.
CLI Usage
- llmproc - Execute an LLM program. Use
--jsonmode to pipe output for automation (see GitHub Actions examples) - llmproc-demo - Interactive debugger for LLM programs/processes
Run with --help for full usage details:
llmproc --help
llmproc-demo --help
Features
Production Ready
- Claude 3.7/4 models with full tool calling support
- Python SDK - Register functions as tools with automatic schema generation
- Async and sync APIs - Use
await program.start()orprogram.start_sync() - TOML/YAML configuration - Define LLM programs declaratively
- MCP protocol - Connect to external tool servers
- Built-in tools - File operations, calculator, spawning processes
- Tool customization - Aliases, description overrides, parameter descriptions
- Automatic optimizations - Prompt caching, retry logic with exponential backoff
GitHub Actions Examples
Real-world automation using LLMProc:
Setup: To use these actions, you'll need the workflow files and LLM program configs (linked below), plus these secrets in your repository settings:
ANTHROPIC_API_KEY: API key for ClaudeLLMPROC_WRITE_TOKEN: GitHub personal access token with write permissions (contents, pull-requests)
-
@llmproc /resolve- Automatically resolve merge conflicts Workflow | LLM Program (yaml) -
@llmproc /ask <question>- Answer questions on issues/PRs Workflow | LLM Program (yaml) -
@llmproc /code <request>- Implement features from comments Workflow | LLM Program (yaml)
In Development
- OpenAI/Gemini models - Basic support, tool calling not yet implemented
- Streaming API - Real-time token streaming (planned)
- Process persistence - Save/restore conversation state
Experimental Features
These cutting-edge features bring Unix-inspired process management to LLMs:
-
Process Forking - Create copies of running LLM processes with full conversation history, enabling parallel exploration of different solution paths
-
Program Linking - Connect multiple LLM programs together, allowing specialized models to collaborate (e.g., a coding expert delegating to a debugging specialist)
-
GOTO/Time Travel - Reset conversations to previous states, perfect for backtracking when the LLM goes down the wrong path or for exploring alternative approaches
-
File Descriptor System - Handle massive outputs elegantly with Unix-like pagination, reference IDs, and smart chunking - no more truncated responses
-
Tool Access Control - Fine-grained permissions (READ/WRITE/ADMIN) for multi-process environments, ensuring security when multiple LLMs collaborate
-
Meta-Tools - LLMs can modify their own runtime parameters! Create tools that let models adjust temperature, max_tokens, or other settings on the fly for adaptive behavior
Documentation
📚 Documentation Index - Comprehensive guides and API reference
- Python SDK Guide - Fluent API for building LLM applications
- YAML Configuration Schema - Complete configuration reference
- FAQ - Design rationales and common questions
- Examples - Sample configurations and tutorials
Design Philosophy
LLMProc treats LLMs as processes in a Unix-inspired operating system framework:
- LLMs function as processes that execute prompts and make tool calls
- Tools operate at both user and kernel levels, with system tools able to modify process state
- The Process abstraction naturally maps to Unix concepts like spawn, fork, goto, IPC, file descriptors, and more
- This architecture provides a foundation for evolving toward a more complete LLM operating system
For in-depth explanations of these design decisions, see our API Design FAQ.
License
Apache License 2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llmproc-0.9.1.tar.gz.
File metadata
- Download URL: llmproc-0.9.1.tar.gz
- Upload date:
- Size: 480.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb8fb0bd829d684fd048e9cfd931f78bd126b82ef253390a839de0f1985ba0b0
|
|
| MD5 |
fb0e9e98e4bc4b5f8921add483989c0d
|
|
| BLAKE2b-256 |
d463c9ca45e03474a9f8a0f2dfa5a027c333065a61b418ce8da66f8b3f649c20
|
Provenance
The following attestation bundles were made for llmproc-0.9.1.tar.gz:
Publisher:
release.yml on cccntu/llmproc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
llmproc-0.9.1.tar.gz -
Subject digest:
bb8fb0bd829d684fd048e9cfd931f78bd126b82ef253390a839de0f1985ba0b0 - Sigstore transparency entry: 222121200
- Sigstore integration time:
-
Permalink:
cccntu/llmproc@3a6b815519057385be32dc16cdad58402244552c -
Branch / Tag:
refs/tags/v0.9.1 - Owner: https://github.com/cccntu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3a6b815519057385be32dc16cdad58402244552c -
Trigger Event:
push
-
Statement type:
File details
Details for the file llmproc-0.9.1-py3-none-any.whl.
File metadata
- Download URL: llmproc-0.9.1-py3-none-any.whl
- Upload date:
- Size: 158.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
718ca8f68b5119164740c521b57ec2d1a6ce9d21da863f43fc3645cc8cbef076
|
|
| MD5 |
a1fd4f7766b7d1ff3f958d857b3dd33f
|
|
| BLAKE2b-256 |
b5fa762045eeda6bc431e212a2e6bd693ca5402500a8aefbc58b96e0193a5592
|
Provenance
The following attestation bundles were made for llmproc-0.9.1-py3-none-any.whl:
Publisher:
release.yml on cccntu/llmproc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
llmproc-0.9.1-py3-none-any.whl -
Subject digest:
718ca8f68b5119164740c521b57ec2d1a6ce9d21da863f43fc3645cc8cbef076 - Sigstore transparency entry: 222121215
- Sigstore integration time:
-
Permalink:
cccntu/llmproc@3a6b815519057385be32dc16cdad58402244552c -
Branch / Tag:
refs/tags/v0.9.1 - Owner: https://github.com/cccntu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3a6b815519057385be32dc16cdad58402244552c -
Trigger Event:
push
-
Statement type: