Local agent system

Added and tested local agent system