Skip to content

Latest commit

 

History

History
65 lines (43 loc) · 2.28 KB

File metadata and controls

65 lines (43 loc) · 2.28 KB

cms

Conversation management service for agents, conversations, messages, resources, vectors, tools, prompts, and search.

Directory Shape

  • index.js: standalone HTTP entrypoint
  • app.js: application interface used by direct callers
  • service.js: local composition
  • http.js: shared HTTP composition root
  • remote.js: HTTP client for remote mode
  • core/: conversation-service and domain logic
  • http/: route families and HTTP helpers
  • scripts/: operational scripts such as vector reindexing

The service root shows the runtime boundary; the capability code is grouped under core/ and http/.

HTTP API

Standalone CMS mounts its routes under /api/v1.

Route families:

  • agents: /agents
  • conversations and summaries: /conversations, /summarize
  • messages: /conversations/:conversationId/messages, /messages/:id
  • resources: /resources, /agents/:agentId/resources, /conversations/:conversationId/resources
  • vectors and search: /vectors, /resources/:resourceId/vectors, /search/messages, /search/vectors, /search/chunks
  • tools and prompts: /tools, /prompts

server mounts the same shared CMS routers for the public API, with browser/session-aware request context in front of them.

Runtime Modes

Direct mode

server composes CMS in-process through cms/service.js. This is the simpler local path.

HTTP mode

Set CMS_URL for server, or run standalone CMS directly. The edge server will use cms/remote.js, while the service serves cms/http.js.

Running It

From the repo root:

npm start -w cms

The standalone service defaults to port 3002.

Important Environment Variables

  • PORT
  • GATEWAY_URL
  • PGHOST, PGPORT, PGDATABASE, PGUSER, PGPASSWORD
  • DB_STORAGE
  • DB_SKIP_SYNC

Notes