feat: add assistant bot with LLM integration and configuration
- Implemented the assistant bot with basic command handling and LLM routing. - Created configuration file for the assistant bot with personality, behavior, and LLM settings. - Added system prompt for the assistant bot to define its capabilities and limitations. - Developed registration script for creating Matrix bot users via Synapse admin API. - Introduced common development scripts for agent management (start, stop, list, logs). - Scaffolded new agent creation script to streamline the addition of new agents. - Implemented agent removal script to disable agents without deleting data.
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
// Package assistant defines the pure rules for the assistant bot.
|
||||
// Since this bot is primarily LLM-driven, most rules just route to the LLM.
|
||||
package assistant
|
||||
|
||||
import (
|
||||
"github.com/enmanuel/agents/pkg/decision"
|
||||
)
|
||||
|
||||
// Rules returns the decision rules for the assistant bot.
|
||||
func Rules() []decision.Rule {
|
||||
return []decision.Rule{
|
||||
// !help — explicit help command
|
||||
{
|
||||
Name: "help",
|
||||
Match: decision.MatchCommand("help"),
|
||||
Actions: []decision.Action{{
|
||||
Kind: decision.ActionKindReply,
|
||||
Reply: &decision.ReplyAction{
|
||||
Content: "Soy tu asistente. Escríbeme directamente lo que necesitas:\n" +
|
||||
"- Preguntas, explicaciones, resúmenes\n" +
|
||||
"- Ayuda con código\n" +
|
||||
"- Redacción de textos\n\n" +
|
||||
"Para tareas de infraestructura, habla con @devops-bot.",
|
||||
},
|
||||
}},
|
||||
},
|
||||
|
||||
// Any DM or mention → LLM
|
||||
// This is the catch-all: if the message is a DM or a mention, send to LLM.
|
||||
{
|
||||
Name: "llm-all",
|
||||
Match: func(ctx decision.MessageContext) bool {
|
||||
return ctx.IsDirectMsg || ctx.IsMention
|
||||
},
|
||||
Actions: []decision.Action{{
|
||||
Kind: decision.ActionKindLLM,
|
||||
LLM: &decision.LLMAction{},
|
||||
}},
|
||||
},
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user