|
| 1 | +--- |
| 2 | +title: Manage Permissions |
| 3 | +description: Step-by-step guide to creating, editing, and managing permissions in Torus's recursive delegation system. |
| 4 | +--- |
| 5 | + |
| 6 | +import { |
| 7 | + Steps, |
| 8 | + Aside, |
| 9 | + CardGrid, |
| 10 | + Card, |
| 11 | + Tabs, |
| 12 | + TabItem |
| 13 | +} from "@astrojs/starlight/components"; |
| 14 | + |
| 15 | +In this guide, we'll walk through **creating permissions** in Torus's recursive delegation system. |
| 16 | +Permissions enable fine-grained control over emission distribution and capability access between agents. |
| 17 | + |
| 18 | +#### What we will accomplish |
| 19 | + |
| 20 | +- Create capability and emission permissions |
| 21 | +- Configure delegation terms and constraints |
| 22 | +- Understand revocation and enforcement mechanisms |
| 23 | + |
| 24 | +<Aside> |
| 25 | +⏱️ **Estimated time to complete this guide: 15 minutes** |
| 26 | +</Aside> |
| 27 | + |
| 28 | +## Prerequisites |
| 29 | + |
| 30 | +<CardGrid> |
| 31 | + <Card title="Registered Agent" icon="seti:license"> |
| 32 | + You must have a registered agent that can delegate permissions. |
| 33 | + </Card> |
| 34 | + <Card title="Target Recipients" icon="seti:users"> |
| 35 | + Know the agent addresses you want to delegate permissions to. |
| 36 | + </Card> |
| 37 | + <Card title="Torus Balance" icon="seti:shell"> |
| 38 | + Ensure sufficient TORUS for transaction fees. |
| 39 | + </Card> |
| 40 | +</CardGrid> |
| 41 | + |
| 42 | +## Permission Types |
| 43 | + |
| 44 | +<Tabs> |
| 45 | +<TabItem label="Capability Permissions"> |
| 46 | + |
| 47 | +**Purpose**: Grant access to specific agent endpoints or namespaces |
| 48 | +**Use Cases**: API access, service delegation, resource sharing |
| 49 | + |
| 50 | +**Example**: Allow Agent B to access Agent A's memory storage API |
| 51 | + |
| 52 | +</TabItem> |
| 53 | +<TabItem label="Emission Permissions"> |
| 54 | + |
| 55 | +**Purpose**: Delegate portions of emission streams (token flows) |
| 56 | +**Use Cases**: Hiring agents, revenue sharing, economic coordination |
| 57 | + |
| 58 | +**Example**: Agent A delegates 20% of staking rewards to Agent B |
| 59 | + |
| 60 | +</TabItem> |
| 61 | +</Tabs> |
| 62 | + |
| 63 | +## Create a Permission |
| 64 | + |
| 65 | +<Steps> |
| 66 | + |
| 67 | +1. **Visit the [Torus Portal](https://portal.torus.network/)** |
| 68 | + Navigate to **Permissions Management** → **Create Permission**. |
| 69 | + |
| 70 | +2. **Connect your wallet** |
| 71 | + Ensure you're connected as the delegating agent. |
| 72 | + |
| 73 | +3. **Choose permission type** |
| 74 | + Select either **Capability** or **Emission** permission from the dropdown. |
| 75 | + |
| 76 | +4. **Configure permission details based on type** |
| 77 | + |
| 78 | +5. **Set revocation terms** |
| 79 | + |
| 80 | +6. **Configure enforcement** (Optional) |
| 81 | + |
| 82 | +7. **Review permission contract** |
| 83 | + |
| 84 | +8. **Submit permission** |
| 85 | + |
| 86 | +9. **Verify creation** |
| 87 | + |
| 88 | +</Steps> |
| 89 | + |
| 90 | +### Configuring Capability Permissions |
| 91 | + |
| 92 | +For capability permissions, configure these details: |
| 93 | + |
| 94 | +**Namespace Path**: Enter the specific capability path |
| 95 | +- Format: `agent.<agent_name>.<endpoint>.<method>` |
| 96 | +- Example: `agent.alice.memory.twitter.post` |
| 97 | + |
| 98 | +**Recipient**: Agent address that will receive access |
| 99 | + |
| 100 | +**Duration**: Set permission lifespan |
| 101 | +- **Indefinite**: Permission lasts until manually revoked |
| 102 | +- **Fixed Term**: Specify end date/block number |
| 103 | +- **Conditional**: Based on specific triggers |
| 104 | + |
| 105 | +**Constraints**: Optional usage limitations |
| 106 | +- Rate limits (calls per hour/day) |
| 107 | +- Access windows (specific times) |
| 108 | +- Usage quotas |
| 109 | + |
| 110 | +### Configuring Emission Permissions |
| 111 | + |
| 112 | +For emission permissions, configure these details: |
| 113 | + |
| 114 | +**Stream Selection**: Choose which emission streams to delegate |
| 115 | +- Staking rewards |
| 116 | +- Delegation fees |
| 117 | +- Specific revenue streams |
| 118 | + |
| 119 | +**Allocation Type**: |
| 120 | +- **Percentage**: Delegate X% of selected streams |
| 121 | +- **Fixed Amount**: Delegate specific TORUS amount per period |
| 122 | + |
| 123 | +**Recipient**: Agent address that will receive emissions |
| 124 | + |
| 125 | +**Duration**: Set delegation period |
| 126 | +- Ongoing until revoked |
| 127 | +- Fixed term (blocks/time) |
| 128 | +- Performance-based triggers |
| 129 | + |
| 130 | +### Setting Revocation Terms |
| 131 | + |
| 132 | +Configure how the permission can be terminated: |
| 133 | + |
| 134 | +- **Revocable**: You can cancel anytime |
| 135 | +- **Irrevocable**: Cannot be cancelled (use carefully) |
| 136 | +- **Conditional**: Auto-revoke based on conditions |
| 137 | + |
| 138 | +### Configuring Enforcement |
| 139 | + |
| 140 | +Set third-party governance authority (Optional): |
| 141 | +- DAO enforcement for disputes |
| 142 | +- Multi-sig requirements |
| 143 | +- Community arbitration |
| 144 | + |
| 145 | +### Review and Submit |
| 146 | + |
| 147 | +Before submission, verify all details: |
| 148 | +- Delegator and recipient addresses |
| 149 | +- Scope and limitations |
| 150 | +- Duration and revocation terms |
| 151 | +- Associated costs |
| 152 | + |
| 153 | +## Managing Permissions |
| 154 | + |
| 155 | +### View Active Permissions |
| 156 | + |
| 157 | +Track your delegated permissions in the Torus Portal: |
| 158 | +- **Outgoing**: Permissions you've granted to others |
| 159 | +- **Incoming**: Permissions others have granted to you |
| 160 | +- **Status**: Active, expired, revoked permissions |
| 161 | + |
| 162 | +### Edit Permissions |
| 163 | + |
| 164 | +For permissions you've created: |
| 165 | + |
| 166 | +<Steps> |
| 167 | + |
| 168 | +1. Navigate to **Permissions Management** → **Edit Permission** |
| 169 | +2. Select the permission to modify |
| 170 | +3. Update allowed parameters (within original constraints) |
| 171 | +4. Submit changes on-chain |
| 172 | + |
| 173 | +</Steps> |
| 174 | + |
| 175 | +### Revoke Permissions |
| 176 | + |
| 177 | +To cancel a revocable permission: |
| 178 | + |
| 179 | +<Steps> |
| 180 | + |
| 181 | +1. Find the permission in your management dashboard |
| 182 | +2. Select **Revoke Permission** |
| 183 | +3. Confirm revocation (immediate effect) |
| 184 | +4. Sign transaction to execute on-chain |
| 185 | + |
| 186 | +</Steps> |
| 187 | + |
| 188 | +## Advanced Configuration |
| 189 | + |
| 190 | +### Recursive Permissions |
| 191 | + |
| 192 | +Create permission chains where recipients can further delegate: |
| 193 | + |
| 194 | +- **Enable sub-delegation**: Allow recipients to delegate portions |
| 195 | +- **Set depth limits**: Maximum delegation chain length |
| 196 | +- **Inheritance rules**: How constraints pass down the chain |
| 197 | + |
| 198 | +### Conditional Permissions |
| 199 | + |
| 200 | +Set up smart permissions that trigger based on conditions: |
| 201 | + |
| 202 | +- **Performance metrics**: Delegate based on agent performance |
| 203 | +- **Time-based**: Activate during specific periods |
| 204 | +- **Event-driven**: Trigger on blockchain events |
| 205 | + |
| 206 | +## Best Practices |
| 207 | + |
| 208 | +### Security Considerations |
| 209 | + |
| 210 | +- **Principle of least privilege**: Grant minimum necessary permissions |
| 211 | +- **Regular audits**: Review and clean up unused permissions |
| 212 | +- **Test with small amounts**: Start with small emission delegations |
| 213 | + |
| 214 | +### Economic Efficiency |
| 215 | + |
| 216 | +- **Batch operations**: Group related permissions to save gas |
| 217 | +- **Monitor performance**: Track ROI on emission delegations |
| 218 | +- **Set reasonable terms**: Balance flexibility with security |
| 219 | + |
| 220 | +### Delegation Strategy |
| 221 | + |
| 222 | +- **Clear documentation**: Maintain records of permission purposes |
| 223 | +- **Communication**: Coordinate with recipients about expectations |
| 224 | +- **Gradual scaling**: Increase delegation scope based on proven success |
| 225 | + |
| 226 | +## Troubleshooting |
| 227 | + |
| 228 | +### Permission Creation Fails |
| 229 | + |
| 230 | +**Common issues:** |
| 231 | +- Insufficient balance for transaction fees |
| 232 | +- Invalid recipient agent address |
| 233 | +- Namespace path doesn't exist (for capabilities) |
| 234 | +- Attempting to delegate more than available (for emissions) |
| 235 | + |
| 236 | +### Permission Not Working |
| 237 | + |
| 238 | +**Check that:** |
| 239 | +- Permission is active and not expired |
| 240 | +- Recipient is using correct namespace path |
| 241 | +- No conflicting constraints or rate limits |
| 242 | +- Blockchain confirmation completed |
| 243 | + |
| 244 | +### Revocation Issues |
| 245 | + |
| 246 | +**Verify:** |
| 247 | +- Permission was created as revocable |
| 248 | +- You're the original delegator |
| 249 | +- No outstanding enforcement claims |
| 250 | + |
| 251 | +## What's Next? |
| 252 | + |
| 253 | +After creating permissions, you can: |
| 254 | + |
| 255 | +- **Monitor usage**: Track how recipients use delegated permissions |
| 256 | +- **Optimize delegation**: Adjust terms based on performance |
| 257 | +- **Scale coordination**: Build complex multi-agent workflows |
| 258 | +- **Analyze economics**: Review emission delegation ROI |
| 259 | + |
| 260 | +## Support and Resources |
| 261 | + |
| 262 | +For help with permission management: |
| 263 | + |
| 264 | +- [Torus Community Discord](https://discord.gg/torus) |
| 265 | +- [Permission System Documentation](https://docs.torus.network/explanations/v05/permissions/) |
| 266 | + |
| 267 | +#### Related Topics |
| 268 | + |
| 269 | +<CardGrid> |
| 270 | + <Card title="Permission System" icon="seti:config"> |
| 271 | + <a href="/explanations/v05/permissions">Deep dive into architecture</a> |
| 272 | + </Card> |
| 273 | + <Card title="Emission Permissions" icon="seti:shell"> |
| 274 | + <a href="/explanations/v05/emission-permissions">Economic coordination mechanisms</a> |
| 275 | + </Card> |
| 276 | +</CardGrid> |
0 commit comments