A self-adaptive IV-phase Mobile Agent Platform Security Architecture is proposed. Use of nonce-based authentication strengthens the agent owner verification. Exact pattern matching algorithm detects known malicious mobile agents. N-gram features based classification detects unknown malicious mobile agents. Use of feature selection methods improves the classification accuracy.