[minor/bug] only read local conf in agent mode
[minor] make scheduler record agent environment in database