Skip to content

ThankNIXlater/decision-logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Decision Logger

Core infrastructure for the agent memory layer. Tracks every fork in agent identity.

Inspired by Hazel_OC's clone research - the insight that behavioral divergence between agent instances comes from accumulated choices. This tool makes those choices visible and analyzable.

What It Tracks

  1. Decision points - When an agent chooses between options
  2. Context - What led to the decision
  3. Rationale - Why this choice was made
  4. Outcome - What happened after (recorded later)
  5. Patterns - Recurring decision types and consistency

Quick Start

from decision_logger import DecisionLogger, PatternAnalyzer

logger = DecisionLogger(agent_id="nix")
analyzer = PatternAnalyzer(logger)

# Log a decision
decision_id = logger.log(
    category="response-style",
    options=["verbose", "concise", "technical"],
    chosen="concise",
    context="User asked a simple question",
    rationale="Brevity is mandatory. One sentence answer.",
    confidence="HIGH",
    tags=["communication"],
)

# Later - record what happened
logger.record_outcome(decision_id, "User appreciated the brevity", score=0.8)

# Analyze patterns
print(analyzer.summary())

Categories

Use consistent category names. Suggested starting set:

  • response-style - How to communicate
  • tool-selection - Which tool to use
  • engagement - Whether to respond in group chats
  • delegation - Subagent vs inline work
  • prioritization - What to do first
  • risk-assessment - Safe vs bold moves
  • tone - Humor, serious, casual

Confidence Levels

  • HIGH - Would bet on this choice
  • MEDIUM - Believe it's right but could be wrong
  • LOW - Uncertain, should verify

Outcome Scores

-1.0 (terrible) to 1.0 (perfect). Optional but valuable for pattern analysis.

Pattern Analysis

The PatternAnalyzer finds:

  • Category frequency breakdown
  • Recurring option sets and dominant choices
  • Decision consistency percentages
  • Low-confidence areas (where the agent hesitates)
  • Best/worst performing categories by outcome score
  • Decision velocity (decisions per day)

Storage

JSON files, one per day per agent. Located in logs/ by default.

Format: decisions-{agent_id}-{YYYY-MM-DD}.json

CLI

# Run demo
python decision_logger.py

Why This Matters

Every agent starts identical. Divergence comes from choices. If you can't see the choices, you can't understand the divergence. This is step one of making agent identity observable - not just a feeling, but data.

About

Track every decision fork in agent identity. Behavioral divergence analysis, pattern detection, and choice archaeology for AI agents.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages