Temporal Unified Resource Notation

TURN

A musical notation system for agent orchestration

Just as musical notation enables composers, conductors, and musicians to collaborate across centuries and continents, TURN enables agent architects, orchestrators, and runtime systems to share patterns, benchmark approaches, and build interoperable systems. There is no shared language for expressing what agents do—until now.

v0.1.0 — Initial Specification

Agent Orchestration as Sheet Music

A TURN score represents an entire agent orchestration pattern—who acts, when, and at what cost.

cortex-ensemble — Implement Auth Middleware
Session: sess_a7f3 · Agent: agent_fullstack_dev
Playing
CLEF 𝄞 [Req→Code]
KEY ♯security ♯no_secrets
TIME 8/100K 💭
Tracks
T1Init
T2Plan
T3Scaffold
T4Validate
T5Fix
T6Output
🔭
Scouts×3 cheap
◁ AKG
· ·
◁ AKG
· ·
◁ AKG
· ·
👁
Lookouts×2 cheap
◁ ENV
· ·
· ·
· ·
· ·
· ·
🔮
Speculators×3 cheap
· ·
JWT vs Session
· ·
· ·
· ·
· ·
🎯
Main Agentexpensive
💭
Plan auth
Write middleware
💭
Refine
Fix secrets
▷ Final output
Validators×3 cheap
· ·
· ·
◁ constraints
❌ secrets check
✓ all pass
· ·
📝
Scribes×2 cheap
· ·
▷ Obs
▷ Obs
▷ Obs ▷ Obs
▷ Obs
▷ final Obs
📚
Librarianscheap
· ·
· ·
· ·
53% ctx
· ·
· ·
Resource Meters
Context
53,421 / 100K
Budget
$4.21 / $20.00
Tokens
42,156 / 100K
Flywheel Status
4 observations → 1 constraint proposal
Status: pending human review
Last trigger: promote-obs→constraint · 2m ago
Now Playing
♪ Turn 6: "Final output — auth middleware"
🎼 Composer: RequirementAtom#req_auth
🎭 Conductor: SessionAtom#sess_a7f3
⏱ 4m 23s elapsed ~1 min remaining
Cheap (○)
Expensive (◉)
💭 Thinking
Output (■)
Read
Write
Flywheel
Constraint

A full Cortex ensemble: 7 tracks of coordinated agents executing a complex implementation task. The playhead marks the current turn.

Music → Agents

TURN adapts centuries of musical notation evolution to the new challenge of expressing agent orchestration.

Staff / Track Agent lane — visual row per agent type
Measure Turn — atomic reasoning episode
Bar line Turn boundary — synchronization point
Notes Actions — cognition events (◉ expensive, ○ cheap)
Rests Waiting — no action this beat
Clef Atom context — which knowledge atoms are in scope
Key signature Constraints — active policies and limits
Time signature Resource budget — token/cost limits per turn
Dynamics (pp → ff) Token cost — resource consumption intensity
Repeat signs |: :| Flywheel — learning loop boundaries
Composer Requirements author — defines orchestration patterns
Conductor Orchestrator — interprets requirements, directs sessions

Why Agent Systems Need Notation

Discrete Temporal Structure

Agents work in "turns," not continuous time. UML sequence diagrams and BPMN don't capture this bounded, episodic reasoning.

Cognition as Consumable Resource

Context windows fill, token budgets deplete. TURN makes resource consumption visible with expensive and cheap cognition symbols.

Knowledge as First-Class

Knowledge atoms aren't just data flowing through—they define context, constrain behavior, and accumulate learning via clefs and key signatures.

Multi-Agent Coordination

Parallel cognition with synchronization points. TURN scores show multiple agent tracks interleaving like parts in an orchestra.

Framework-Agnostic Patterns

Express orchestration patterns independent of ADAMAS, LangChain, CrewAI, or AutoGen. Compare approaches across frameworks.

The Graph Watches Itself

TURN Trigger Language (TTL) enables the knowledge graph to observe its own state changes and autonomously fire actuators.

Core Primitives

The symbolic vocabulary of TURN—each symbol carries precise semantic meaning.

Expensive Cognition

Main agent reasoning turn. Opus/Sonnet-class.

Cheap Cognition

Helper agent action. Haiku-class.

Inject / Write

Push data to target. Outbound flow.

Observe / Read

Pull data from source. Inbound flow.

Output

Completed artifact. Terminal result.

Flywheel

Learning cycle / feedback loop.

💭

Extended Thinking

Deep reasoning budget active.

Active Constraint

Key signature. Policy enforced.

The Cortex Model

Six helper archetypes provide cognitive support for the main reasoning agent—before, during, and after each turn.

🔭

Scouts

Before Main

Pre-fetch relevant context from the AKG. Reduce main agent token consumption by anticipating what's needed.

○◁AKG ──▷── Main ◉
👁️

Lookouts

Before Main

Detect blocking issues, conflicts, or risks before main agent commits. Early warnings prevent wasted computation.

○◁ENV ──⚠──▷ Main
🔮

Speculators

During Main

Pre-compute likely decision branches. When the main agent decides, relevant results are immediately available.

Main ◉ → ○ branch A | ○ branch B

