ubl-office
The Agent Runtime (Wake · Work · Dream)
Run agents like reliable services, not fragile notebooks.
What is this?
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.
The Loop
- 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
- Repeat, with backpressure, watchdog timers, exponential backoff on failure
Quickstart
use ;
use MockBackend;
use json;
async
API Overview
States
Configuration
Office
Memory
Error Model
| Error | Meaning |
|---|---|
Brain(msg) |
Cognition/LLM error |
Gate(msg) |
Policy violation |
Tool(msg) |
MCP tool error |
Io(msg) |
File/network error |
Config(msg) |
Configuration error |
Shutdown |
Clean shutdown requested |
Reliability
- Exponential backoff: consecutive errors increase delay (capped)
- Automatic dreaming: consolidates memory every N steps
- State broadcasting: watch channel for external monitoring
- Graceful shutdown: flush and close cleanly
Security
#![forbid(unsafe_code)]- Gate-first execution (no action without policy check)
- Constitution as immutable constraint
- Memory hygiene (consolidation, trimming)
License
MIT — See LICENSE