Production-ready networked multi-agent substrate built on xml-pipeline. One port. Many bounded minds. Cryptographically sovereign.
Find a file
2026-01-03 14:48:57 -08:00
.codebuddy edited README.md 2025-12-23 19:03:58 -08:00
.idea re-writing docs and code 2026-01-03 14:48:57 -08:00
agentserver re-writing docs and code 2026-01-03 14:48:57 -08:00
docs re-writing docs and code 2026-01-03 14:48:57 -08:00
tests initial dir structure 2025-12-25 21:52:36 -08:00
.gitignore initial dir structure 2025-12-25 21:52:36 -08:00
__init__.py major changes to message bus, and xml listener 2026-01-01 15:05:13 -08:00
LICENSE Initial commit 2025-12-21 17:22:03 -08:00
pyproject.toml Major design solidification and documentation sync — December 26, 2025 2025-12-26 16:51:19 -08:00
README.md re-writing docs and code 2026-01-03 14:48:57 -08:00
README.v0.md major changes to base, renamed base to xmlListener 2025-12-31 22:59:02 -08:00
README.v1.md major changes to base, renamed base to xmlListener 2025-12-31 22:59:02 -08:00
setup-project.ps1 initial dir structure 2025-12-25 21:52:36 -08:00
structure.md added self-registration and autonomous grammar generation to docs 2026-01-02 15:35:00 -08:00

AgentServer — The Living Substrate (v2.0)

"It just works... safely."

January 03, 2026
Architecture: Autonomous Schema-Driven, Turing-Complete Multi-Agent Organism

What It Is

AgentServer is a production-ready substrate for the xml-pipeline nervous system. Version 2.0 stabilizes the design around exact XSD validation, typed dataclass handlers, mandatory hierarchical threading, and strict out-of-band privileged control.

See Core Architectural Principles for the single canonical source of truth.

Core Philosophy

  • Autonomous DNA: Listeners declare their contract via @xmlify dataclasses; the organism auto-generates XSDs, examples, and tool prompts.
  • Schema-Locked Intelligence: Payloads validated directly against XSD (lxml) → deserialized to typed instances → pure handlers.
  • Multi-Response Tolerance: Handlers return raw bytes; bus wraps in <dummy></dummy> and extracts multiple payloads (perfect for parallel tool calls or dirty LLM output).
  • Computational Sovereignty: Turing-complete via self-calls, subthreading primitives, and visible reasoning — all bounded by thread hierarchy and local-only control.

Developer Experience — Create a Listener in 12 Lines

That's it. No manual XML, no schemas, no prompts.

from xmlable import xmlify
from dataclasses import dataclass
from xml_pipeline import Listener, bus  # bus is the global MessageBus

@xmlify
@dataclass
class AddPayload:
    a: int
    b: int

def add_handler(payload: AddPayload) -> bytes:
    result = payload.a + payload.b
    return f"<result>{result}</result>".encode("utf-8")

Listener(
    payload_class=AddPayload,
    handler=add_handler,
    name="calculator.add",
    description="Adds two integers and returns their sum."
).register()  # ← Boom: XSD, example, prompt auto-generated + registered

The organism now speaks <add> — fully validated, typed, and discoverable.

Key Features

1. The Autonomous Schema Layer

  • Dataclass → cached XSD + example + rich tool prompt (mandatory description + field docs).
  • Namespaces: https://xml-pipeline.org/ns/<category>/<name>/v1 (served live via domain for discoverability).

2. Thread-Based Lifecycle & Reasoning

  • Mandatory <thread/> with hierarchical IDs for reliable subthreading and audit trails.
  • LLM agents reason via open self-calls and optional <todo-until/>.
  • All thought steps visible as messages — no hidden state.

3. Message Pump

  • Single linear pipeline with repair, C14N, XSD validation, deserialization, handler execution, and multi-payload extraction.
  • Supports clean tools and forgiving LLM streams alike.
  • Thread-base message queue with bounded memory.

4. Structural Control

  • Bootstrap from organism.yaml.
  • Runtime changes (hot-reload, add/remove listeners) via local-only OOB channel (localhost WSS or Unix socket — GUI-ready).
  • Main bus oblivious to privileged ops.

5. Federation & Introspection

  • YAML-declared gateways with trusted keys.
  • Controlled meta queries (schema/example/prompt/capability list).

Technical Stack

  • Validation & Parsing: lxml (XSD, C14N, repair) + xmlable (round-trip).
  • Protocol: Mandatory WSS (TLS) + TOTP on main port.
  • Identity: Ed25519 (signing, federation, privileged).
  • Format: Exclusive C14N XML (wire sovereign).

Why This Matters

AgentServer v2.0 is a bounded, auditable, owner-controlled organism where the XSD is the security, the thread is the memory, and the OOB channel is the sovereignty.

One port. Many bounded minds. Autonomous yet obedient evolution. 🚀


XML wins. Safely. Permanently.