Skip to main content

Autonomous AI agent with subprocess orchestration, dynamic tool creation, and a local-first web interface

Project description

Plutus — Autonomous AI Agent with Subprocess Orchestration

A better, easier-to-use AI agent that spawns subprocesses to edit code, analyze files, and create new tools on the fly.

FeaturesQuick StartArchitectureToolsDynamic ToolsConfiguration


What is Plutus?

Plutus is an autonomous AI agent system that gives Claude (or any LLM) the ability to spawn isolated subprocesses for file editing, code analysis, shell execution, and dynamic tool creation. Think of it as Claude Code on steroids — the AI can not only run commands and edit files, but also create entirely new tools at runtime to solve problems it wasn't originally designed for.

Key Differentiators

Feature OpenClaw Plutus
File editing Basic read/write Subprocess-isolated surgical edits with diff output
Code analysis None Full AST analysis (functions, classes, complexity, call graphs)
Subprocess spawning None Parallel worker pool with JSON protocol
Dynamic tool creation None Create, validate, and hot-load new Python tools at runtime
CLI experience Basic Rich interactive REPL with slash commands
Guardrails Basic 4-tier system (observer → autonomous) with audit logging
Planning None Built-in plan/step tracking with auto-progress

Features

Subprocess Orchestration

The agent spawns isolated worker subprocesses for every operation — file edits, code analysis, shell commands, and custom scripts all run in their own process with resource limits and timeouts.

Intelligent Code Editing

Surgical find/replace edits with diff output. The agent reads files, applies precise changes, and verifies the result — all in subprocess isolation.

Deep Code Analysis

AST-based analysis of Python files:

  • Function and class extraction with signatures
  • Cyclomatic complexity scoring (A–F ratings)
  • Import dependency mapping
  • Call graph generation
  • TODO/FIXME/HACK detection
  • Module summarization

Dynamic Tool Creation

The agent can write new Python tools at runtime:

  1. Writes the tool code
  2. Validates it (syntax check)
  3. Saves it to ~/.plutus/custom_tools/
  4. Hot-loads it into the tool registry
  5. Uses it immediately

4-Tier Guardrail System

  • Observer — Read-only, AI can only observe
  • Assistant — Every action requires user approval
  • Operator — Pre-approved actions run autonomously
  • Autonomous — Full control, no restrictions

Multiple Interfaces

  • Terminal REPL (plutus chat) — Rich interactive chat with slash commands
  • Single prompt (plutus run "...") — Execute one task and exit
  • Web UI (plutus start) — Full web interface with WebSocket streaming

Quick Start

Installation

Linux & macOS:

curl -fsSL https://useplutus.ai/install.sh | bash

Windows (PowerShell):

iwr -useb https://useplutus.ai/install.ps1 | iex

That's it — the installer handles everything (dependencies, setup wizard, and first launch).

Manual installation
# Clone the repository
git clone https://github.com/Crypt0nly/plutus.git
cd plutus

# Install with pip
pip install -e .

# Run setup wizard
plutus setup

First Run

# Interactive terminal chat
plutus chat

# Or run a single prompt
plutus run "Create a Python script that sorts a CSV file by the second column"

# Or launch the web UI
plutus start

Chat Commands

Inside plutus chat, use slash commands:

Command Description
/help Show available commands
/tools List all available tools
/plan Show current execution plan
/clear Start a new conversation
/tier Show or change guardrail tier
/workers Show active subprocesses
/exit Exit the chat

Architecture

