Skip to content

feat: harness conversation api and basic agent UI - #124

Merged
07prajwal2000 merged 3 commits into
Fluxify-rest:mainfrom
07prajwal2000:feature/harness-conversation-api
Jul 26, 2026
Merged

feat: harness conversation api and basic agent UI#124
07prajwal2000 merged 3 commits into
Fluxify-rest:mainfrom
07prajwal2000:feature/harness-conversation-api

Conversation

@07prajwal2000

Copy link
Copy Markdown
Collaborator

This PR contains 2 main changes: 1. Implementation of the harness conversation API endpoints for the AI gateway. 2. Implementation of the basic agent UI, including a beautifully designed Prompt Editor with glassmorphism UI.

07prajwal2000 and others added 3 commits July 25, 2026 21:41
Vertical-slice endpoints for the new agent harness conversation model
(agent_harness_conversations/runs, replacing the legacy location/routeId
coupling on ai_chat_conversations):

- GET /harness-conversations - paginated list, needUserQuery=true adds a
  30-char truncated latest query per conversation
- PATCH /harness-conversations/:conversationId - rename
- DELETE /harness-conversations/:conversationId - delete
- POST /harness-conversations/message - send a message; omitting
  conversationId creates a new conversation + run and enqueues
  HARNESS_START_JOB (reuses enqueueHarnessStart); rejects with 409 if the
  target conversation already has a run in progress

Status shown to the user is resolved live from the Redis run snapshot
(harness:run:<runId>:snapshot) while a run is in flight, falling back to
the conversation's DB status once idle/terminal - the DB status only
flips on terminal events so it lags mid-run.

Perf hardening for high concurrency on constrained (1 vCPU/1GB) pods:
- list's status resolution is now batched (RedisService.getActiveRuns/
  getSnapshots via MGET) instead of up to 2 Redis round trips per row
- list cache invalidation on mutations uses an O(1) per-user version
  counter (cacheVersion.ts) instead of deleteCacheKeysByPattern, which
  runs Redis KEYS - an O(N) full-keyspace scan that blocks Redis's
  single thread
- the post-mutation status refresh query only runs on a cache hit, not
  after a fresh DB build that already has current statuses

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@07prajwal2000

Copy link
Copy Markdown
Collaborator Author
image

@07prajwal2000
07prajwal2000 added this pull request to the merge queue Jul 26, 2026
Merged via the queue into Fluxify-rest:main with commit ece8d65 Jul 26, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant