Draw.io Agent Frontend
This directory contains the migrated Next.js draw.io intelligent drawing frontend for ai-agent-scaffold-go.
Backend API
The frontend talks to the Go backend through:
http://localhost:8091/api/v1
Override the API base URL with:
NEXT_PUBLIC_API_BASE_URL=http://localhost:8091/api/v1
Used endpoints:
GET /query_ai_agent_config_listPOST /create_sessionPOST /chat
The Go chat endpoint returns:
{
"code": "0000",
"info": "success",
"data": {
"content": "<agent output or draw.io xml>"
}
}
The frontend treats data.content as draw.io XML when it looks like mxfile or mxGraphModel; otherwise it renders the content as a normal Agent message.
Development
npm install
npm run dev
Open:
http://localhost:3000
Build
npm run build