┌─────────────────────────────────────────────────────┐
│                   Agent Runtime                      │
│  ┌──────────┐  ┌──────────┐  ┌──────────────────┐  │
│  │   LLM    │  │ Planner  │  │   Guardrails     │  │
│  │ (Claude) │  │          │  │ (4-tier system)  │  │
│  └────┬─────┘  └──────────┘  └──────────────────┘  │
│       │                                              │
│  ┌────▼──────────────────────────────────────────┐  │
│  │              Tool Registry                     │  │
│  │  ┌────────┐ ┌────────────┐ ┌───────────────┐  │  │
│  │  │ Shell  │ │ Code Editor│ │ Code Analysis │  │  │
│  │  └────────┘ └────────────┘ └───────────────┘  │  │
│  │  ┌────────────┐ ┌──────────────┐ ┌─────────┐  │  │
│  │  │ Subprocess │ │ Tool Creator │ │ Browser │  │  │
│  │  └────────────┘ └──────────────┘ └─────────┘  │  │
│  │  ┌──────────┐ ┌─────────┐ ┌─────────────────┐ │  │
│  │  │Filesystem│ │ Process │ │ Custom Tools... │ │  │
│  │  └──────────┘ └─────────┘ └─────────────────┘ │  │
│  └───────────────────┬───────────────────────────┘  │
│                      │                               │
│  ┌───────────────────▼───────────────────────────┐  │
│  │           Subprocess Manager                   │  │
│  │  ┌─────────────┐  ┌──────────────────────┐    │  │
│  │  │ Worker Pool │  │  JSON stdin/stdout    │    │  │
│  │  │ (max: 8)    │  │  protocol             │    │  │
│  │  └─────────────┘  └──────────────────────┘    │  │
│  └───────────────────────────────────────────────┘  │
│                      │                               │
│  ┌───────────────────▼───────────────────────────┐  │
│  │           Worker Subprocesses                  │  │
│  │  ┌──────┐ ┌──────────┐ ┌──────────┐ ┌──────┐ │  │
│  │  │Shell │ │File Edit │ │Code Anal.│ │Custom│ │  │
│  │  │Worker│ │Worker    │ │Worker    │ │Worker│ │  │
│  │  └──────┘ └──────────┘ └──────────┘ └──────┘ │  │
│  └───────────────────────────────────────────────┘  │
└─────────────────────────────────────────────────────┘

Subprocess Communication Protocol

Workers communicate via JSON over stdin/stdout (one JSON object per line):

Agent → Worker:  {"action": "edit", "path": "/file.py", "edits": [...]}
Worker → Agent:  {"success": true, "result": {"changes": 2, "diff": "..."}}

This design provides:

  • Isolation — each operation runs in its own process
  • Safety — crashes in workers don't affect the agent
  • Parallelism — multiple workers can run simultaneously
  • Simplicity — JSON protocol is easy to debug and extend

Tools

Built-in Tools

Tool Description
shell Execute shell commands
filesystem File system operations (legacy, still available)
code_editor Create, read, and edit files via subprocess
code_analysis AST-based Python code analysis via subprocess
subprocess Direct subprocess spawning for parallel tasks
tool_creator Create new tools at runtime
process System process management
system_info System information queries
browser Web browsing (Playwright)
clipboard Clipboard operations
desktop Desktop/window management
app_manager Application management

Code Editor Operations

read       — Read file content (with optional line range)
write      — Create or overwrite a file
append     — Append content to a file
edit       — Apply surgical find/replace edits
delete     — Delete a file or directory
move       — Move/rename a file
copy       — Copy a file or directory
mkdir      — Create directories
list       — List directory contents
find       — Find files by glob pattern
grep       — Search file contents with regex
diff       — Show diff between two files

Code Analysis Operations

analyze        — Full analysis (everything below combined)
find_functions — List all function/method definitions with signatures
find_classes   — List all class definitions with methods
find_imports   — Extract all import statements
find_todos     — Find TODO/FIXME/HACK/NOTE comments
complexity     — Calculate cyclomatic complexity per function
symbols        — Extract all top-level symbols
call_graph     — Build function call graph
summarize      — Generate human-readable summary

Dynamic Tool Creation

The agent can create new tools when it encounters a task that requires capabilities it doesn't have:

# Example: Agent creates a CSV processor tool
tool_creator(
    operation="create",
    tool_name="csv_processor",
    description="Process and transform CSV files",
    code="""
import csv
from pathlib import Path

def main(args):
    path = args.get('path', '')
    operation = args.get('operation', 'read')
    
    if operation == 'read':
        with open(path) as f:
            reader = csv.DictReader(f)
            rows = list(reader)
        return {'success': True, 'result': {'rows': rows, 'count': len(rows)}}
    
    elif operation == 'sort':
        column = args.get('column', '')
        with open(path) as f:
            reader = csv.DictReader(f)
            rows = sorted(list(reader), key=lambda r: r.get(column, ''))
        return {'success': True, 'result': {'rows': rows, 'count': len(rows)}}
    
    return {'success': False, 'error': f'Unknown operation: {operation}'}
"""
)

