Intelligent agents learn to solve tasks through interactions with their environment. We study autoregressive active inference agents that learn system dynamics and plan actions to reach a goal. From a free energy functional, we derive a variational posterior over the agent’s next action, with naturally emerging epistemic and goal-driven components. We study the effect of the epistemic term on the chosen action and investigate how it depends on prior parameters.