Finl Version of the source code of tabiagent