Buckets:

download
raw
608 Bytes
from uuid import UUID
from cognee.modules.agents.registry import delete_user_agent_connections
from cognee.modules.users.methods.delete_user import delete_user
from cognee.modules.users.methods.get_user import get_user
async def delete_agent(agent_id: UUID, owner_id: UUID) -> None:
agent_user = await get_user(agent_id)
if agent_user is None:
raise LookupError("Agent not found")
if agent_user.parent_user_id != owner_id:
raise PermissionError("Not authorized to delete this agent")
await delete_user_agent_connections(agent_id)
await delete_user(agent_user.email)

Xet Storage Details

Size:
608 Bytes
·
Xet hash:
667ca07ab32f1c8b79e8a82f1347443c90ede0bd477a9a4dcb3606605b371ec5

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.