When using grafi-dev with assistants that require async initialization e.g. MCP server connections, the cli fails as the module immediately looks for the assistant variable, if set assistant = None globally, it wouldn't work as None type does not have the to_dict() method, and showing:
AttributeError: 'NoneType' object has no attribute 'to_dict'
The solution I could find is to create a simple dummy assistant first, which allows it to use the to_dict() method, and then override the dummy assistant with your actual assistant inside the async function