USD Cognitive Substrate - State engine for multi-agent AI orchestration
Project description
USD Substrate
Python state engine for the Cognitive Orchestrator platform.
Installation
pip install usd-substrate
Usage
from datetime import datetime
from usd_substrate import (
JsonInterchangeReader,
JsonInterchangeWriter,
SessionState,
ActiveMode,
Paradigm,
EnergyLevel,
BurnoutLevel,
MomentumPhase,
AgentType,
)
# Create a session state
state = SessionState(
session_id="my-session",
timestamp=datetime.now().isoformat(),
active_mode=ActiveMode.FOCUSED,
active_paradigm=Paradigm.CORTEX,
energy_level=EnergyLevel.MEDIUM,
burnout_level=BurnoutLevel.GREEN,
momentum_phase=MomentumPhase.BUILDING,
session_start_goal="Complete the project",
)
# Write to file
writer = JsonInterchangeWriter()
doc = writer.create_session_state_document(state)
writer.write_to_file(doc, "cognitive_state.json")
# Read from file
reader = JsonInterchangeReader()
loaded = reader.read_from_file("cognitive_state.json")
session = reader.extract_session_state(loaded)
# Create a cross-agent handoff
arc_doc = writer.create_mycelium_arc(
session_state=state,
source_agent=AgentType.CLAUDE_CODE,
target_agent=AgentType.GEMINI_CLI,
resume_summary="Working on implementation",
)
Features
- Pydantic Models: Full type validation
- Checksum Verification: Document integrity
- Safety Constraints: RED burnout protection
- Cross-Agent Handoffs: Mycelium Arc protocol
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
usd_substrate-1.0.0.tar.gz
(23.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file usd_substrate-1.0.0.tar.gz.
File metadata
- Download URL: usd_substrate-1.0.0.tar.gz
- Upload date:
- Size: 23.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5779e9b5b51fbeb5d577396fc0d917fb838c52a1fa265ce9a0149708f4527b1e
|
|
| MD5 |
1ac5c0b2d300377b8be7d6cf76ed7810
|
|
| BLAKE2b-256 |
4072f92e3228d23aa4a82b9ebc90e86e3cf7273742800e3310c068c6c360b1ee
|
File details
Details for the file usd_substrate-1.0.0-py3-none-any.whl.
File metadata
- Download URL: usd_substrate-1.0.0-py3-none-any.whl
- Upload date:
- Size: 19.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0587ffe8cfa0d403b56455c91d58d19fe6b2d29d38ac3de0291bfd517fd0139
|
|
| MD5 |
7349c24bb977bece0aca1a9eaf2ef2f4
|
|
| BLAKE2b-256 |
364aba9330d0f64ba4dff17fc816e0b723a3a7a2def77a1d083545dca70f2bb5
|