Agent theories and agent programs are two very different styles of specification of agent behavior. The former are declarative in nature, while the latter have an imperative flavor. In this paper, we combine ideas from both areas, yielding a powerful mode of agent specification that also gives the specifier a good deal of control over the complexity of the specified agent. In particular, we extend Shapiro et al.’s [16] agent theory to handle prioritized goals and then integrate it with the IndiGolog agent programming language. The result is a new IndiGolog construct that transforms a given nondeterministic, concurrent program δ into a new program δ that can be described as a rational implementation of the original program, in the sense that δ is an implementation of δ, and furthermore, δ is the most rational of all implementations of δ relative to a given set of prioritized goals and the agent’s knowledge. With this construct, we can specify an agent that will attempt ...