Fixed AgentContext#getCurrentAgent to properly tie the agent to the
database, not the AgentContext