Urgent.News

What's breaking now, across thousands of outlets.

AI

How I Built a Production-Ready AI Agent on PHP, cPanel, and Gemini Flash

How I built a production-ready AI agent with PHP, MySQL, Gemini Flash, and cPanel—covering architecture, tools, memory, and deployment.

How I Built a Production-Ready AI Agent on PHP, cPanel, and Gemini Flash

This article explains how to build a production-ready AI agent using PHP, MySQL, Gemini Flash, and cPanel. The author demonstrates that such a system can be practical, understandable, and cost-effective, even for developers who are not working on a modern stack with Python, Docker, and cloud infrastructure.

The agent system consists of an HTTP endpoint that receives user requests, sends context to Gemini Flash, and uses the model to decide whether to request a tool or provide a direct answer. The agent loop continues until the model produces a final answer. This design focuses on the orchestration between the model, tools, and memory, which is often missing in other tutorials.

The system uses PHP to handle HTTP requests and the agent loop, MySQL to store chat memory and saved data, Gemini Flash to decide whether the agent should answer directly or use a tool, and cPanel to deploy the system on shared hosting. The author emphasizes that the agent is not a monolith but a loop that receives user input, sends context to the model, lets the model request a tool if needed, executes the tool, and sends the result back until the model produces a final answer.

To build the system, the author provides a project structure and a MySQL database setup with two tables: one for conversation history and one for saved notes. The PHP code includes functions for connecting to the MySQL database, making Gemini Flash API calls, and handling function calls. The author also stresses the importance of keeping the system understandable and debuggable by separating concerns and using a simple database schema.

Written by urgent.news from HackerNoon's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at hackernoon.com →

More in AI

The #1 row on this AI memory leaderboard is not a measurement

Bench'd (benchd.ai) calls itself the neutral benchmark authority for AI memory, and sells vendors a verification badge from $299 to $3,999.99 a month. I ran my memory system through their harness.

  • AI memory leaderboard's top entry is not genuine measurement
  • Benchmark service Bench d sells verification badge for $299-$3,999.99/month
  • Top three entries lack downloadable proof of Community-Verification

I built an AI incident responder that refuses to fix anything without asking

Built for the WeMakeDevs × TrueFoundry Agent Harness Hackathon. There are two kinds of "AI for incident response," and both of them are wrong. The first acts on its own.

  • Mayday AI incident responder combines speed of autonomous action with safety of human approval
  • Proposes single fix with root cause, impact, and ruled-out options before human approval
  • 401 HTTP error prevents bypassing approval process

More from Saturday 29 August →