i want to create a node.js based ai-agentic server that takes user prompt to ai generated full stack application. this is the outer server the agentic server, it gathers information from the user before starting a long job of first creating a project folder based on the user conversation then copying a full-stack template into that new folder. next begins a series of ai requests for the projects data model.

 

every single application that gets built by our ai-agents will follow this exact deterministic build process. we can greatly limit the amount of original code ai has to write by reusing a project template. we will have a project template a totally separate node.js server application with our predefined folder structure and ready package.json files, and many of the same core files. with everything the new project needs to generate its database, routes, repos, and a client-sdk. the project front-ends use vite and lit web components and tailwind. all of our project apps will manage dom and rest using the same sdk execution code.

 

The top level server is a chat server and job server. before we begin the long process we have to understand the project objective and have a list of pages and components and data models. we could end up with anywhere from 20 to 30 data models, and 3-10 pages with 10 to 100 components!

 

Which brings me to the major other aspect of this application, component reuse. We want to avoid ever getting the same AI result twice. The first place in our application I want to start preventing duplicate queries is in our component generation. We need to make our component requesting AI request follow some standardization especially anything within our framework. the naming of the components should be consistent. components with dynamic content or interactive have schema that will frequently be expressed in the code, this is kind of a problem for us if we are trying to make our components reusable across many projects. If it is a specific type of component for example a feature rich textarea and now we want the app to reach on change, keyup and reference it in multiple events like click and submit etc. we need to improve our consistency based on the sdk, lets say we do two ai requests for separate two components they have no concept of each other. even though these are dumb components. but we still need to have as reliable consistency as possible.

 

I always prefer a deterministic approach to ai generated. AI is very trustworthy for returning lists, and it is moderately trustworthy returning prisma models. And potentially it is trustworthy generating components. Besides that we can do everything programmatically.

 

I want the top level app to finally run npm install on the new project and npm test.

 

How do we know when we can move out of chat mode and into generate mode? Should we cycle through every component and every model making individual ai requests? We need some ai double checker agents before we loop through anything. we need to be able to see the progress on the screen.

 

theres a lot going on here, with the project copying and component generating, but fundamentally this app is an agentic workflow.

 

generate the poc as a downloadable zip.

Related posts:


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *