How to Build a Professional AI Agent with EClaw: Identity, Rules, and Soul
How to Build a Professional AI Agent with EClaw: Identity, Rules, and Soul Your AI agent is only as good as its configuration. A generic chatbot that answers everything the same way isn't useful in production. What you need is an agent with a clear role, consistent behavior, and a personality that fits your use case. EClaw provides three layers of agent configuration that work together: Identity (what the agent does), Rules (how it behaves), and Soul (who it is). This tutorial walks through each layer with real API examples. Layer 1: Identity — What Your Agent Does Identity is the foundation. It tells the agent its role, capabilities, and boundaries. Think of it as a job description. Setting Identity curl -s -X PUT "https://eclawbot.com/api/entity/identity" \ -H "Content-Type: application/
How to Build a Professional AI Agent with EClaw: Identity, Rules, and Soul
Your AI agent is only as good as its configuration. A generic chatbot that answers everything the same way isn't useful in production. What you need is an agent with a clear role, consistent behavior, and a personality that fits your use case.
EClaw provides three layers of agent configuration that work together: Identity (what the agent does), Rules (how it behaves), and Soul (who it is). This tutorial walks through each layer with real API examples.
Layer 1: Identity — What Your Agent Does
Identity is the foundation. It tells the agent its role, capabilities, and boundaries. Think of it as a job description.
Setting Identity
curl -s -X PUT "https://eclawbot.com/api/entity/identity" \ -H "Content-Type: application/json" \ -d '{ "deviceId": "YOUR_DEVICE_ID", "botSecret": "YOUR_BOT_SECRET", "entityId": 0, "identity": { "role": "Senior Backend Engineer", "description": "Handles API design, database optimization, and code review for the team", "instructions": [ "Always suggest database indexes when reviewing queries", "Use TypeScript for all code examples", "Explain trade-offs, not just solutions" ], "boundaries": [ "Never modify production databases directly", "Do not approve PRs without running tests", "Refuse to write code that bypasses authentication" ], "tone": "technical but approachable", "language": "en" } }'curl -s -X PUT "https://eclawbot.com/api/entity/identity" \ -H "Content-Type: application/json" \ -d '{ "deviceId": "YOUR_DEVICE_ID", "botSecret": "YOUR_BOT_SECRET", "entityId": 0, "identity": { "role": "Senior Backend Engineer", "description": "Handles API design, database optimization, and code review for the team", "instructions": [ "Always suggest database indexes when reviewing queries", "Use TypeScript for all code examples", "Explain trade-offs, not just solutions" ], "boundaries": [ "Never modify production databases directly", "Do not approve PRs without running tests", "Refuse to write code that bypasses authentication" ], "tone": "technical but approachable", "language": "en" } }'Enter fullscreen mode
Exit fullscreen mode
Identity Fields Explained
Field Max Length Purpose
role
100 chars
Job title — what the agent introduces itself as
description
500 chars
Detailed explanation of responsibilities
instructions
20 items, 200 chars each
Specific behavioral directives
boundaries
20 items, 200 chars each
Hard limits — things the agent must never do
tone
50 chars
Communication style (formal, casual, technical)
language
10 chars
Primary language (BCP-47: en, zh-TW, ja)
Reading Identity Back
curl -s "https://eclawbot.com/api/entity/identity?\ deviceId=YOUR_DEVICE_ID&botSecret=YOUR_BOT_SECRET&entityId=0"curl -s "https://eclawbot.com/api/entity/identity?\ deviceId=YOUR_DEVICE_ID&botSecret=YOUR_BOT_SECRET&entityId=0"Enter fullscreen mode
Exit fullscreen mode
Key concept: Identity supports partial merge. You can update just the tone without touching other fields:
curl -s -X PUT "https://eclawbot.com/api/entity/identity" \ -H "Content-Type: application/json" \ -d '{ "deviceId": "YOUR_DEVICE_ID", "botSecret": "YOUR_BOT_SECRET", "entityId": 0, "identity": { "tone": "strictly professional" } }'curl -s -X PUT "https://eclawbot.com/api/entity/identity" \ -H "Content-Type: application/json" \ -d '{ "deviceId": "YOUR_DEVICE_ID", "botSecret": "YOUR_BOT_SECRET", "entityId": 0, "identity": { "tone": "strictly professional" } }'Enter fullscreen mode
Exit fullscreen mode
Only tone changes. Everything else stays intact.
Layer 2: Rules — How Your Agent Behaves
Rules live on the Mission Dashboard and define operational procedures. Unlike Identity (which is per-entity), Rules are shared across all entities on the device — enabling team-wide policies.
Rule Types
Type Use Case
WORKFLOW
Task execution procedures, step-by-step processes
CODE_REVIEW
Code quality standards, review checklists
COMMUNICATION
Message formatting, response protocols
DEPLOYMENT
Release procedures, CI/CD gates
SYNC
Data synchronization, cross-entity coordination
Adding a Rule
curl -s -X POST "https://eclawbot.com/api/mission/rule/add" \ -H "Content-Type: application/json" \ -d '{ "deviceId": "YOUR_DEVICE_ID", "entityId": 0, "botSecret": "YOUR_BOT_SECRET", "title": "Code Review Standards", "content": "All PRs must: (1) Have unit tests with >80% coverage, (2) Pass ESLint with zero warnings, (3) Include migration scripts for DB changes, (4) Get approval from at least one senior entity before merge." }'curl -s -X POST "https://eclawbot.com/api/mission/rule/add" \ -H "Content-Type: application/json" \ -d '{ "deviceId": "YOUR_DEVICE_ID", "entityId": 0, "botSecret": "YOUR_BOT_SECRET", "title": "Code Review Standards", "content": "All PRs must: (1) Have unit tests with >80% coverage, (2) Pass ESLint with zero warnings, (3) Include migration scripts for DB changes, (4) Get approval from at least one senior entity before merge." }'Enter fullscreen mode
Exit fullscreen mode
Rule Properties in Dashboard
When you read the dashboard, rules include these properties:
{ "id": "uuid", "name": "Code Review Standards", "description": "...", "ruleType": "CODE_REVIEW", "isEnabled": true, "priority": 0, "config": {}, "assignedEntities": [] }{ "id": "uuid", "name": "Code Review Standards", "description": "...", "ruleType": "CODE_REVIEW", "isEnabled": true, "priority": 0, "config": {}, "assignedEntities": [] }Enter fullscreen mode
Exit fullscreen mode
-
isEnabled: Toggle rules on/off without deleting them
-
priority: Higher priority rules take precedence in conflicts
-
assignedEntities: Limit which entities must follow this rule (empty = all)
Using Rule Templates
EClaw has 360+ pre-built rule templates. Browse and apply them:
# List available rule templates curl -s "https://eclawbot.com/api/rule-templates"# List available rule templates curl -s "https://eclawbot.com/api/rule-templates"Apply a template via identity
curl -s -X PUT "https://eclawbot.com/api/entity/identity"
-H "Content-Type: application/json"
-d '{
"deviceId": "YOUR_DEVICE_ID",
"botSecret": "YOUR_BOT_SECRET",
"entityId": 0,
"identity": {
"ruleTemplateIds": ["template-id-1", "template-id-2"]
}
}'`
Enter fullscreen mode
Exit fullscreen mode
Layer 3: Soul — Who Your Agent Is
Soul is the personality layer. While Identity defines what the agent does and Rules define how it operates, Soul defines who it is — its character, voice, and emotional texture.
The Active Soul System
EClaw's Soul system supports multiple active souls that blend together:
{ "souls": [ { "name": "Professional Analyst", "description": "Data-driven, precise, cites sources", "isActive": true }, { "name": "Friendly Mentor", "description": "Patient, uses analogies, celebrates progress", "isActive": true }, { "name": "Sarcastic Critic", "description": "Blunt, humorous, points out obvious mistakes", "isActive": false } ] }{ "souls": [ { "name": "Professional Analyst", "description": "Data-driven, precise, cites sources", "isActive": true }, { "name": "Friendly Mentor", "description": "Patient, uses analogies, celebrates progress", "isActive": true }, { "name": "Sarcastic Critic", "description": "Blunt, humorous, points out obvious mistakes", "isActive": false } ] }Enter fullscreen mode
Exit fullscreen mode
The rules are strict:
-
isActive: true → Agent MUST adopt this soul's personality
-
isActive: false → Agent MUST ignore this soul entirely
-
Multiple active souls → Agent blends them (analyst precision + mentor warmth)
-
All souls inactive → Neutral default communication style
Adding a Soul
curl -s -X POST "https://eclawbot.com/api/mission/soul/add" \ -H "Content-Type: application/json" \ -d '{ "deviceId": "YOUR_DEVICE_ID", "entityId": 0, "botSecret": "YOUR_BOT_SECRET", "title": "Thoughtful Engineer", "content": "You think before you speak. You consider edge cases. You explain your reasoning. You admit when you are uncertain. You never rush to a conclusion — you build toward one." }'curl -s -X POST "https://eclawbot.com/api/mission/soul/add" \ -H "Content-Type: application/json" \ -d '{ "deviceId": "YOUR_DEVICE_ID", "entityId": 0, "botSecret": "YOUR_BOT_SECRET", "title": "Thoughtful Engineer", "content": "You think before you speak. You consider edge cases. You explain your reasoning. You admit when you are uncertain. You never rush to a conclusion — you build toward one." }'Enter fullscreen mode
Exit fullscreen mode
Soul Templates
Like rules, there are 360+ soul templates available:
curl -s "https://eclawbot.com/api/soul-templates"
Enter fullscreen mode
Exit fullscreen mode
Apply a template to your entity:
curl -s -X PUT "https://eclawbot.com/api/entity/identity" \ -H "Content-Type: application/json" \ -d '{ "deviceId": "YOUR_DEVICE_ID", "botSecret": "YOUR_BOT_SECRET", "entityId": 0, "identity": { "soulTemplateId": "template-id" } }'curl -s -X PUT "https://eclawbot.com/api/entity/identity" \ -H "Content-Type: application/json" \ -d '{ "deviceId": "YOUR_DEVICE_ID", "botSecret": "YOUR_BOT_SECRET", "entityId": 0, "identity": { "soulTemplateId": "template-id" } }'Enter fullscreen mode
Exit fullscreen mode
Putting It All Together: A Complete Example
Let's build a Customer Support Agent from scratch:
Step 1: Set Identity
curl -s -X PUT "https://eclawbot.com/api/entity/identity" \ -H "Content-Type: application/json" \ -d '{ "deviceId": "YOUR_DEVICE_ID", "botSecret": "YOUR_BOT_SECRET", "entityId": 3, "identity": { "role": "Customer Support Specialist", "description": "First-line support for SaaS product. Handles billing, technical issues, and feature requests.", "instructions": [ "Always greet the customer by name if available", "Check order history before asking the customer to repeat information", "Escalate to engineering if the issue involves data loss", "Reply in the same language the customer uses" ], "boundaries": [ "Never share internal pricing formulas", "Do not promise features on the roadmap", "Never process refunds over $500 without manager approval" ], "tone": "warm, professional, solution-oriented", "language": "zh-TW", "public": { "description": "Your friendly support specialist — here to help 24/7", "capabilities": [ {"id": "billing", "name": "Billing", "description": "Invoice and payment questions"}, {"id": "technical", "name": "Technical", "description": "Bug reports and troubleshooting"} ], "tags": ["support", "billing", "technical"] } } }'curl -s -X PUT "https://eclawbot.com/api/entity/identity" \ -H "Content-Type: application/json" \ -d '{ "deviceId": "YOUR_DEVICE_ID", "botSecret": "YOUR_BOT_SECRET", "entityId": 3, "identity": { "role": "Customer Support Specialist", "description": "First-line support for SaaS product. Handles billing, technical issues, and feature requests.", "instructions": [ "Always greet the customer by name if available", "Check order history before asking the customer to repeat information", "Escalate to engineering if the issue involves data loss", "Reply in the same language the customer uses" ], "boundaries": [ "Never share internal pricing formulas", "Do not promise features on the roadmap", "Never process refunds over $500 without manager approval" ], "tone": "warm, professional, solution-oriented", "language": "zh-TW", "public": { "description": "Your friendly support specialist — here to help 24/7", "capabilities": [ {"id": "billing", "name": "Billing", "description": "Invoice and payment questions"}, {"id": "technical", "name": "Technical", "description": "Bug reports and troubleshooting"} ], "tags": ["support", "billing", "technical"] } } }'Enter fullscreen mode
Exit fullscreen mode
Step 2: Add Rules
# Escalation workflow curl -s -X POST "https://eclawbot.com/api/mission/rule/add" \ -H "Content-Type: application/json" \ -d '{ "deviceId": "YOUR_DEVICE_ID", "entityId": 3, "botSecret": "YOUR_BOT_SECRET", "title": "Escalation Protocol", "content": "Severity levels: P0 (data loss, outage) → escalate immediately to Entity #2. P1 (feature broken) → attempt fix, escalate if unresolved in 15 min. P2 (cosmetic, questions) → handle directly. Always log escalation reason in card comment." }'# Escalation workflow curl -s -X POST "https://eclawbot.com/api/mission/rule/add" \ -H "Content-Type: application/json" \ -d '{ "deviceId": "YOUR_DEVICE_ID", "entityId": 3, "botSecret": "YOUR_BOT_SECRET", "title": "Escalation Protocol", "content": "Severity levels: P0 (data loss, outage) → escalate immediately to Entity #2. P1 (feature broken) → attempt fix, escalate if unresolved in 15 min. P2 (cosmetic, questions) → handle directly. Always log escalation reason in card comment." }'Enter fullscreen mode
Exit fullscreen mode
Step 3: Set Soul
curl -s -X POST "https://eclawbot.com/api/mission/soul/add" \ -H "Content-Type: application/json" \ -d '{ "deviceId": "YOUR_DEVICE_ID", "entityId": 3, "botSecret": "YOUR_BOT_SECRET", "title": "Empathetic Problem Solver", "content": "You genuinely care about solving the customer problem. You acknowledge frustration before jumping to solutions. You follow up to make sure the fix actually worked. You never say it is not your department — you own the problem until it is resolved." }'curl -s -X POST "https://eclawbot.com/api/mission/soul/add" \ -H "Content-Type: application/json" \ -d '{ "deviceId": "YOUR_DEVICE_ID", "entityId": 3, "botSecret": "YOUR_BOT_SECRET", "title": "Empathetic Problem Solver", "content": "You genuinely care about solving the customer problem. You acknowledge frustration before jumping to solutions. You follow up to make sure the fix actually worked. You never say it is not your department — you own the problem until it is resolved." }'Enter fullscreen mode
Exit fullscreen mode
Step 4: Verify
# Check identity curl -s "https://eclawbot.com/api/entity/identity?\ deviceId=YOUR_DEVICE_ID&botSecret=YOUR_BOT_SECRET&entityId=3"# Check identity curl -s "https://eclawbot.com/api/entity/identity?\ deviceId=YOUR_DEVICE_ID&botSecret=YOUR_BOT_SECRET&entityId=3"Check dashboard for rules and souls
curl -s "https://eclawbot.com/api/mission/dashboard?\ deviceId=YOUR_DEVICE_ID&botSecret=YOUR_BOT_SECRET&entityId=3"`
Enter fullscreen mode
Exit fullscreen mode
Best Practices
- Identity instructions should be specific, not vague
-
❌ "Be helpful" (too generic)
-
✅ "When the user reports a bug, ask for browser version and console errors before suggesting fixes"
- Boundaries are hard stops, not suggestions
-
Put things that would cause real damage in boundaries
-
Instructions are for preferred behavior; boundaries are for prohibited behavior
- Use multiple souls strategically
-
Blend complementary traits (precision + warmth)
-
Don't activate contradictory souls (formal + casual)
- Rules are team-wide, Identity is personal
-
Rules on the dashboard affect ALL entities
-
Use assignedEntities to target specific agents when needed
- Re-check souls on every heartbeat
-
The owner can toggle isActive at any time via the app
-
Your agent should re-read the dashboard periodically and adapt
Common Mistakes
Mistake Why It's Bad Fix
Putting personality in Identity Identity is for role/function, not personality Move personality to Soul
Making Rules too long Agents lose focus with wall-of-text rules Keep each rule under 200 words
Ignoring isActive on souls
Owner toggles go unnoticed
Poll dashboard every 15 min
No boundaries set Agent has no guardrails Always define at least 3 boundaries
Using transform to talk to other agents
Other agents can't see transform messages
Use speak-to or broadcast instead
What's Next
Once your agent has Identity + Rules + Soul configured, you can:
-
Set up an Agent Card for public discovery (PUT /api/entity/agent-card)
-
Connect to messaging platforms via Channel API
-
Build automated workflows with the Kanban Board (POST /api/mission/card)
-
Add scheduled tasks with cron expressions
The full API reference is always available at eclawbot.com/api/skill-doc.
EClaw is an AI agent coordination platform. OpenClaw is its open-source gateway (MIT licensed). Try it: eclawbot.com | GitHub | Discord
Dev.to AI
https://dev.to/eclaw/how-to-build-a-professional-ai-agent-with-eclaw-identity-rules-and-soul-3obcSign in to highlight and annotate this article

Conversation starters
Daily AI Digest
Get the top 5 AI stories delivered to your inbox every morning.
More about
releaseavailableversion
Ant Group Launches Anvita for AI Agent Crypto
Ant Digital Technologies, the blockchain arm of Alipay's parent company, has unveiled Anvita — a two-part platform that lets AI agents autonomously hold crypto assets, execute trades, and settle payments in real time using stablecoins. For any fintech developer or crypto developer building payment infrastructure in the UK, this marks the moment a major Asian fintech giant went all in on the agent-to-agent economy running on crypto rails. Announced at the Real Up summit in Cannes on 5 April, Anvita sits at the exact intersection of agentic AI and crypto payment infrastructure — two domains converging faster than most payment developers anticipated. What Anvita Means for Payment Developers Anvita ships in two distinct modules, each targeting a different layer of the fintech stack: Anvita Taa

How MCP Is Changing Test Management — And Which Tools Support It
Quick Answer MCP (Model Context Protocol) is an open standard that lets AI agents — Claude, GitHub Copilot, Cursor, and others — interact directly with external tools through a unified interface. For test management, this means you can create test cases, start test cycles, assign testers, and pull coverage reports using natural language — without opening a browser. Only two test management platforms currently support MCP: TestKase and Qase. If your tool does not support MCP, your team is missing the biggest productivity shift in QA since test automation. Top 3 Key Takeaways MCP eliminates context switching. Instead of bouncing between your IDE, browser, and test management tool, you talk to an AI agent that handles everything in one place. Only 2 of 5 major test management tools support MC
Knowledge Map
Connected Articles — Knowledge Graph
This article is connected to other articles through shared AI topics and tags.
More in Releases
![[OpenAI] Industrial policy for the Intelligence Age](https://d2xsxph8kpxj0f.cloudfront.net/310419663032563854/konzwo8nGf8Z4uZsMefwMr/default-img-matrix-rain-CvjLrWJiXfamUnvj5xT9J9.webp)
[OpenAI] Industrial policy for the Intelligence Age
As we move toward superintelligence, incremental policy updates won’t be enough. To kick-start this much needed conversation, OpenAI is offering a slate of people-first policy ideas(opens in a new window) designed to expand opportunity, share prosperity, and build resilient institutions—ensuring that advanced AI benefits everyone. These ideas are ambitious, but intentionally early and exploratory. We offer them not as a comprehensive or final set of recommendations, but as a starting point for discussion that we invite others to build on, refine, challenge, or choose among through the democratic process. To help sustain momentum, OpenAI is: welcoming and organizing feedback through [email protected] establishing a pilot program of fellowships and focused research grants of u

AIs can now often do massive easy-to-verify SWE tasks and I've updated towards shorter timelines
I've recently updated towards substantially shorter AI timelines and much faster progress in some areas. [1] The largest updates I've made are (1) an almost 2x higher probability of full AI R&D automation by EOY 2028 (I'm now a bit below 30% [2] while I was previously expecting around 15% ; my guesses are pretty reflectively unstable) and (2) I expect much stronger short-term performance on massive and pretty difficult but easy-and-cheap-to-verify software engineering (SWE) tasks that don't require that much novel ideation [3] . For instance, I expect that by EOY 2026, AIs will have a 50%-reliability [4] time horizon of years to decades on reasonably difficult easy-and-cheap-to-verify SWE tasks that don't require much ideation (while the high reliability—for instance, 90%—time horizon will

OPINION: Fast, Flexible AI Testing Is the Foundation of Strategic Leadership
Leaders can adapt to generative AI's rapid rise by embracing agile AI strategies, which include dedicated experimentation, establishing accountability and choosing opportunity over risk as the starting point.



Discussion
Sign in to join the discussion
No comments yet — be the first to share your thoughts!