Distributed agents for autonomous spacecraft