How do I build a simple AI agent with function calling?
Define your tools as JSON schemas, then let the model decide when to call them. Start simple: one tool for search, one for calculation. The model returns a function call instead of text, you execute it, feed results back. Loop until done.