Preheat your air fryer to 400°F. Place the asparagus in a bowl and toss with olive oil. Season with salt and pepper, toss again to coat.
Place the asparagus in a single layer in the basket or directly on the rack. Fry the asparagus for 5-6 minutes. If you are using a basket-style air fryer toss the basket at about 3 minutes for even cooking. The pieces should be slightly crisp on the outsides when done.
Notes
If longer spears do not fit in your air fryer, cut the asparagus into bite-size pieces and reduce the cooking time by a minute or two. Keep in mind when working with asparagus that thinner spears will cook much more quickly than thicker ones. Try to select uniform-size spears whenever possible. When that isn’t possible, you can cook in batches with similar sizes in each batch.