Expand description
ubl-office — The Agent Runtime (Wake · Work · Dream)
Run agents like reliable services, not fragile notebooks.
ubl-office is the execution environment for LogLine agents. It coordinates
thinking (TDLN), acting (MCP tools), memory, and policy (Gate) under one tight loop.
No root access, no mystery state, no shrug emojis.
§What it does (in one screen)
- Boot: load identity/constitution, attach transports, warm caches
- Orient: build a typed
CognitiveContext(system directive, recall, constraints) - Decide: call
tdln-brainto produce a strictSemanticUnit(TDLN AST) - Gate: run
tdln-gate→ Permit | Deny | Challenge - Act: execute via
ubl-mcp(MCP tools) - Dream: consolidate short-term into durable memory; compact context; keep it fresh
- Repeat, with backpressure, watchdog timers, exponential backoff on failure
§Mental Model
┌────────────┐ prepares ┌──────────────┐ thinks ┌──────────────┐ acts ┌──────────────┐
│ Narrator ├────────────▶│ ContextFrame ├──────────▶│ tdln-brain ├──────────▶│ ubl-mcp/tools│
└────┬───────┘ └──────┬───────┘ └──────┬───────┘ └──────┬───────┘
│ │ │ │
│ recall │ handover │ decision │ receipts
▼ ▼ ▼ ▼
┌────────────┐ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ Memory │◀─────────────│ UBL Ledger │◀─────────▶│ TDLN Gate │ │ UBL Ledger │
└────────────┘ └──────────────┘ └──────────────┘ └──────────────┘§Example
use ubl_office::{Office, OfficeConfig, OfficeState, SessionType, SessionMode};
let config = OfficeConfig {
session_type: SessionType::Work,
session_mode: SessionMode::Commitment,
..Default::default()
};
// Office::new(config, brain) to startStructs§
- Decision
Receipt - Receipt for an agent decision.
- Dream
Config - Dreaming (maintenance) configuration.
- Dream
Receipt - Receipt for dreaming/maintenance.
- Handover
Receipt - Receipt for handover (session pause/end).
- Memory
System - Memory system for agent state.
- Narrator
- Narrator builds cognitive context for the brain.
- Narrator
Config - Narrator configuration.
- Noop
Hooks - No-op hooks implementation.
- Office
- The Office runtime.
- Office
Config - Runtime configuration.
- Office
Metrics - Structured metrics for the runtime.
- Quota
Breach Receipt - Receipt for quota breach.
- Token
Budget - Token budget configuration.
- Tool
Call Receipt - Receipt for a tool call.
- Tracing
Hooks - Tracing-based hooks (logs events via tracing).
Enums§
- Office
Error - Errors from the Office runtime.
- Office
State - Agent lifecycle states.
- Session
Mode - Session mode determines commitment level.
- Session
Type - Session type determines allowed behaviors.
Traits§
- Office
Hooks - Trait for receiving Office lifecycle events.