In this paper we present an agent-oriented modeling language, called MAS-ML, and an approach for mapping its diagrams into Java implementations. MAS-ML extends the UML meta-model describing new meta-classes and stereotypes, extending the class and sequence diagrams and proposing two new diagrams: organization and role diagram. The paper also relates MAS-ML to other modeling languages that also extend the UML for modeling multi-agent systems.