It has been important to extend database management systems to support new requirements of applications and administration. We focus in this paper on the automatic tuning feature, particularly manipulation of indexes. The architectural approach considered here is based on software agents. We briefly present the heuristics involved in the decision upon creation, dropping and the exact moment to proceed with either action. Then we discuss our agentbased database architecture, with its layers and coupling within an actual DBMS. Finally, we explain the way our hypothetical indexes are integrated in PostgreSQL and how they can be used in practice for automated index tuning.