Skip to main content
This guide covers the engineering patterns for building production-quality AI features with AFK. It’s organized around three phases: starting narrow, adding capabilities, and scaling safely.

Start narrow, iterate fast

The most common mistake is building for complexity you don’t have yet. Start with the simplest version that solves the problem, then add capabilities based on real evidence.
[!TIP] Test at every step. Don’t add tools before the base prompt works. Don’t add subagents before single-agent tools work. Each layer should be proven before adding the next.

Common patterns

Categorize input into predefined labels. No tools needed.
Tips:
  • Constrain output format explicitly in the prompt
  • Test with a diverse set of inputs
  • Add evals for each category

Anti-patterns

These are the most common mistakes. Avoiding them will save you significant debugging time.

Production readiness checklist

Next steps

Observability

Set up monitoring, alerting, and dashboards.

Evals

Write behavioral tests for agents.