async def allowed_locations(self) -> list[Location]:
        """Get locations that this agent is allowed to be in."""
        database = await get_database()
        data = await database.get_by_field_contains(
            Tables.Locations, "allowed_agent_ids", str(self.id)
        )

        # For testing purposes include locations with 0 allowed agents as well
        other_data = await database.get_by_field(
            Tables.Locations, "allowed_agent_ids", "{}"
        )

        return [Location(**location) for location in data + other_data]
Get locations that this agent is allowed to be in.
src/agent/base.py