[FEATURE]: a plugin feature for people to port their database / sql / customized rag / llm cache ? #2239

Open
opened 2026-02-16 17:34:47 -05:00 by yindo · 12 comments
Owner

Originally created by @sprappcom on GitHub (Oct 23, 2025).

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

as titled. so people can save on inference, pre check on db / rag / llm cache etc

Originally created by @sprappcom on GitHub (Oct 23, 2025). ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request as titled. so people can save on inference, pre check on db / rag / llm cache etc
yindo added the discussion label 2026-02-16 17:34:47 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Oct 23, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #3367: [FEATURE]: New Plugin Hook assistant.output.beforeParse - discusses plugin extensibility for preprocessing/transforming data before processing
  • #2661: [Feature Request]: plugin hook allowing modification of request body before it is sent - requests plugin hooks for modifying requests, similar concept for extensibility
  • #2893: Plugin event types - discusses plugin event system which could be extended for database/caching integrations
  • #2185: Hooks for commands (Plugin Commands) - requests plugin system for custom commands which could include database/SQL/caching functionality

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Oct 23, 2025): This issue might be a duplicate of existing issues. Please check: - #3367: [FEATURE]: New Plugin Hook assistant.output.beforeParse - discusses plugin extensibility for preprocessing/transforming data before processing - #2661: [Feature Request]: plugin hook allowing modification of request body before it is sent - requests plugin hooks for modifying requests, similar concept for extensibility - #2893: Plugin event types - discusses plugin event system which could be extended for database/caching integrations - #2185: Hooks for commands (Plugin Commands) - requests plugin system for custom commands which could include database/SQL/caching functionality Feel free to ignore if none of these address your specific case.
Author
Owner

@rekram1-node commented on GitHub (Oct 23, 2025):

Can you explain what you would expect to happen here?

@rekram1-node commented on GitHub (Oct 23, 2025): Can you explain what you would expect to happen here?
Author
Owner

@sprappcom commented on GitHub (Oct 23, 2025):

@rekram1-node a magical ai llm coder prompt that will get this done or a headstart on where i can get this done with a magical ai llm coder prompt.

i would like standardization towards having this "database" layer and "storage" layer and "rag" layer so i can easily comfortably also create the plugin etc to fit opencode

@sprappcom commented on GitHub (Oct 23, 2025): @rekram1-node a magical ai llm coder prompt that will get this done or a headstart on where i can get this done with a magical ai llm coder prompt. i would like standardization towards having this "database" layer and "storage" layer and "rag" layer so i can easily comfortably also create the plugin etc to fit opencode
Author
Owner

@rekram1-node commented on GitHub (Oct 23, 2025):

a magical ai llm coder prompt that will get this done or a headstart on where i can get this done with a magical ai llm coder prompt.

I'm not entirely following, okay so you wanna have a plugin that has access to a sql database? Have you tried custom tools should be pretty easy to setup:
https://opencode.ai/docs/custom-tools/

@rekram1-node commented on GitHub (Oct 23, 2025): > a magical ai llm coder prompt that will get this done or a headstart on where i can get this done with a magical ai llm coder prompt. I'm not entirely following, okay so you wanna have a plugin that has access to a sql database? Have you tried custom tools should be pretty easy to setup: https://opencode.ai/docs/custom-tools/
Author
Owner

@sprappcom commented on GitHub (Oct 24, 2025):

i want to develop a plugin for speech to text
and custom rag db storage (so this can use custom-tools)

what about speech to text? or when it's done with llm processing, i can make it beep or play a sound?

@sprappcom commented on GitHub (Oct 24, 2025): i want to develop a plugin for speech to text and custom rag db storage (so this can use custom-tools) what about speech to text? or when it's done with llm processing, i can make it beep or play a sound?
Author
Owner

@rekram1-node commented on GitHub (Oct 24, 2025):

@sprappcom yep you can, you can read about plugins here.

This is an example of how to do that on macos (using say):

export const NotificationPlugin = async ({ project, client, $, directory, worktree }) => {
  return {
    event: async ({ event }) => {
      if (event.type === "session.idle") {
        await $`say "done"`
      }
    },
  }
}
@rekram1-node commented on GitHub (Oct 24, 2025): @sprappcom yep you can, you can read about plugins [here](https://opencode.ai/docs/plugins/#send-notifications). This is an example of how to do that on macos (using `say`): ``` export const NotificationPlugin = async ({ project, client, $, directory, worktree }) => { return { event: async ({ event }) => { if (event.type === "session.idle") { await $`say "done"` } }, } } ```
Author
Owner

@sprappcom commented on GitHub (Oct 25, 2025):

@rekram1-node are there anything that limits the extensibility of opencode for now? i really much would like to have it do everything

@sprappcom commented on GitHub (Oct 25, 2025): @rekram1-node are there anything that limits the extensibility of opencode for now? i really much would like to have it do everything
Author
Owner

@rekram1-node commented on GitHub (Oct 25, 2025):

you mean plugin wise? or what

@rekram1-node commented on GitHub (Oct 25, 2025): you mean plugin wise? or what
Author
Owner

@sprappcom commented on GitHub (Oct 26, 2025):

plugin or custom tool wise etc. mcp integration etc etc

@sprappcom commented on GitHub (Oct 26, 2025): plugin or custom tool wise etc. mcp integration etc etc
Author
Owner

@rekram1-node commented on GitHub (Oct 26, 2025):

I think you can take current setup far but anything missing you want for extensibility we can add new hooks and things for you to extend off of

@rekram1-node commented on GitHub (Oct 26, 2025): I think you can take current setup far but anything missing you want for extensibility we can add new hooks and things for you to extend off of
Author
Owner

@ragavsathish commented on GitHub (Oct 29, 2025):

Hi,

Firstly thanks for the amazing tool ❤️

I’m exploring ways to preempt or override the default READ file tool with a custom search/indexing tool for a workspace query setup and use the result to READ relevant file

Usage scenario:
I’m trying to re-use the Roo Codebase Indexing for querying the workspace via OpenCode, so that I can use both Roo and OpenCode seamlessly.

Is there a recommended way to hook into or override the READ behavior without defining it directly in agents.md ?
Would love any guidance or best practices for extending this cleanly.

@ragavsathish commented on GitHub (Oct 29, 2025): Hi, Firstly thanks for the amazing tool :heart: I’m exploring ways to preempt or override the default `READ` file tool with a custom search/indexing tool for a workspace query setup and use the result to READ relevant file **Usage scenario:** I’m trying to re-use the [Roo Codebase Indexing](https://docs.roocode.com/features/codebase-indexing) for [querying the workspace](https://github.com/ragavsathish/opencode-tools/blob/main/.opencode/plugin/roosearch.ts#L204) via **OpenCode**, so that I can use both Roo and OpenCode seamlessly. Is there a recommended way to hook into or override the `READ` behavior without defining it directly in `agents.md` ? Would love any guidance or best practices for extending this cleanly.
Author
Owner

@rekram1-node commented on GitHub (Oct 29, 2025):

You could write your own tool called read and it will override the read tool. See here: https://opencode.ai/docs/custom-tools/

Or you could give it it's own name too so u would have 2 different types of reads

@rekram1-node commented on GitHub (Oct 29, 2025): You could write your own tool called read and it will override the read tool. See here: https://opencode.ai/docs/custom-tools/ Or you could give it it's own name too so u would have 2 different types of reads
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2239