add panic in agent.