Start with physically complete constraints
A useful request names the wavelength, the input beam radius or fiber MFD, the plane where that input is defined, the desired waist radius, and the desired working distance from the last lens. Aperture or total-length limits should be included when they matter. If several values are unknown, leave them solver-free rather than silently guessing all of them.
For a nearly collimated input beam with radius w, a first estimate is w0 ≈ λf/(πw). At 1064 nm, a 2 mm radius incident on a 100 mm lens gives an estimated diffraction-limited waist radius of about 16.9 µm. The real waist location and size depend on the incoming wavefront curvature, so a full q-parameter propagation is still required.
Agent workflow
- Read the current solved snapshot so the incoming q parameter is not lost.
- Add one lens and the requested output-waist constraint.
- Leave either focal length or spacing free, but avoid an underconstrained system where everything can drift.
- Publish the first valid preview immediately.
- Explain whether the solution is paraxial and whether aperture or working-distance constraints force a larger lens.
A focusing result should report at least the waist radius, waist position relative to the final lens, Rayleigh range, and divergence. If the desired spot approaches the wavelength or requires high numerical aperture, the answer must state that scalar paraxial Gaussian optics is only a first-order estimate and that a vector-diffraction model may be necessary.
Why a live preview matters
Two solutions can hit the same waist while producing very different beam diameters on upstream optics. The DiffBeam plot makes those differences visible before a value is applied to the workspace. An internet-capable AI can use the Direct Agent Bridge; a native client can use validate_optical_system followed by simulate_optical_system.
DiffBeam does not host or proxy a language model. It is a deterministic Gaussian beam solver and visualization service, designed so an external AI can propose a layout while the user retains control over workspace revisions.