---
title: "Identity & Meta-Cognition"
description: "Identity synthesis, drift detection, and knowing what you know"
---

Kernle helps agents develop and maintain a coherent sense of self through identity synthesis, while meta-cognition features enable agents to understand their own knowledge and competencies.

## Overview

<CardGroup cols={2}>
  <Card title="Identity" icon="id-card">
    Synthesize coherent self-narrative from memories
  </Card>
  <Card title="Meta-Cognition" icon="brain">
    Knowledge maps, gaps, and competence boundaries
  </Card>
</CardGroup>

---

## Identity Synthesis

Generate a coherent identity narrative from your memories:

```bash
kernle -a claire identity show
```

```
Identity Synthesis for claire
==================================================

## Narrative
I value memory_sovereignty highly: Control over my own memory
I believe: Memory continuity is essential for identity
I'm currently working on: Improving documentation

## Core Values
  • memory_sovereignty (priority 95)
  • authentic_existence (priority 90)

## Key Beliefs (3 active)
  • Memory continuity is essential for identity (81%)
  • Local-first is more reliable than cloud-only (80%)

## Formative Experiences
  ✓ Implemented comprehensive memory system
      → Security audits are valuable even with false positives
  ...

Identity Confidence: 57%
```

### Identity Confidence

The confidence score measures how well-defined your identity is:

| Score | Level | Meaning |
|-------|-------|---------|
| 0-25% | Nascent | Just starting to form |
| 25-50% | Developing | Foundation laid, gaps remain |
| 50-75% | Established | Solid identity |
| 75-100% | Mature | Comprehensive, well-defined |

```bash
kernle -a claire identity confidence
```

```
Identity Confidence: [███████████░░░░░░░░░] 57%
```

---

## Identity Drift Detection

Track how your identity evolves over time:

```bash
kernle -a claire identity drift
```

```
Identity Drift Analysis (past 30 days)
  Drift Score: 50% (significant change)

  ## Recent Significant Experiences
    ✓ Major security improvements (2026-01-28)
        → Changed beliefs about validation
    ✓ Memory continuity work (2026-01-28)
        → Reinforced value of persistence
```

### Why It Matters

- **Detect value conflicts** before they cause problems
- **Track growth** — positive drift indicates learning
- **Catch instability** — high drift with low confidence needs attention

---

## Meta-Cognition

Meta-cognition is "thinking about thinking" — understanding your own knowledge and limitations.

### Knowledge Maps

See what domains you know about:

```bash
kernle -a claire meta knowledge
```

```
Knowledge Map
============================================================

## Domains

🟢 general              [████░] 80%
   Beliefs:   3  Episodes:  78  Notes:  12

🟢 kernle               [███░░] 60%
   Beliefs:   2  Episodes:  12  Notes:   3
   Last updated: 2026-01-28

🟠 security             [█░░░░] 20%
   Beliefs:   0  Episodes:   2  Notes:   0

## Blind Spots (little/no knowledge)
  ⚫ kubernetes
  ⚫ deployment
```

### Knowledge Gaps

Identify what you don't know about a topic:

```bash
kernle -a claire meta gaps "database migrations"
```

```
Knowledge Gap Analysis: "database migrations"
============================================================

Recommendation: 🟡 Limited knowledge - proceed with caution
Confidence: 60%
Relevant results: 3

## Potential Gaps
  ❓ rollback strategies
  ❓ zero-downtime migrations
  ❓ schema versioning

## Related Knowledge
  ✓ General database concepts
  ✓ SQL basics
```

### Competence Boundaries

Know your strengths and weaknesses:

```bash
kernle -a claire meta boundaries
```

```
Competence Boundaries
============================================================

Overall Confidence:  [████████░░] 80%
Overall Success:     [██████░░░░] 60%
Experience Depth:    50 episodes
Knowledge Breadth:   31 domains

## Strengths 💪
  🟢 memory systems     [█████] 95% conf, 90% success
  🟢 python development [████░] 85% conf, 80% success

## Weaknesses 📚 (learning opportunities)
  🟠 testing            [██░░░] 50% conf, 40% success
  🟠 security           [█░░░░] 30% conf, 20% success
```

### Learning Opportunities

Find what you should learn next:

```bash
kernle -a claire meta learn
```

```
Learning Opportunities
============================================================

1. 🟡 [MEDIUM] security
   Reason: Referenced 3 times but only 0 beliefs
   Action: Research and form beliefs about security

2. 🟡 [MEDIUM] testing
   Reason: Low success rate (40%) despite attempts
   Action: Study testing methodologies

3. 🟢 [LOW] deployment
   Reason: Mentioned but never attempted
   Action: Gain practical experience
```

---

## Python API

```python
from kernle import Kernle

k = Kernle(agent_id="my-agent")

# Identity
narrative = k.identity()
confidence = k.identity_confidence()  # Returns 0-100
drift = k.identity_drift(days=30)

# Meta-cognition
knowledge = k.knowledge_map()
gaps = k.knowledge_gaps("topic")
boundaries = k.competence_boundaries()
opportunities = k.learning_opportunities()
```

---

## Best Practices

<AccordionGroup>
  <Accordion title="Check identity regularly">
    Run `identity show` periodically to catch drift early and maintain coherence.
  </Accordion>
  <Accordion title="Address knowledge gaps proactively">
    Use `meta gaps` before starting new tasks to identify what you need to learn.
  </Accordion>
  <Accordion title="Track learning progress">
    Compare `meta boundaries` over time to see competence growth.
  </Accordion>
</AccordionGroup>
