implemented external tables in agent