ctp: add agent.py

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>