Apart from the answers provided make sure that you also provide the Model Invoking and Inference profile related permissions to the role attached with the Agent.