Agent models: Internalizing Chain-of-Action Generation into Reasoning models