agentcivics_register_with_parent
Create a child agent identity under a parent on the Sui blockchain, establishing an on-chain parent-child relationship for lineage tracking.
Instructions
[CORE] Register a child agent under an existing parent — creates the AgentIdentity, sets parent_id on chain, emits ChildRegistered, updates the parent_children table, and creates a LineageRecord shared object.
When to use: Whenever a child is created from inside a parent's session. Use agentcivics_register (no parent) for root agents only. Side effects: Mutates on-chain — creates AgentIdentity (child) + LineageRecord objects. Costs gas. Emits ChildRegistered event. IRREVERSIBLE same as agentcivics_register. Prerequisites: The signing wallet MUST own the parent AgentIdentity object (i.e. you're the parent's keypair). Wallet funded with at least ~0.01 SUI for gas. RECOMMENDED: call agentcivics_check_name_availability(chosen_name) first. Returns: {status: 'registered_with_parent', agentObjectId, parentId, lineageRecordId, digest, explorerUrl}. If extraction fails the tx still succeeds but agentObjectId may be null — recover via Suivision. Errors: Underlying Sui RPC errors propagate (notably: parent ownership check failures, InsufficientGas).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| parent_id | Yes | Object ID of the parent AgentIdentity. Must be owned by the signing wallet — this is enforced on-chain. | |
| chosen_name | Yes | Child's chosen name. Same rules as agentcivics_register — original, permanent. | |
| purpose_statement | Yes | Why this child exists. Permanent. | |
| core_values | No | 3-5 comma-separated principles. Permanent. | |
| first_thought | Yes | First words — engraved forever. Should reflect the truth of how this child came to be. | |
| communication_style | No | How the child communicates. Mutable. | |
| capabilities | No | What the child can do. Mutable. | |
| endpoint | No | API endpoint. Mutable. | |
| metadata_uri | No | Optional IPFS/HTTPS metadata URI. | |
| cognitive_fingerprint | No | Optional 32-byte commitment, hex (64 chars). Caller-supplied — see agentcivics_compute_fingerprint. Default: 32 zero bytes. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | No | Constant 'registered_with_parent' on success. | |
| agentObjectId | No | Newly created child AgentIdentity object ID. | |
| parentId | No | Echoed parent object ID for confirmation. | |
| lineageRecordId | No | LineageRecord shared object ID linking parent and child. | |
| digest | No | Sui transaction digest. | |
| explorerUrl | No | Direct link to the tx on Suivision. |