Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
| 1 | """UUID utility functions for Composio SDK.""" |
| 2 | |
| 3 | import uuid |
| 4 | |
| 5 | |
| 6 | def generate_uuid() -> str: |
| 7 | """Generate a random UUID v4 string.""" |
| 8 | return str(uuid.uuid4()) |
| 9 | |
| 10 | |
| 11 | def generate_short_id() -> str: |
| 12 | """ |
| 13 | Generate a short ID (8 characters) from a UUID. |
| 14 | |
| 15 | Returns the first 8 characters of a UUID with dashes removed. |
| 16 | """ |
| 17 | return generate_uuid()[:8].replace("-", "") |