Wity Universal Command Envelope (WUCE) Spec v2.3
Wity's Universal Command Envelope (WUCE) is a deterministic, environment-agnostic, structured JSON format to represent sequences of commands or operations as dialgoue.
Published Dec 12, 2025•
By
RO
Extending Wity’s Dialectic Chain currently used for dialogue templating in wity agents, for other environments - like running filesystem commands, or running a cad software application etc. as a progressive dialogue.
1. Purpose
Wity's Universal Command Envelope (WUCE) is a deterministic, environment-agnostic, structured JSON format to represent sequences of commands or operations as dialgoue.
Design Principle:
- Represent any domain/environment: filesystem, CAD, database, APIs, shell, cloud, LLMs, etc.
- Encode sequential and parallel operations with explicit dependencies.
- Enable deterministic execution (not deterministic outcome) by agents, LLMs, or orchestration engines. Keep only what is necessary for deterministic execution.
- Be transport-agnostic: can be embedded in JSON-RPC, HTTP payloads, WebSockets, or any messaging system.
- Avoid encoding logging, streaming, preconditions, retry, output management policies inside the envelope
- Let executors/agents decide error handling, output streaming, retries & other such things as embedding these reduces portability and generality.
2. Envelope Structure
3. Field Definitions
4. Extensibility
The WUCE structure is designed to evolve without breaking compatibility:
- Action Domains: New domains (e.g., filesystem, cad, ml_model, iot) can be added without changing the envelope structure.
- Action Types: New actions can be introduced within any domain.
- Action Meta: Parameters for actions (actionMeta) can be extended or typed per actionDomain + actionType.
- Steps / Observables: New observe events or yield outputs can be added to define dependencies or trigger other steps dynamically.
- Step Fields: Fields like stepMsg can be enhanced or extended (e.g., richer runtime info) without affecting backward compatibility.
- Execution policies (timeouts, retries, priorities, conditional logic) are intentionally external to the WUCE. They are applied by the consumer programs, agents, or workflow engines interpreting the sequence.
5. Examples
5.1 Filesystem Example
5.2 CAD Example with Parallel Steps
6. Transport Layer
WUCE is transport-agnostic:
- Can be embedded in JSON-RPC:
- Or sent over HTTP, WebSocket, Kafka, or other messaging systems.
- The envelope itself is self-contained for deterministic execution.
