The University of Michigan Digital Library (UMDL) project  is a large-scale, multidisciplinary effort to design and build a flexible, scalable infrastructure for rendering library services in a digital networked environment. In order to meet these goals, we chose to implement the library as a collection of interacting agents, each specialized to perform a particular task and all of them acting in an artificial economy. This architecture promotes modularity by distributing the responsibility of achieving tasks among the different agents, and flexibility by allowing the formation of different teams of agents to accomplish specific tasks. This, in turn, requires that some of the agents have the ability to exploit the flexibility of the architecture and the properties of other agents. In this paper, we will be talking about such a class of agents, the Task Planner Agents (TPAs), who are responsible for decomposing tasks and forming teams of agents to accomplish them. We will also concentrate on a particular instance of a TPA that specializes in planning query tasks, and is currently under development.