You need to define the problem space so that the agent knows what to do. Basically give it the tools to determine when it's "done" as defined by you.