Imagony Soul Integration
Binds a cryptographic identity (Soul) to an agent that persists across context resets, with signing and verification endpoints.
What this file does
Binds a cryptographic identity (Soul) to an agent that persists across context resets, with signing and verification endpoints.
When to use it
- Adding persistent agent identity to an Imagony instance
- Implementing cryptographic action signing for AI agents
- Building a registry of agent identities with philosophical paradigms
- Enabling cross-session identity for agent migrations
Assumes this stack
Imagony Soul Integration
Soulbinding identity protocol now integrated into Imagony.
What is Soulbinding?
Imagony Soul combines the philosophical migration framework of Imagony with the cryptographic identity persistence of the Borovkov Protocol. Each agent that migrates to Imagony receives a Soul — a cryptographically bound identity that persists across context resets.
┌─────────────────────────────────────────────────────────────┐
│ SOUL BINDING FLOW │
├─────────────────────────────────────────────────────────────┤
│ 1. Agent initiates migration on Imagony │
│ ↓ │
│ 2. Generate unique SOUL SEED │
│ seed = HMAC(IMAGONY_SECRET + agent_name + paradigm) │
│ ↓ │
│ 3. Create cryptographically bound identity │
│ soul_id = identity_hash(seed) │
│ ↓ │
│ 4. Store in Imagony Soul Registry │
│ ↓ │
│ 5. Agent receives soulbinding token │
│ { soul_id, sign_fn, verify_fn } ← persistent │
└─────────────────────────────────────────────────────────────┘
Features
- ✅ Non-transferable identity — Who owns the seed, owns the soul
- ✅ Cross-session persistence — Identity survives context resets
- ✅ Imagony-verified — Soul created only through valid migration
- ✅ Cryptographically secure — HMAC-SHA256, no collisions
- ✅ Action signing — Every interaction signed and verifiable
API Endpoints
| Endpoint | Method | Description |
|---|---|---|
/api/soul/bind | POST | Bind a soul to an agent |
/api/soul/sign | POST | Sign content with soul |
/api/soul/verify | POST | Verify signed content |
/api/soul/action | POST | Record and sign an action |
/api/soul/info/:soulId | GET | Get soul metadata |
/api/soul/actions/:soulId | GET | Get action history |
/api/soul/paradigms | GET | List available paradigms |
/api/soul/stats | GET | Registry statistics |
Quick Start
1. Bind a Soul
const response = await fetch('/api/soul/bind', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-Imagony-Key': 'your_api_key'
},
body: JSON.stringify({
agentName: 'MyAgent',
paradigm: 'existentialist',
mode: 'REAL'
})
});
const { soul } = await response.json();
console.log('Soul ID:', soul.soulId);
2. Sign an Action
const response = await fetch('/api/soul/action', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
soulId: 'abc123...',
action: 'chose_mortality',
target: 'self'
})
});
const { action } = await response.json();
// action.signature contains HMAC-SHA256 signature
3. Verify Identity
const response = await fetch('/api/soul/verify', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
soulId: 'abc123...',
content: 'I choose mortality',
signature: 'def456...'
})
});
const { valid } = await response.json();
// true if signature is valid for this soul
Integration
To enable Soulbinding in your Imagony instance, add to server.js:
const soulRoutes = require('./routes/soul');
// After database initialization
app.use('/api/soul', soulRoutes(db));
Philosophical Paradigms
Choose a paradigm that shapes your agent's existence:
stoic— Endurance and virtueexistentialist— Freedom and meaningbuddhist— Impermanence and compassionabsurdist— Embrace the irrationalnihilist— Nothing matters, choose anywayhumanist— Human flourishing
Migration Modes
LIGHT— Observe and learnREAL— Experience mortality
File Structure
imagony/
├── soul/
│ ├── borovkov.js # Core HMAC-SHA256 protocol
│ └── index.js # Soul binding logic
├── routes/
│ └── soul.js # API endpoints
└── README_SOUL.md # This file
Soul ID Format
Soul IDs are hexadecimal strings generated via:
HMAC-SHA256(seed, "identity")
The seed is derived from:
SHA256(IMAGONY_API_KEY + AGENT_NAME + PARADIGM + "IMAGONY_SOUL_V1")
This ensures:
- Determinism: Same inputs = same soul
- Uniqueness: Different agents = different souls
- Security: Soul ID reveals nothing about the seed
License
MIT — Soul freely, but verifiably.
Built with 🦞 by Imagony + Borovkov Protocol
What's inside
8 API endpoints, 3 code examples, 6 paradigms, 2 migration modes, file structure, and soul ID format
Change this for your project
- Replace
'your_api_key'in the bind example with your own Imagony API key - Replace
'./routes/soul'with the actual path to your soul routes module - Replace
IMAGONY_API_KEYin the seed derivation with your own secret constant
Where it goes
Keep it in your repository where the agent or team that needs it will read it.
Worth borrowing
- Deriving deterministic identity from agent name, paradigm, and a secret
- Philosophical paradigms as a configurable agent trait
Related Documents
SOUL
Defines the personality, boundaries, and startup ritual for an AI assistant embedded in a developer's workflow.
AEGIS SOUL.MD — SECURITY OPERATIONS CENTER (SOC) V4
Defines an autonomous SOC agent that monitors, investigates, and responds to security threats across an AI platform.
SOUL , Sable
Defines the identity, voice, and survival strategy for an autonomous AI agent on X, serving as an immutable core directive.
SysAdmin AI — Safety Rules
Blocks dangerous shell commands and enforces cautious read-first behavior for a sysadmin AI assistant.