An agent-oriented formal modeling framework based on OGSA is proposed, which is called formal AOMG(formal agent-oriented modeling based on grid). Based on Object-Z, formal AOMG integrates meta-models from I\+* and UML, and introduces a new intention attribute (service attribute) to agent. Formal AOMG can formalize relationships between agents and grid environment. Three core models (organization model, agent class model and agent service model) of formal AOMG are presented. Formal AOMG provides a set of formal semantic mapping rules between organization model and agent class model, which facilitates the system model's transition from agent level to object level.