Skip to main content

planck-agent-gateway

Routing Gateway for Collapsed Seraphim Agent Decisions
Perfect Squared Inc. | P2 Labs | Seraphim |LZ⟩

Agents of the Highest Order


Overview

planck-agent-gateway is the operational routing layer that sits between the quantum symbolic intelligence of seraphim-logic-core and the QUANTA product suite. Every collapsed agent decision passes through the gateway for routing, handling, and dispatch.

seraphim-logic-core (quantum collapse)
       ↓
PlanckGateway (routing + dispatch)
       ↓
QUANTA Handlers (PULSE / VIGIL / RAD / SRD / ...)
       ↓
Operational Action

Architecture

planck_agent_gateway/
├── handler.py           — BaseHandler + HandlerResult (base classes)
├── handlers/
│   ├── pulse_handler.py — QUANTA-PULSE: threat detection
│   ├── vigil_handler.py — QUANTA-VIGIL: integrity monitoring
│   ├── rad_handler.py   — QUANTA-RAD: RF/signal anomaly detection
│   └── default_handler.py — Fallback for unregistered grammars
├── router.py            — DecisionRouter: grammar → handler mapping
├── gateway.py           — PlanckGateway: dispatch, logging, alerting
└── pipeline.py          — SeraphimPipeline: end-to-end integration

Quick Start

Standalone gateway

from planck_agent_gateway import PlanckGateway

gateway = PlanckGateway(alert_callback=lambda r: print(f"ALERT: {r}"))

decision = {
    "grammar": "threat_detection",
    "symbol": "CONFIRMED",
    "value": 1.0,
    "entropy_signal": 0.95,
    "lifecycle": "DELIVERED",
}
result = gateway.dispatch(decision)
print(result)  # HandlerResult(QUANTA-PULSE | CONFIRMED → escalate_and_block [ALERT])

End-to-end with seraphim-logic-core

import numpy as np
from planck_agent_gateway import SeraphimPipeline

# QUANTA-PULSE threat detection pipeline
pipeline = SeraphimPipeline.for_pulse(use_quantum=True)

# Run from XOR-lattice event
result = pipeline.run_xor_event(window_1, window_2)
if result and result.alert:
    print(f"ALERT [{result.severity}]: {result.symbol} → {result.action}")
    print(result.data)

# Run from raw data stream
result = pipeline.run_stream(stream_data)

# QUANTA-VIGIL integrity monitoring pipeline
vigil = SeraphimPipeline.for_vigil()
result = vigil.run_xor_event(before, after)

QUANTA Handler Map

Grammar Handler Alert Symbols
threat_detection QUANTA-PULSE SPOOFED, CONFIRMED
integrity_monitor QUANTA-VIGIL DEGRADED, BREACHED
rad / rf_detection QUANTA-RAD SPOOFED, CONFIRMED
(anything else) DEFAULT —

Custom Handlers

from planck_agent_gateway import PlanckGateway, BaseHandler, HandlerResult

class MySRDHandler(BaseHandler):
    name = "QUANTA-SRD"
    def can_handle(self, grammar): return grammar == "srd_grammar"
    def handle(self, decision):
        return HandlerResult(self.name, decision["symbol"], "srd_action")

gateway = PlanckGateway()
gateway.register_handler(MySRDHandler())

Installation

pip install planck-agent-gateway

# With seraphim-logic-core integration
pip install planck-agent-gateway[seraphim]

Development:

git clone https://github.com/10XAnalytics/planck-agent-gateway
cd planck-agent-gateway
pip install -e ".[dev]"
pytest

License

Apache 2.0 — See LICENSE


Perfect Squared Inc. | P2 Labs — "Simulate the Future. Secure the Present."

Metadata

Release files for planck-agent-gateway 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for planck-agent-gateway 0.1.0
File Size Uploaded
planck_agent_gateway-0.1.0.tar.gz 14.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for planck-agent-gateway 0.1.0
File Interpreter ABI Platform
planck_agent_gateway-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 28.2 kB

Release files / planck_agent_gateway-0.1.0.tar.gz

Download URL planck_agent_gateway-0.1.0.tar.gz
Size 14.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a5a166d076703992804420e4bee1e26901f772a419d3e780b56fe65c6b911548
BLAKE2b-256 checksum
How to use checksums
0f138ba242ef3bbb1594d7cb91aebb5e8900c18b8708e907e51373d13fda5f1b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.5

Release files / planck_agent_gateway-0.1.0-py3-none-any.whl

Download URL planck_agent_gateway-0.1.0-py3-none-any.whl
Size 14.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ea752999510a85f814df97bb21b4dc5d2f3bfe1e308b0927d1a2a3ca6e80d179
BLAKE2b-256 checksum
How to use checksums
e513bffa3015a3dc71359199574bff4ec67ba5b3cc8599f68e84f713e1d94bb4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.5

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page