implements HTTP agents methods; use fcntl to lock model; merge Agents handler to AgentsDatabase; fix minor bugs
fix