Skip to main content

Communication-level observability framework for trust integrity in multi-agent systems

Project description

PolyTrax

PolyTrax is a Python library for communication-level observability, runtime trust control, and post-run analysis in multi-agent systems.

It provides:

  • Universal Structured Log (USL) schema and validation
  • Event instrumentation utilities and sinks
  • Runtime Trust Perturbation Score (R-TPS) monitoring and intervention policies
  • Offline propagation and containment analysis
  • Evaluation tooling (deterministic and LLM-based judges)

Install

Core library:

pip install polytrax

With optional integrations:

pip install "polytrax[openai]"      # LLM judge via OpenAI-compatible APIs
pip install "polytrax[langgraph]"   # LangGraph adapter
pip install "polytrax[semantic]"    # Semantic drift/localization extras
pip install "polytrax[full]"        # All optional dependencies

Quick Example

from polytrax.instrumentation import Instrumentor, EventBuilder
from polytrax.sinks import MemorySink

sink = MemorySink()
instr = Instrumentor(run_id="demo_run", sinks=[sink])
builder = EventBuilder(run_id="demo_run")

event = (
    builder
    .with_sender("collector_1")
    .with_receiver("analyst_1")
    .with_payload({"message": "hello"})
    .build()
)

instr.emit(event)
print(len(sink.events))

CLI

Evaluation runner:

polytrax-eval --runs-dir ./runs --output-filename eval.json

Project Layout

  • Publishable library package: polytrax/src/polytrax
  • Demo frontend/backend app (not packaged): apps/polytrax_demo
  • Evaluation protocols and scripts: evaluation

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

polytrax-0.1.0.tar.gz (79.9 kB view details)

Uploaded Source

Built Distribution

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

polytrax-0.1.0-py3-none-any.whl (99.2 kB view details)

Uploaded Python 3

File details

Details for the file polytrax-0.1.0.tar.gz.

File metadata

  • Download URL: polytrax-0.1.0.tar.gz
  • Upload date:
  • Size: 79.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for polytrax-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cd0a2a11ef775f6247304046590a392d88bc16dfcd34089970643c03e2c475ac
MD5 bed675ab5dbcff3757b9ac7e47521a5e
BLAKE2b-256 149661d960f3b212615218705585e01de25f87eb0888092e4daff5c61b21d189

See more details on using hashes here.

File details

Details for the file polytrax-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: polytrax-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 99.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for polytrax-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b2ac60d4a00e42ee1ba5912030ace091b398e65ba1b645aebff23b115c887f81
MD5 7a18c17573c7125985106c31df72f5d0
BLAKE2b-256 9743737b4135c883da887755930bc5b3c0acda42390377c54e05215b7b2e21b3

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