AGI does not affect eligibility to contribute to a 401k. AGI does affect eligibility for IRAs.
If you are self employed, and this is a self employment / solo 401k - what you can contribute DOES depend on how much your self employment business net income (from Schedule C) was.