AI Engineering Field Note · Pathan Afnan Khan

Reliable AI agents need deterministic boundaries

The most reliable agents are not autonomous everywhere. They reason where reasoning helps, and hand deterministic work to typed tools, rules and validation layers.

Agentic AIAI AgentsLangGraphTool CallingStructured OutputsAI Reliability

Autonomy should be selective

An agent should not be autonomous everywhere. Reasoning is useful for interpreting ambiguous requests, planning and choosing among tools, but calculations, permissions, side effects and core business rules should remain deterministic whenever possible.

This creates a clear contract between the model and the rest of the system: the model decides what should happen, while trusted code decides whether and how that action is allowed to happen.

Typed tools make behavior testable

Tool schemas should be explicit about required fields, accepted values and output shapes. Structured outputs make downstream handling easier to validate and reduce the chance that free-form text silently becomes an action.

I also prefer explicit state for multi-step flows. A state machine or graph makes it clear what has already happened, what can happen next and where recovery should resume after a failure.

Retries need limits and recovery paths

Unbounded agent loops are difficult to operate in production. Retries should have clear ceilings, tool failures should be visible in traces, and fallback behavior should be designed rather than improvised by the model.

For high-impact actions, human approval is a stronger control than prompt wording. Approval gates are especially useful around external side effects, access changes, irreversible operations or actions with compliance implications.

Multi-agent systems need ownership

Multiple agents are useful when responsibilities are genuinely different. A planning agent, execution agent and review agent can work well when each has a narrow contract and clear handoff criteria.

What I try to avoid is several agents repeatedly reasoning over the same task without ownership boundaries. That usually increases latency, cost and debugging difficulty without creating a corresponding reliability gain.

LET'S BUILD
CONNECTION CHANNEL OPEN
FINAL SYSTEM / PORTFOLIO END
NEXT PROJECT / NEXT SYSTEM / NEXT IDEA

LET'S BUILD

SOMETHING

INTELLIGENT.

Interested in building intelligent products, production AI systems, agentic workflows, machine learning platforms, or something that does not exist yet? Start the conversation.

CREATED BYPathan Afnan Khan✦
2026 © ALL RIGHTS RESERVEDPORTFOLIO / SYSTEM COMPLETE
Built with♡& intelligence
AGENTIC AI✦
GENERATIVE AI✦
MACHINE LEARNING✦
DATA ENGINEERING✦
CLOUD AI✦
MLOPS✦
INTELLIGENT SYSTEMS✦
AGENTIC AI✦
GENERATIVE AI✦
MACHINE LEARNING✦
DATA ENGINEERING✦
CLOUD AI✦
MLOPS✦
INTELLIGENT SYSTEMS✦