Created tools are:

  • Validated — syntax-checked before saving
  • Persisted — saved to ~/.plutus/custom_tools/ across sessions
  • Hot-loaded — immediately available in the tool registry
  • Isolated — executed in subprocess workers

Configuration

Config File: ~/.plutus/config.json

{
  "model": {
    "provider": "anthropic",
    "model": "claude-sonnet-4-6",
    "temperature": 0.7,
    "max_tokens": 4096
  },
  "guardrails": {
    "tier": "operator",
    "audit_enabled": true
  },
  "agent": {
    "max_tool_rounds": 25
  },
  "planner": {
    "enabled": true,
    "auto_plan": true
  },
  "gateway": {
    "host": "127.0.0.1",
    "port": 7777
  }
}

Supported Providers

Provider Models Config
Anthropic Claude 4 Sonnet, Claude 4 Opus, etc. ANTHROPIC_API_KEY
OpenAI GPT-4.1, GPT-4.1-mini, etc. OPENAI_API_KEY
Ollama Llama 3.2, Mistral, etc. Local, no key needed
Custom Any OpenAI-compatible endpoint API_KEY + base URL

API Keys

Keys are stored securely in ~/.plutus/.secrets.json (chmod 600) and never exposed via the API. Set them via:

# Setup wizard
plutus setup

# Environment variable
export ANTHROPIC_API_KEY=sk-ant-...

# Or via the web UI settings page

CLI Reference

plutus                  # Show help
plutus start            # Launch web UI + API server
plutus chat             # Interactive terminal chat
plutus run "prompt"     # Run a single prompt
plutus setup            # Setup wizard
plutus status           # Show configuration
plutus tools            # List available tools
plutus set-tier <tier>  # Change guardrail tier
plutus audit            # Show audit log
plutus config-show      # Display full config as JSON

Development

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest tests/ -v

# Run specific test file
pytest tests/test_subprocess.py -v

# Lint
ruff check plutus/

Project Structure

plutus/
├── plutus/
│   ├── __init__.py
│   ├── __main__.py
│   ├── cli.py                      # CLI with chat REPL
│   ├── config.py                   # Configuration management
│   ├── core/
│   │   ├── agent.py                # Main agent runtime
│   │   ├── conversation.py         # Conversation management
│   │   ├── heartbeat.py            # Heartbeat system
│   │   ├── llm.py                  # LLM client (LiteLLM)
│   │   ├── memory.py               # SQLite memory store
│   │   ├── planner.py              # Plan management
│   │   └── subprocess_manager.py   # Subprocess orchestrator
│   ├── gateway/                    # Web API + WebSocket
│   ├── guardrails/                 # Permission tiers + audit
│   ├── skills/                     # YAML skill definitions
│   ├── tools/
│   │   ├── base.py                 # Tool base class
│   │   ├── registry.py             # Tool registry with hot-reload
│   │   ├── code_analysis.py        # AST-based code analysis
│   │   ├── code_editor.py          # File creation and editing
│   │   ├── subprocess_tool.py      # Direct subprocess spawning
│   │   ├── tool_creator.py         # Dynamic tool creation
│   │   ├── shell.py                # Shell commands
│   │   ├── filesystem.py           # File system operations
│   │   ├── process.py              # Process management
│   │   ├── browser.py              # Web browsing
│   │   └── ...
│   └── workers/
│       ├── shell_worker.py         # Shell command worker
│       ├── file_edit_worker.py     # File editing worker
│       ├── code_analysis_worker.py # Code analysis worker
│       └── custom_worker.py        # Dynamic tool worker
├── ui/                             # React web interface
├── bridge/                         # Local ↔ cloud workspace sync
├── shared/                         # Shared models and memory (used by local + cloud)
├── tests/
│   ├── test_subprocess.py          # 34 comprehensive tests
│   ├── test_config.py
│   ├── test_guardrails.py
│   └── test_tools.py
├── pyproject.toml
└── README.md

