Sub-agent architecture