aiagent

package module
v0.0.0-...-46144ef Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 30, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

README

Agent Desk Server

Customer-service API server built with Go, Gin, GORM, and github.com/mlogclub/simple.

The frontend is an independent sibling project, normally located at ../agent-desk-web.

Development

cp config/config.example.yaml config/config.yaml
go mod download
make dev

The API listens on http://127.0.0.1:8083 by default. Health check:

GET http://127.0.0.1:8083/api/health

Set server.frontendUrl and server.cors.allowedOrigins in config/config.yaml to the frontend origin. Local defaults use http://127.0.0.1:3000.

Commands

make dev
make build
make test
make generator
make enums FRONTEND_DIR=../agent-desk-web

make enums writes the backend-owned shared enums into the frontend project.

Docker

docker build --target app -t agent-desk-server .
docker run --rm -p 8083:8083 agent-desk-server

The Docker image contains only the API service. Deploy the frontend separately.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(options Options) (http.Handler, error)

New initializes the customer-service business module. Authentication and authorization must already have been completed by the host system.

func SyncSchema

func SyncSchema(database *gorm.DB, tablePrefix string) error

SyncSchema explicitly creates or updates AI Agent tables. It is intended for the host application's maintenance command and is never called by New.

Types

type Options

type Options struct {
	Database             *gorm.DB
	TablePrefix          string
	LoadSettings         func(ctx context.Context, prefix string) (map[string]string, error)
	QuerySubjects        identity.QuerySubjectsFunc
	Authorize            identity.AuthorizeFunc
	ResponseWriter       contract.ResponseWriter
	FileStorage          contract.FileStorage
	BusinessReadTools    []contract.BusinessReadTool
	BusinessActionTools  []contract.BusinessActionTool
	CustomerQuickActions []contract.CustomerQuickAction
	PlatformAI           contract.PlatformAIProvider
}

Directories

Path Synopsis
cmd
enums command
generator command
server command
internal
ai
ai/runtime/readtools
Package readtools executes deterministic, read-only graph tools through the shared Tool Registry boundary.
Package readtools executes deterministic, read-only graph tools through the shared Tool Registry boundary.
ai/tooling
Package tooling provides the engine-independent tool governance boundary.
Package tooling provides the engine-independent tool governance boundary.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL