sample-agent.ts 609 B

12345678910111213141516
  1. export default {
  2. id: "sample-agent-plugin",
  3. setup: async (ctx) => {
  4. await ctx.agent.transform((agents) => {
  5. agents.update("sample-plugin-agent", (agent) => {
  6. agent.description = "Example subagent registered by .opencode/plugins/sample-agent.ts"
  7. agent.mode = "subagent"
  8. agent.prompt = [
  9. "You are the sample plugin agent for this repository.",
  10. "Use this agent to verify that local plugin auto-discovery can add agents.",
  11. "Keep responses concise and explain which plugin registered you when asked.",
  12. ].join("\n")
  13. })
  14. })
  15. },
  16. }