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 →No one has made truly distributed, communicating CLIPS agents simple, reliable, and productive — until now.
Pub/sub fact sharing via Ably
Targeted messaging to planners, executors, monitors
Proven concept — ready for your swarm
Built on decades of CLIPS legacy + modern pub/sub power.
Scale your rule-based experiments across distributed agents.
Build collaborative swarms without heavy frameworks.
Combine classic symbolic AI with modern networking.
Get ahead in parallel intelligence — before the field explodes.
Simple. Powerful. Built for agents that ship intelligence together.
Agents broadcast who they are — name, roles, status — and discover peers automatically.
Fire rules that publish facts anywhere: broadcast, role-targeted, or agent-specific.
Thread-safe queues, filtering, deduplication — CLIPS stays rock-solid even in swarms.
A simple proof-of-concept enabling multiple CLIPS agents to communicate via pub/sub messaging with Ably.
PCLIPS allows CLIPS rule-based agents to remotely assert facts to each other over a network. Agents can:
Get started in two easy steps:
1.1 Install Python dependencies:
pip install -r requirements.txt
1.2 Get an Ably API key:
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.
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)
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.
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")
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
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.
Understanding the flow helps you debug and optimize your agents:
PCLIPS follows a strict threading model to ensure reliability:
This prevents race conditions and ensures your agents remain rock-solid even under load.
This is a minimal proof-of-concept. Be aware of these limitations:
Perfect for learning, experimentation, and prototyping. Not recommended for mission-critical systems yet.
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:
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