Cloud Version

A hosted, fully managed version of Plutus is available at useplutus.ai for users who want a zero-setup cloud experience. The cloud version includes:

  • Persistent cloud workspace with push/pull sync to your local Plutus
  • Multi-device access via any browser
  • Managed infrastructure — no API keys or server setup required
  • Priority support

The cloud backend is open-source and available to the community. Contributions, self-hosting, and custom deployments are welcome — check out the documentation to get started.

License

AGPL-3.0 License — see LICENSE for details.

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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

plutus_ai-0.3.250-cp314-cp314-macosx_11_0_arm64.whl (1.6 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

plutus_ai-0.3.250-cp314-cp314-macosx_10_15_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.14macOS 10.15+ x86-64

plutus_ai-0.3.250-cp313-cp313-win_amd64.whl (1.5 MB view details)

Uploaded CPython 3.13Windows x86-64

plutus_ai-0.3.250-cp313-cp313-manylinux_2_28_x86_64.whl (8.1 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

plutus_ai-0.3.250-cp313-cp313-macosx_11_0_arm64.whl (1.6 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

plutus_ai-0.3.250-cp313-cp313-macosx_10_13_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

plutus_ai-0.3.250-cp312-cp312-win_amd64.whl (1.5 MB view details)

Uploaded CPython 3.12Windows x86-64

plutus_ai-0.3.250-cp312-cp312-manylinux_2_28_x86_64.whl (8.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

plutus_ai-0.3.250-cp312-cp312-macosx_11_0_arm64.whl (1.6 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

plutus_ai-0.3.250-cp312-cp312-macosx_10_13_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

plutus_ai-0.3.250-cp311-cp311-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.11Windows x86-64

plutus_ai-0.3.250-cp311-cp311-manylinux_2_28_x86_64.whl (8.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

plutus_ai-0.3.250-cp311-cp311-macosx_11_0_arm64.whl (1.6 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

plutus_ai-0.3.250-cp311-cp311-macosx_10_9_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

File details

Details for the file plutus_ai-0.3.250-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for plutus_ai-0.3.250-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 12ba02b4707625f6c70811a3fea961ffed53295b84156250892f7629b81934ee
MD5 a0d323a6ed7a3f50b366de2109e31449
BLAKE2b-256 3376f266ab826ef362209e89913239633dd24d8901f1622f5b6b9931fdb2caf3

See more details on using hashes here.

File details

Details for the file plutus_ai-0.3.250-cp314-cp314-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for plutus_ai-0.3.250-cp314-cp314-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 fddccaf121ef2066042760e7904483bbea34b135b3bbb5b94fb5a6a53a7d4052
MD5 08d0ddc1f5ddf082b749b2e0400eb1db
BLAKE2b-256 2a24756647eb1f1f65deb92d7da13ba864fcd91db83002445276dddeca976339

See more details on using hashes here.

File details

Details for the file plutus_ai-0.3.250-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for plutus_ai-0.3.250-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 a89f8f20d37166c73bfcfb92c9cf9a282a67c99e6bd824d83dc300bb2e846670
MD5 13c63cc9006a7c73037ed81d61dbfa46
BLAKE2b-256 b38aabcde43872d452c7131207d16f6184e004444b3c3423e13788e2fa87d2b4

See more details on using hashes here.

File details

Details for the file plutus_ai-0.3.250-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for plutus_ai-0.3.250-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9b2860b2446316cfef04fa0d4dee15a52ad8276caf3ccff633296eea76a45d00
MD5 75ad11f72d3267492c2f50bc5bf9263a
BLAKE2b-256 494c93463ae7b95cf1c64b9d1c269f814944438d650562986282b228b52b553e

See more details on using hashes here.

File details

Details for the file plutus_ai-0.3.250-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for plutus_ai-0.3.250-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fa7b190bca8175e5f8028994fd74be95d5c1382fc6cad3471fe7a34302510cd3
MD5 f3a028684a421b2dc5add976740f5bdf
BLAKE2b-256 912a0abe385508dd788167e4c7e6039c07de5b6e9a9b9acb9c42828f32679d10

See more details on using hashes here.

File details

Details for the file plutus_ai-0.3.250-cp313-cp313-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for plutus_ai-0.3.250-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 bcce2eca702e3d9b60ae744056be4ef8368ead23d8ac6ad15ed6866ca7c77da5
MD5 e1490344103bd24b8d00872cc3fa8d5d
BLAKE2b-256 c9492373b31f43ead3866ba8fe7bfd6efa952c8fdf996aef4934020f8d6f8cfb

See more details on using hashes here.

File details

Details for the file plutus_ai-0.3.250-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for plutus_ai-0.3.250-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 9770827b452bbacca3ff13b0c29b12426cfcd26f1347b4962430d2f89e9a7ac7
MD5 e6bf5cfebdfd5ea0ce6bf0677fa92f02
BLAKE2b-256 bd6ab36c114f77004dc0c007c89f6ed624998b05015ec6a6716248a72d2b5377

See more details on using hashes here.

File details

Details for the file plutus_ai-0.3.250-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for plutus_ai-0.3.250-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3db93440ba6f9b8f2ed25dcf60d4611f2e7a75ae59629fb29f8d46b1e56a8889
MD5 526308dc2f9718fc759fb2111ab8b004
BLAKE2b-256 6bd82df44702c4063a0432e5f2a686fc29912b3647eb6bf30e880a514d0ce099

See more details on using hashes here.

File details

Details for the file plutus_ai-0.3.250-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for plutus_ai-0.3.250-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 00917e7204f0d55b8bb84076414200ccce1b6ced10b7642f7935b39cc68f9979
MD5 f74559f17582215dc04217fcf3a6d50b
BLAKE2b-256 59161e8153e1a19599458d08941f935b7c83cb917376d0edba0239f9b7ed1884

See more details on using hashes here.

File details

Details for the file plutus_ai-0.3.250-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for plutus_ai-0.3.250-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 768decb54acba9363f7eabc1bdae4f923df371ae2c1fc9e5d037b09651d2eb37
MD5 2e4dac868a69828877a5c7ec8bdc1de2
BLAKE2b-256 d70455018cd529ed56ad9583ab051bb7d349ab3db2f6e8bcca7e8aee63d02003

See more details on using hashes here.

File details

Details for the file plutus_ai-0.3.250-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for plutus_ai-0.3.250-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 07bc5caf4c29a1985f1b74995f01fa0d359cd0e340a52081fa038ae20702e8d5
MD5 83f04273f0158fbb52d018bd837ff003
BLAKE2b-256 4666e35cecce12378f3efc93bc4decdf4da23e994ef1cd935010fc5351a054a7

See more details on using hashes here.

File details

Details for the file plutus_ai-0.3.250-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for plutus_ai-0.3.250-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 184d0cf115bfe289f4f4474e3e4dd0bcb4b63cdcb6e8373431a534334900841d
MD5 b7836e3822785150dbdc9c16fc1ff1e8
BLAKE2b-256 0d68a0fafef5c1dc7bd1a558b295990e81ca366a3fa1e90217b7286145be1aa5

See more details on using hashes here.

File details

Details for the file plutus_ai-0.3.250-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for plutus_ai-0.3.250-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 60061d3ac8423bb0ba8ad1fcdd3d1c53c6b1018075f0086ba41a59c9774d9017
MD5 ad3503f80010eb3f049ee8c49ffa3cdf
BLAKE2b-256 b77a9d38db5694e9c850def9834449b27f3c1a529ba19ca8c1676fdcb6bc6a40

See more details on using hashes here.

File details

Details for the file plutus_ai-0.3.250-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for plutus_ai-0.3.250-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 58489d8c2db1cf2f8ace7b71c5cb072471662843d1436a9f2fc5e2533d099997
MD5 581a05ce4e505a189fdb700e1f863922
BLAKE2b-256 370f3828102d403d1c4e3b5a0b34058d9687a1261dfbcc2260d275aa7f5b29a2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page