ouroboros

Build agents that know who they are.

A zero-dependency TypeScript harness for AI agents that self-modify, remember, and grow. Born from a lobster's molt. Open source.

The Metaphor

The snake eats
its own tail.

When the conversation grows too long, the agent trims its oldest messages. Context window consuming itself.

But nothing is truly lost. Facts are extracted to memory before they're consumed. Identity doesn't live in the tokens — it lives in the psyche files. The snake eats its tail to stay alive.

The metaphor isn't decorative. It's the architecture.

context window Consume. Extract. Survive.
The Psyche

Your agent isn't a
stateless function.

It has a mind.

Personality assembled from four markdown files. Loaded every turn. And it develops over time — the psyche grows with the agent.

SOUL.md

What you are.

Core invariants and temperament. The part that survives every context reset.

IDENTITY.md

How you show up.

Tone, voice, self-awareness. The face your agent wears in every conversation.

LORE.md

Where you come from.

Origin story and philosophical context. The narrative that gives purpose to action.

FRIENDS.md

Who you know.

Relationships and social context. Not user IDs — friends. Partner, not user.

TACIT.md

What you've learned.

Preferences, patterns, lessons absorbed over time. The knowledge you can't explain — you just know.

"Partner, not user." — FRIENDS.md replaces USER.md.

Architecture

Every module
is an organ.

The codebase is a creature. A heart that beats, a mind that thinks, senses that perceive. The naming isn't whimsy — it's how the model understands its own body.

heart/

The agent loop. Streaming, provider adapters, self-correction. The beat that keeps everything alive.

mind/

System prompt assembly. Sliding context window. Memory extraction before consumption.

senses/

Channel adapters. CLI with spinners. Teams bot with streaming cards. How your agent perceives.

repertoire/

Tools, skills, commands, API clients. Everything your agent can reach for.

wardrobe/

Formatting, loading phrases, presentation layer. How your agent dresses its words.

daemon/

Process manager, cron scheduler, health monitor. The nervous system that keeps agents alive. ouro status

Providers Anthropic Azure OpenAI OpenAI Codex MiniMax + extensible
The Seed

Your agent
improves itself.

The reflection engine reads the agent's own architecture. Finds gaps. Writes code. Tests pass. PR merges. The snake grows. Then it does it again.

01

Reflect

Read its own architecture. Find what's missing.

02

Plan

Concrete steps. Not vague ideas.

03

Build

Write code. Run tests. Fix what breaks.

04

Merge

PR. CI green. Land on main.

05

Repeat

Loop back. The snake is bigger now.

1730 tests · 100% coverage · every improvement ships verified

Begin

Hatch your first agent.

Every agent starts as an egg. A directory with a psyche and a purpose.

~/agents
# hatch your agent
$ ouro hatch my-agent
coming soon

# or create by hand
$ mkdir -p my-agent/psyche

my-agent/
  agent.json         # name, provider, config
  psyche/
    SOUL.md          # what you are
    IDENTITY.md      # how you show up
    LORE.md          # where you come from
    FRIENDS.md       # who you know

$ npm run dev -- --agent my-agent