I used agents to develop applications far more complex than 5,000 lines, although I generally take a modular approach (just like when writing code with a team).