[PR #2161] [MERGED] Enabled use of @agent (and skills) via dev API calls #3906

Closed
opened 2026-02-22 18:34:44 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/2161
Author: @timothycarambat
Created: 8/22/2024
Status: Merged
Merged: 8/22/2024
Merged by: @timothycarambat

Base: masterHead: 2145-agents-via-dev-api


📝 Commits (2)

  • 9e32fe5 Use @agent via dev API
  • 6c55e00 Move EphemeralEventListener to same file as agent

📊 Changes

5 files changed (+595 additions, -35 deletions)

View changed files

server/utils/agents/aibitat/plugins/http-socket.js (+87 -0)
📝 server/utils/agents/defaults.js (+35 -23)
server/utils/agents/ephemeral.js (+351 -0)
📝 server/utils/agents/index.js (+12 -12)
📝 server/utils/chats/apiChatHandler.js (+110 -0)

📄 Description

Pull Request Type

  • feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 🔨 chore
  • 📝 docs

Relevant Issues

resolves #2145

What is in this change?

  • Enable use of stateless @agent via REST API for workspace /chat and /stream-chat
  • Calls are now "one-off" since a REST session cannot exist. If you want to call a tool, start the prompt with @agent.
  • LLM Agent provider must still be set for workspace being chatted with as you would in the normal UI
  • Supports all tools available in the main app.

Additional Information

  • Minor refactor of AgentHandler so methods can be utilized in extended EphemeralAgengHandler call

Developer Validations

  • I ran yarn lint from the root of the repo & committed changes
  • Relevant documentation has been updated
  • I have tested my code functionality
  • Docker build succeeds locally

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Mintplex-Labs/anything-llm/pull/2161 **Author:** [@timothycarambat](https://github.com/timothycarambat) **Created:** 8/22/2024 **Status:** ✅ Merged **Merged:** 8/22/2024 **Merged by:** [@timothycarambat](https://github.com/timothycarambat) **Base:** `master` ← **Head:** `2145-agents-via-dev-api` --- ### 📝 Commits (2) - [`9e32fe5`](https://github.com/Mintplex-Labs/anything-llm/commit/9e32fe5baa18026741e02bb96076740e99d0b766) Use `@agent` via dev API - [`6c55e00`](https://github.com/Mintplex-Labs/anything-llm/commit/6c55e00e9262d8173cee287a4be10977d62d38d6) Move EphemeralEventListener to same file as agent ### 📊 Changes **5 files changed** (+595 additions, -35 deletions) <details> <summary>View changed files</summary> ➕ `server/utils/agents/aibitat/plugins/http-socket.js` (+87 -0) 📝 `server/utils/agents/defaults.js` (+35 -23) ➕ `server/utils/agents/ephemeral.js` (+351 -0) 📝 `server/utils/agents/index.js` (+12 -12) 📝 `server/utils/chats/apiChatHandler.js` (+110 -0) </details> ### 📄 Description ### Pull Request Type <!-- For change type, change [ ] to [x]. --> - [x] ✨ feat - [ ] 🐛 fix - [x] ♻️ refactor - [ ] 💄 style - [ ] 🔨 chore - [ ] 📝 docs ### Relevant Issues <!-- Use "resolves #xxx" to auto resolve on merge. Otherwise, please use "connect #xxx" --> resolves #2145 ### What is in this change? - Enable use of stateless `@agent` via REST API for workspace `/chat` and `/stream-chat` - Calls are now "one-off" since a REST session cannot exist. If you want to call a tool, start the prompt with `@agent`. - LLM Agent provider must still be set for workspace being chatted with as you would in the normal UI - Supports all tools available in the main app. <!-- Describe the changes in this PR that are impactful to the repo. --> ### Additional Information - Minor refactor of `AgentHandler` so methods can be utilized in extended `EphemeralAgengHandler` call <!-- Add any other context about the Pull Request here that was not captured above. --> ### Developer Validations <!-- All of the applicable items should be checked. --> - [x] I ran `yarn lint` from the root of the repo & committed changes - [x] Relevant documentation has been updated - [x] I have tested my code functionality - [x] Docker build succeeds locally --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-22 18:34:44 -05:00
yindo closed this issue 2026-02-22 18:34:44 -05:00
yindo changed title from [PR #2161] Enabled use of `@agent` (and skills) via dev API calls to [PR #2161] [MERGED] Enabled use of `@agent` (and skills) via dev API calls 2026-06-05 15:15:50 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#3906