Building reliable agentic AI systems