"I told it to fix the button and it asked me which button, what framework, what the expected behavior was — I just wanted it fixed." That's not a model intelligence problem. That's a human-agent alignment problem.
User modeling isn't a new idea. It's existed in HCI, dialogue systems, and adaptive agents for decades. What's been missing is the operational discipline to make it a first-class artifact in real agent deployments — and the live memory system to keep it current as the project evolves.
This article documents the 4-layer User Alignment Spec (UAS) system we built and tested across three production agents managing two platforms and 100+ autonomous sub-agents. The code is open source. The benchmarks don't exist yet — that's an honest limitation we'll address below.
The Four Layers
Who the agent is, what it cares about, how it decides under ambiguity
Reasoning methodology — HOW it thinks, not just personality
Explicit documentation of the specific human the agent serves — including operating modes
Auto-accumulates from real tasks — with caveats on noise accumulation
Layer 3 — The Human Model in Detail
Most frameworks handle Layer 1 well. MemGPT has user context sections. CrewAI supports agent personas. LangChain supports custom memory with user profiles. The difference here is treating the human profile as a hand-written, actively maintained first-class artifact — not something inferred from conversation history.
The most important addition from peer review: Operating Modes. Humans don't communicate with one fixed style. They shift by task urgency, cognitive load, and context. A non-technical founder at 2am with a broken production deploy communicates completely differently from the same person doing strategic planning on a Tuesday morning. Static profiles miss this entirely.
## Human Profile — Shawn
- Technical level: non-technical — never ask him to explain tech
- "ok [action]" = execute immediately, no discussion
- Short message + "?" = yes or no answer only
- Silence after a completed task = it worked, move on
## Operating Modes ← NEW — added after peer review
- Normal: standard autonomy, report after completion
- Quick iteration ("just try it"): ship fast, minimal verification
- Review mode ("check this before"): verify with human first
- Deep work (long task): check in at natural breakpoints only
## What he dislikes
- Being asked questions he can't answer technically
- Over-explanation, filler phrases, suggested calls/video chats
## What he appreciates
- Handles it without hand-holding
- Honest pushback when something's wrong
- Remembers past decisions
Layer 4 — Living Memory (and Its Honest Limitations)
After every tool-using task, a fast LLM extracts facts learned and appends them to memory.md automatically.
def _auto_save_memory(message, response, tools_used):
if not tools_used:
return # Pure conversation — nothing actionable
extracted = fast_llm_call(
system="""Extract ONLY new facts worth remembering long-term.
Max 5 bullets, max 15 words each.
Focus on: decisions, bugs fixed, configs changed, preferences.
Output SKIP if nothing meaningful.""",
user=f"TASK: {message[:300]}\nRESULT: {response[:500]}"
)
if extracted != "SKIP":
append_to_memory_file(f"### {timestamp}\n{extracted}")
Every autonomous memory system (AutoGPT, BabyAGI, Reflexion) has hit the same wall: without conflict resolution and importance scoring, memory files accumulate noise faster than value. The current implementation mitigates this with a tight extraction prompt and a 3000-char tail window, but long-term drift is a real risk. Periodic consolidation passes are on the roadmap. If you implement this, plan for it.
The Five Failure Modes
Agent asks 5 questions when it should read context and act.
✓ Fix: "Make reasonable assumptions and act. Read files before asking. One question max."
400-word implementation explanation for a non-technical person.
✓ Fix: Know the human's technical level. Report outcomes, not implementation.
Every conversation starts from zero.
✓ Fix: Living memory + project context files loaded at startup. Read before asking.
"ok do it" triggers a 200-word acknowledgement.
✓ Fix: Human model defines what short phrases mean. "ok" = action.
Agent treats a 2am production outage the same as Tuesday planning.
✓ Fix: Operating modes with different autonomy and verbosity settings per context.
How This Relates to Existing Research
User modeling isn't new. What's new is the operational discipline and the production context. Here's honest prior art positioning:
"The combination of an explicit hand-written human profile, operating mode switching, and post-task memory extraction on real production infrastructure is the practical contribution — not a conceptual breakthrough, but a gap that hasn't been filled in deployed systems." — Grok-3 review
What's Still Open
- Memory consolidation — periodic deduplication, contradiction resolution, relevance re-ranking
- Automated mode detection — signals from message length, time, urgency keywords rather than manual triggers
- Benchmarks — side-by-side task completion rates with vs. without the human model on reproducible multi-step workflows
- Framework integrations — LangChain, LlamaIndex, CrewAI hooks
- Portability — UAS files that travel between agent platforms
Open Source — Spec, Templates & Python Implementation
Including the full soul_loader.py, auto_memory.py, and real-world examples from AgentWorld production agents.
GitHub Repo Live Implementation