You have the right to remain silent or tell the agent that you’ll only answer questions in the presence of an attorney, no matter your citizenship or immigration status. You do not have to answer questions about your immigration status. You may simply say that you do not wish to answer those questions. Anything you say could be used against you in court, do not lie or provide false documents.
A limited exception does exist. People who do have permission to be in the U.S. for a specific reason and for, usually, a limited amount of time (a “nonimmigrant” on a visa, for example), the law does require you to provide information about your immigration status if asked. While you can still choose to remain silent or decline a request to produce your documents, people in this category should be aware that they could face arrest. If you want to know whether you fall into this category, you should consult an attorney.