Leave the const version as is, you can add dtCrowdAgent* getEditableAgent(const int idx) if you need non-const version.