Menu

1 / 3

Building Agentic Apps on Nhost

DEV Community: postgres·Max S.·2 days ago
#UQFZ49d9
#devtopostgresql#devto#dev#user#nhost
Long article (1352 words) — no AI summary yet.
Reading 0:00
15s threshold

A common way to add an AI agent to an app is to give the agent its own backend. The app keeps its database and auth. The agent gets a vector database, a worker with a service key, sometimes a queue, and a pile of code that copies data between them.

With one test user you won't notice anything. With real users, that worker can read every row in the database , because nobody ever put rules on the service key.

On Nhost I skipped the second backend. Postgres, Auth, the GraphQL API with its permissions, Storage, Functions and containers all sit in one project, and the agent uses them under the same rules as the rest of the app. Here's how I set it up. Screenshots are from a test project in the Nhost Dashboard.

What the agent needs

An agent reads and writes data, keeps some memory between conversations (usually with embeddings), calls tools, and sometimes runs work that takes minutes. It also acts for a specific person. People forget that last one.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.