The PCLIPS Advantage

Turn isolated CLIPS agents into a living network of parallel intelligence

Built for developers and researchers who refuse to be limited by single-threaded thinking — make distributed rule-based systems clear, powerful, and real.

Start Your PCLIPS Journey →

Parallel Agents Aren't The Problem.
Isolation Is.

No one has made truly distributed, communicating CLIPS agents simple, reliable, and productive — until now.

Start Your PCLIPS Journey
Real-time

Pub/sub fact sharing via Ably

Multi-role

Targeted messaging to planners, executors, monitors

v0.1 POC

Proven concept — ready for your swarm

Built on decades of CLIPS legacy + modern pub/sub power.

Get The Parallel Edge — Start Now

Built For Builders Who Think Bigger

AI & Expert System Researchers

Scale your rule-based experiments across distributed agents.

Multi-Agent System Developers

Build collaborative swarms without heavy frameworks.

Distributed Systems Enthusiasts

Combine classic symbolic AI with modern networking.

The Forward-Thinkers

Get ahead in parallel intelligence — before the field explodes.

Claim Your PCLIPS Advantage

The 3-Part PCLIPS Framework

Simple. Powerful. Built for agents that ship intelligence together.

Identity & Discovery

Agents broadcast who they are — name, roles, status — and discover peers automatically.

Remote Assertion (rassert)

Fire rules that publish facts anywhere: broadcast, role-targeted, or agent-specific.

Safe, Threaded Execution

Thread-safe queues, filtering, deduplication — CLIPS stays rock-solid even in swarms.

Start Building Your Swarm Today

PCLIPS v0.1 — Parallel CLIPS

A simple proof-of-concept enabling multiple CLIPS agents to communicate via pub/sub messaging with Ably.

What is PCLIPS?

PCLIPS allows CLIPS rule-based agents to remotely assert facts to each other over a network. Agents can:

  • Broadcast facts to all agents
  • Target agents by role (e.g., 'executor', 'planner')
  • Target specific agent instances by ID
  • Discover other active agents via presence

Step 1: Installation

Get started in two easy steps:

1.1 Install Python dependencies:

pip install -r requirements.txt

1.2 Get an Ably API key:

  • Sign up at https://ably.com/
  • Create a new app
  • Copy your API key (you'll need this for the next step)

Step 2: Run the Example

The example demonstrates three agent types working together:

Planner — Creates tasks and publishes them to executors

Executor — Receives tasks, processes them, and publishes completion

Monitor — Watches for completed tasks

2.1 Edit example.py and add your Ably API key:

ABLY_API_KEY = "your-key-here"

2.2 Run each agent in a separate terminal:

# Terminal 1
python example.py monitor

# Terminal 2
python example.py executor

# Terminal 3
python example.py planner

Expected Output: You should see the Planner create tasks 1 and 2, the Executor receive and process them, and the Monitor report completions — all in real time across the network.

Step 3: Basic Usage Pattern

Here's the fundamental pattern for creating your own agents:

from pclips import PCLIPSAgent
import time

# Create an agent with name, roles, and Ably key
agent = PCLIPSAgent('my-agent', ['worker'], 'your-ably-key')

# Define CLIPS rules
rules = """
(defrule process-task
    ?f <- (task ?id)
    =>
    (printout t "Processing task " ?id crlf)
    (rassert (str-cat "(result " ?id ")"))
)
"""

agent.load_rules(rules)
agent.reset()

# Assert local fact
agent.local_assert("(task 1)")
agent.run_rules()

# Keep agent running to receive remote facts
while True:
    time.sleep(1)

Step 4: Understanding Agent Identity

Each agent has three key identifiers:

Agent Name — Logical name (e.g., "andrew")

Agent ID — Unique instance ID (e.g., "andrew-abc123")

Roles — List of functional roles (e.g., ['planner', 'executor'])

Multiple instances of the same agent name can run with different IDs, allowing you to scale your swarm horizontally.

Step 5: Master the rassert Function

The rassert function is available inside CLIPS rules to publish facts remotely. Here are all the ways to use it:

; Broadcast to all agents
(rassert "(task (id 1) (status new))")

; Target agents with specific role
(rassert "(task (id 1) (status ready))" (create$ executor))

; Target specific agent instance
(rassert "(message (text hello))" nil "andrew-abc123")

; Target specific role AND agent
(rassert "(urgent-task (id 99))" (create$ planner) "planner-xyz789")

Step 6: Presence & Discovery

PCLIPS implements a robust, multi-layered discovery system to track active agents:

1. Identity Broadcasting (iam) — Agents periodically broadcast their metadata (ID, name, and roles)

2. Standard Template — Every agent automatically loads a template for peer tracking

3. Presence Polling — Agents periodically poll the Ably presence list as a fallback

Step 7: Channel Isolation for Multiple Swarms

By default, all agents communicate on the 'pclips' channel. Isolate different groups of agents by specifying a custom channel:

# Isolate these agents on a specific channel
agent = PCLIPSAgent('worker-1', ['executor'], 'your-key', channel_name='production-flow')

This allows multiple independent agent swarms to coexist on the same Ably application without interfering with each other's fact assertions.

How It Works: The Architecture

Understanding the flow helps you debug and optimize your agents:

Agent A Rule Fires (rassert ...) called Publish to Ably channel Ably Broadcasts Agent B receives (Callback thread) Queue message Processing thread dequeues Filter (own / role / ID checks) env.assert_string(fact) env.run() Agent B Rules Fire

Thread Safety & Reliability

PCLIPS follows a strict threading model to ensure reliability:

  • Ably callbacks run in network thread
  • Messages are queued (thread-safe)
  • Single processing thread owns CLIPS environment
  • Only processing thread calls CLIPS methods

This prevents race conditions and ensures your agents remain rock-solid even under load.

Key Features Implemented

  • Remote assertion (rassert) from CLIPS rules
  • Thread-safe message queue
  • Message filtering (own messages, role-based, agent-specific)
  • Presence discovery (multi-layered fallback system)
  • Standard agent tracking template
  • Rule execution safety (400-rule firing limit)
  • Message deduplication
  • Clean shutdown

Important: v0.1 Limitations

This is a minimal proof-of-concept. Be aware of these limitations:

  • No message persistence
  • No guaranteed delivery
  • Basic error handling
  • Not production-ready
  • Performance not optimized

Perfect for learning, experimentation, and prototyping. Not recommended for mission-critical systems yet.

License & Resources

License: CC BY-NC-SA 4.0 (Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International)

This project is licensed for non-commercial use only.

Learn More:

If you've felt stuck with isolated CLIPS agents...

We built PCLIPS to bring them together — and give you the parallel edge.

Download the Free PCLIPS v0.1 Starter Kit + Join Weekly Updates on Distributed Rule-Based Intelligence

Thanks for your interest.
Launch Interactive Slideshow