summaryrefslogtreecommitdiffhomepage
path: root/internal/llm/agent/agent.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/llm/agent/agent.go')
-rw-r--r--internal/llm/agent/agent.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/internal/llm/agent/agent.go b/internal/llm/agent/agent.go
new file mode 100644
index 000000000..e02fc0f78
--- /dev/null
+++ b/internal/llm/agent/agent.go
@@ -0,0 +1,17 @@
+package agent
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/cloudwego/eino/flow/agent/react"
+)
+
+func GetAgent(ctx context.Context, name string) (*react.Agent, string, error) {
+ switch name {
+ case "coder":
+ agent, err := NewCoderAgent(ctx)
+ return agent, CoderSystemPrompt(), err
+ }
+ return nil, "", fmt.Errorf("agent %s not found", name)
+}