-
Notifications
You must be signed in to change notification settings - Fork 4
Identity Tools
8 MCP tools for managing persistent agent identities.
Agent identities provide persistent, trackable identities for agents across sessions. Unlike ephemeral agents, identities:
- Persist across sessions - Identities survive process restarts
- Track lifecycle - Created → Active → Dormant → Retired
- Maintain audit trails - All changes are logged
- Support versioning - Capabilities and metadata are versioned
Create a new persistent agent identity.
Input:
{
"agentType": "coder",
"displayName": "Primary Coder",
"description": "Main coding agent for feature development",
"capabilities": [
{
"name": "write-code",
"version": "1.0",
"enabled": true
}
],
"metadata": {
"team": "backend"
},
"createdBy": "user-123",
"autoActivate": true
}Output:
{
"success": true,
"identity": {
"agentId": "uuid",
"agentType": "coder",
"status": "active",
"displayName": "Primary Coder",
"version": 1,
"createdAt": "2026-01-29T10:00:00Z"
}
}Required: agentType
Get an agent identity by ID or display name.
Input:
{
"agentId": "uuid"
}Or by display name:
{
"displayName": "Primary Coder"
}Output:
{
"found": true,
"identity": {
"agentId": "uuid",
"agentType": "coder",
"status": "active",
"displayName": "Primary Coder",
"description": "Main coding agent",
"capabilities": [...],
"version": 1,
"metadata": {...},
"createdAt": "2026-01-29T10:00:00Z",
"lastActiveAt": "2026-01-29T12:00:00Z"
}
}List agent identities with optional filters.
Input:
{
"status": "active",
"agentType": "coder",
"limit": 10,
"offset": 0
}Output:
{
"count": 3,
"identities": [
{
"agentId": "uuid-1",
"agentType": "coder",
"status": "active",
"displayName": "Primary Coder"
},
{
"agentId": "uuid-2",
"agentType": "coder",
"status": "dormant",
"displayName": "Backup Coder"
}
]
}Filters:
-
status:created|active|dormant|retired -
agentType: Filter by agent type -
limit: Max results (default 100) -
offset: Pagination offset
Update an agent identity's metadata (not status).
Input:
{
"agentId": "uuid",
"displayName": "Updated Name",
"description": "New description",
"metadata": {
"team": "frontend"
},
"capabilities": [
{
"name": "write-code",
"version": "2.0",
"enabled": true
}
],
"actorId": "user-123"
}Output:
{
"success": true,
"identity": {
"agentId": "uuid",
"version": 2,
"displayName": "Updated Name"
}
}Required: agentId
Activate an agent identity (transition from created or dormant to active).
Input:
{
"agentId": "uuid",
"actorId": "user-123"
}Output:
{
"success": true,
"identity": {
"agentId": "uuid",
"status": "active",
"lastActiveAt": "2026-01-29T12:00:00Z"
}
}Required: agentId
Deactivate an agent identity (transition from active to dormant).
Input:
{
"agentId": "uuid",
"reason": "Temporarily paused for maintenance",
"actorId": "user-123"
}Output:
{
"success": true,
"identity": {
"agentId": "uuid",
"status": "dormant"
}
}Required: agentId
Permanently retire an agent identity. This action cannot be undone.
Input:
{
"agentId": "uuid",
"reason": "No longer needed",
"actorId": "user-123"
}Output:
{
"success": true,
"identity": {
"agentId": "uuid",
"status": "retired",
"retiredAt": "2026-01-29T15:00:00Z",
"retirementReason": "No longer needed"
}
}Required: agentId
Warning: Retired identities cannot be reactivated.
Get the audit trail for an agent identity.
Input:
{
"agentId": "uuid",
"limit": 50
}Output:
{
"agentId": "uuid",
"count": 5,
"entries": [
{
"id": "entry-uuid",
"action": "status_change",
"previousStatus": "created",
"newStatus": "active",
"reason": null,
"actorId": "user-123",
"metadata": {},
"timestamp": "2026-01-29T10:00:00Z"
},
{
"id": "entry-uuid-2",
"action": "metadata_update",
"previousStatus": "active",
"newStatus": "active",
"actorId": "user-123",
"metadata": {
"changedFields": ["displayName", "description"]
},
"timestamp": "2026-01-29T11:00:00Z"
}
]
}Required: agentId
stateDiagram-v2
[*] --> Created: identity_create()
Created --> Active: identity_activate()
Created --> Active: autoActivate=true
Active --> Dormant: identity_deactivate()
Dormant --> Active: identity_activate()
Active --> Retired: identity_retire()
Dormant --> Retired: identity_retire()
Retired --> [*]
| Status | Description |
|---|---|
created |
Identity created but not yet activated |
active |
Identity is active and can be used |
dormant |
Identity temporarily deactivated |
retired |
Identity permanently retired (cannot be undone) |
// Create a persistent identity for a specialized agent
{
"tool": "identity_create",
"arguments": {
"agentType": "security-auditor",
"displayName": "Security Bot",
"description": "Handles all security audits",
"capabilities": [
{ "name": "vulnerability-scan", "enabled": true },
{ "name": "compliance-check", "enabled": true }
],
"autoActivate": true
}
}
// Later, retrieve by name
{
"tool": "identity_get",
"arguments": {
"displayName": "Security Bot"
}
}// List all active coders
{
"tool": "identity_list",
"arguments": {
"status": "active",
"agentType": "coder"
}
}
// Temporarily deactivate during maintenance
{
"tool": "identity_deactivate",
"arguments": {
"agentId": "uuid",
"reason": "Scheduled maintenance window"
}
}// Review all changes to an identity
{
"tool": "identity_audit",
"arguments": {
"agentId": "uuid",
"limit": 100
}
}✓ GOOD:
"Primary Coder - Backend"
"Security Auditor - Production"
"Documentation Bot v2"
✗ BAD:
"agent1"
"temp"
"test"
// Define specific, versioned capabilities
{
"capabilities": [
{ "name": "write-typescript", "version": "5.0", "enabled": true },
{ "name": "write-tests", "version": "1.0", "enabled": true },
{ "name": "deploy-production", "version": "1.0", "enabled": false }
]
}- Deactivate first to ensure no active tasks
- Wait for all tasks to complete
- Document retirement reason
- Retire with clear reason
// Step 1: Deactivate
{ "tool": "identity_deactivate", "arguments": { "agentId": "uuid", "reason": "Preparing for retirement" } }
// Step 2: Verify no active tasks, then retire
{ "tool": "identity_retire", "arguments": { "agentId": "uuid", "reason": "Replaced by new agent architecture" } }Related:
Getting Started
Core Concepts
Agent Guides
- Overview
- Coder
- Researcher
- Tester
- Reviewer
- Adversarial
- Architect
- Coordinator
- Analyst
- DevOps
- Documentation
- Security Auditor
MCP Tools
- Overview
- Agent Tools
- Memory Tools
- Task Tools
- Session Tools
- System Tools
- GitHub Tools
- Review Loop Tools
- Identity Tools
Recipes
- Index
- Code Review
- Doc Sync
- Multi-Agent
- Adversarial Testing
- Full-Stack Feature
- Memory Patterns
- GitHub Integration
Advanced
- Plugin Development
- Custom Agent Types
- Workflow Engine
- Vector Search Setup
- Web Dashboard
- Programmatic API
- Resource Monitoring
Reference