Add GNESI_CREDENTIAL in the Vercel project environment. The value is the agent credential from Settings, Agent access. Mark it sensitive. Do not prefix it with NEXT_PUBLIC_.
Call Gnesi from a server function, a route handler, or a background function. The Vercel AI SDK page is the tool loop. A plain fetch works too:
const response = await fetch("https://api.gnesi.io/v1/conversations?view=needs_you", {
headers: { Authorization: `Bearer ${process.env.GNESI_CREDENTIAL}` },
});The browser must not see the credential. A chat visitor signs in through MCP on their own client.
A paid agent send is USDC from the wallet. A short balance is an error. The agent calls gnesi_add_funds and shows the URL. Cash out is gnesi_cash_out. It is not an HTTP 402. See Payments.