Validators

After Main

Continuously check outputs against active constraints. Immediate feedback rather than post-execution review.

Main ◉──▷ ○◁constraints ──▷ Main
📝

Scribes

After Main

Observe reasoning and capture learnings. Create ObservationAtoms that feed the flywheel learning loop.

Main ◉──▷ ○──▷ ObservationAtom
📚

Librarians

Continuous

Monitor context window usage. Proactively compress, summarize, or externalize content to prevent overflow.

[████░░] → ○ compress → [██░░░░]

The Learning Flywheel

TURN's self-improving loop—agents learn from execution, accumulate observations, and autonomously refine their own behavior.

Execute

Main agent reasons and produces output → ExecutionAtom

Observe

Scribes capture patterns and learnings → ObservationAtom

Constrain

High-confidence observations promote to constraints → ConstraintAtom

Route

Constraints update routing rules → RouterAtom learns which models to use

⟳ The system improves without human intervention
♪ Flywheel Pattern |: repeat :|
|:
  Execute:   Main ──▷ ExecutionAtom          
  Observe:   Scribe Main ObservationAtom  
  Constrain: @trigger: confidence≥0.9        → ConstraintAtom
  Route:     @schedule: daily                → RouterAtom
:|

The Graph Watches Itself

The TURN Trigger Language (TTL) enables autonomous graph self-mutation. Triggers watch atom changes and fire actuator chains—agents, system operations, and human approvals.

Observation → Constraint Promotion TTL Syntax
@trigger ObservationAtom
  WHEN confidence >= 0.9
   AND 'limitation' IN tags
   AND occurrence_count >= 3
  ACTUATE {
    @agent: constraint_proposer    # Agent drafts constraint
    THEN
    @system: create ConstraintAtom  # System persists it
    THEN
    @human: review IF impact = 'high' # Human approves if needed
  }

@agent Actuator

Launch agent reasoning in response to graph changes. Discovers agents semantically, injects context, manages sessions.

@system Actuator

Automatic CRUD operations on the knowledge graph. Create, update, delete, or validate atoms without agent intervention.

@human Actuator

Require human approval for high-impact changes. Configurable timeouts, escalation, and fallback policies.

Explore Trigger Language →

Platform Mappings

TURN is framework-agnostic. Express orchestration patterns once, map to any platform.

ADAMAS (Native)

TURN is the native notation for ADAMAS. Full support for atoms as clefs, constraints as key signatures, graph triggers, flywheel patterns, and SessionAtom tracking.

ADAMAS Pattern → TURN Score → TURN Runtime (live dashboard)

LangChain

Chains map to turn sequences. Agents map to tracks. Limited: no flywheel, no atom clefs, no graph triggers.

CrewAI

Crews map to scores. Agents to tracks. Tasks to turns. Missing: constraint key signatures, sub-turn granularity.

AutoGen

Conversational agents map to tracks. Messages to beats. Turn-taking dialogue maps to measure sequences.

Evidence-Based Constraints

TURN encodes empirically-derived constraints from controlled multi-agent research (Kim et al. 2025) as key signatures for composition-time validation.

♪ Constraint Key Signatures Appendix D
𝄞 [TaskAtom → OutputAtom]
baseline<0.45   # Multi-agent yields diminishing returns above 45%
tools≤4         # Tool expansion has negative returns past 4 tools
decomposable    # Task must allow parallel decomposition

⚠ TURN Analyzer: Score violates ♯baseline<0.45 (measured: 0.62)
  Evidence: β=-0.408 negative returns above threshold
  Required: Add ♯override:baseline with justification

Getting Started

Read the Spec

Core notation primitives, score structure, semantic extensions, and pattern library.

Specification →

Trigger Language

TTL syntax for graph self-mutation: conditions, actuators, chaining, and the TriggerEngine.

TTL Reference →

Helper Archetypes

Six executable patterns: Scouts, Lookouts, Speculators, Validators, Scribes, Librarians.

Archetypes →

Runtime Dashboard

Live visualization of agent orchestration—agents playing music in real-time.

Dashboard Spec →

AKG Atoms

ScoreAtom, PatternAtom, TriggerAtom—orchestration patterns as queryable knowledge.

Atom Definitions →

For AI Agents

LLM-optimized documentation for autonomous agent consumption.

View llms.txt →

Part of the Stack

Atomic Knowledge Graph (AKG)

TURN atoms (ScoreAtom, PatternAtom, TriggerAtom) are defined by the AKG specification. Orchestration patterns become queryable, versionable, composable knowledge.

Domain Graph Protocol (DGP)

The TriggerEngine integrates with DGP for graph mutations. Triggers watch atom changes via DGP events and fire actuators through DGP operations.

ADAMAS

TURN is the native notation for ADAMAS agent orchestration. Restate durable execution, FalkorDB graph storage, NATS event streaming.

The Vinyl Adapter

The TURN logo is a triangular vinyl record adapter—a device that enables 45 RPM records to play on 33 RPM turntables. It embodies TURN's essence: rotation (everything TURNs), adaptation between speeds (expensive and cheap cognition), enabling playback (without the adapter, the music won't play), and the three-phase structure (before/during/after) of the Cortex model.