This commit is contained in:
Ettore Di Giacinto
2025-04-08 22:18:32 +02:00
parent 894dde9256
commit e7111c6554
97 changed files with 329 additions and 329 deletions

View File

@@ -13,7 +13,7 @@ jobs:
goreleaser: goreleaser:
permissions: permissions:
contents: write contents: write
runs-on: arc-runner-localagent runs-on: arc-runner-localagi
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4

View File

@@ -11,7 +11,7 @@ concurrency:
cancel-in-progress: true cancel-in-progress: true
jobs: jobs:
containerImages: containerImages:
runs-on: arc-runner-localagent runs-on: arc-runner-localagi
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4

View File

@@ -12,7 +12,7 @@ concurrency:
cancel-in-progress: true cancel-in-progress: true
jobs: jobs:
test: test:
runs-on: arc-runner-localagent runs-on: arc-runner-localagi
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v2 uses: actions/checkout@v2

4
.gitignore vendored
View File

@@ -3,7 +3,7 @@ data/
pool pool
uploads/ uploads/
local-agent-framework local-agent-framework
localagent localagi
LocalAgent LocalAGI
**/.env **/.env
.vscode .vscode

View File

@@ -2,8 +2,8 @@
version: 2 version: 2
builds: builds:
- main: ./ - main: ./
id: "localagent" id: "localagi"
binary: localagent binary: localagi
ldflags: ldflags:
- -w -s - -w -s
# - -X github.com/internal.Version={{.Tag}} # - -X github.com/internal.Version={{.Tag}}

View File

@@ -45,14 +45,14 @@ COPY . .
COPY --from=ui-builder /app/dist /work/webui/react-ui/dist COPY --from=ui-builder /app/dist /work/webui/react-ui/dist
# Build the application # Build the application
RUN go build -ldflags="$LDFLAGS" -o localagent ./ RUN go build -ldflags="$LDFLAGS" -o localagi ./
FROM scratch FROM scratch
# Copy the webui binary from the builder stage to the final image # Copy the webui binary from the builder stage to the final image
COPY --from=builder /work/localagent /localagent COPY --from=builder /work/localagi /localagi
COPY --from=builder /etc/ssl/ /etc/ssl/ COPY --from=builder /etc/ssl/ /etc/ssl/
COPY --from=builder /tmp /tmp COPY --from=builder /tmp /tmp
# Define the command that will be run when the container is started # Define the command that will be run when the container is started
ENTRYPOINT ["/localagent"] ENTRYPOINT ["/localagi"]

View File

@@ -9,7 +9,7 @@ cleanup-tests:
docker compose down docker compose down
tests: prepare-tests tests: prepare-tests
LOCALAGENT_MODEL="arcee-agent" LOCALAI_API_URL="http://localhost:8081" LOCALAGENT_API_URL="http://localhost:8080" $(GOCMD) run github.com/onsi/ginkgo/v2/ginkgo --fail-fast -v -r ./... LOCALAGI_MODEL="arcee-agent" LOCALAI_API_URL="http://localhost:8081" LOCALAGI_API_URL="http://localhost:8080" $(GOCMD) run github.com/onsi/ginkgo/v2/ginkgo --fail-fast -v -r ./...
run-nokb: run-nokb:
$(MAKE) run KBDISABLEINDEX=true $(MAKE) run KBDISABLEINDEX=true
@@ -19,7 +19,7 @@ webui/react-ui/dist:
.PHONY: build .PHONY: build
build: webui/react-ui/dist build: webui/react-ui/dist
$(GOCMD) build -o localagent ./ $(GOCMD) build -o localagi ./
.PHONY: run .PHONY: run
run: webui/react-ui/dist run: webui/react-ui/dist

View File

@@ -96,21 +96,21 @@ Explore detailed documentation including:
| Variable | What It Does | | Variable | What It Does |
|----------|--------------| |----------|--------------|
| `LOCALAGENT_MODEL` | Your go-to model | | `LOCALAGI_MODEL` | Your go-to model |
| `LOCALAGENT_MULTIMODAL_MODEL` | Optional model for multimodal capabilities | | `LOCALAGI_MULTIMODAL_MODEL` | Optional model for multimodal capabilities |
| `LOCALAGENT_LLM_API_URL` | OpenAI-compatible API server URL | | `LOCALAGI_LLM_API_URL` | OpenAI-compatible API server URL |
| `LOCALAGENT_LLM_API_KEY` | API authentication | | `LOCALAGI_LLM_API_KEY` | API authentication |
| `LOCALAGENT_TIMEOUT` | Request timeout settings | | `LOCALAGI_TIMEOUT` | Request timeout settings |
| `LOCALAGENT_STATE_DIR` | Where state gets stored | | `LOCALAGI_STATE_DIR` | Where state gets stored |
| `LOCALAGENT_LOCALRAG_URL` | LocalRAG connection | | `LOCALAGI_LOCALRAG_URL` | LocalRAG connection |
| `LOCALAGENT_ENABLE_CONVERSATIONS_LOGGING` | Toggle conversation logs | | `LOCALAGI_ENABLE_CONVERSATIONS_LOGGING` | Toggle conversation logs |
| `LOCALAGENT_API_KEYS` | A comma separated list of api keys used for authentication | | `LOCALAGI_API_KEYS` | A comma separated list of api keys used for authentication |
## Installation Options ## Installation Options
### Pre-Built Binaries ### Pre-Built Binaries
Download ready-to-run binaries from the [Releases](https://github.com/mudler/LocalAgent/releases) page. Download ready-to-run binaries from the [Releases](https://github.com/mudler/LocalAGI/releases) page.
### Source Build ### Source Build
@@ -121,16 +121,16 @@ Requirements:
```bash ```bash
# Clone repo # Clone repo
git clone https://github.com/mudler/LocalAgent.git git clone https://github.com/mudler/LocalAGI.git
cd LocalAgent cd LocalAGI
# Build it # Build it
cd webui/react-ui && bun i && bun run build cd webui/react-ui && bun i && bun run build
cd ../.. cd ../..
go build -o localagent go build -o localagi
# Run it # Run it
./localagent ./localagi
``` ```
### Development ### Development
@@ -139,8 +139,8 @@ The development workflow is similar to the source build, but with additional ste
```bash ```bash
# Clone repo # Clone repo
git clone https://github.com/mudler/LocalAgent.git git clone https://github.com/mudler/LocalAGI.git
cd LocalAgent cd LocalAGI
# Install dependencies and start frontend development server # Install dependencies and start frontend development server
cd webui/react-ui && bun i && bun run dev cd webui/react-ui && bun i && bun run dev
@@ -216,7 +216,7 @@ Connect to IRC networks:
{ {
"server": "irc.example.com", "server": "irc.example.com",
"port": "6667", "port": "6667",
"nickname": "LocalAgentBot", "nickname": "LocalAGIBot",
"channel": "#yourchannel", "channel": "#yourchannel",
"alwaysReply": "false" "alwaysReply": "false"
} }

View File

@@ -5,9 +5,9 @@ import (
"fmt" "fmt"
"strings" "strings"
"github.com/mudler/LocalAgent/core/types" "github.com/mudler/LocalAGI/core/types"
"github.com/mudler/LocalAgent/pkg/config" "github.com/mudler/LocalAGI/pkg/config"
"github.com/mudler/LocalAgent/pkg/xlog" "github.com/mudler/LocalAGI/pkg/xlog"
"github.com/sashabaranov/go-openai/jsonschema" "github.com/sashabaranov/go-openai/jsonschema"
"github.com/traefik/yaegi/interp" "github.com/traefik/yaegi/interp"
"github.com/traefik/yaegi/stdlib" "github.com/traefik/yaegi/stdlib"

View File

@@ -3,8 +3,8 @@ package action_test
import ( import (
"context" "context"
. "github.com/mudler/LocalAgent/core/action" . "github.com/mudler/LocalAGI/core/action"
"github.com/mudler/LocalAgent/core/types" "github.com/mudler/LocalAGI/core/types"
. "github.com/onsi/ginkgo/v2" . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega" . "github.com/onsi/gomega"

View File

@@ -3,7 +3,7 @@ package action
import ( import (
"context" "context"
"github.com/mudler/LocalAgent/core/types" "github.com/mudler/LocalAGI/core/types"
"github.com/sashabaranov/go-openai/jsonschema" "github.com/sashabaranov/go-openai/jsonschema"
) )

View File

@@ -3,7 +3,7 @@ package action
import ( import (
"context" "context"
"github.com/mudler/LocalAgent/core/types" "github.com/mudler/LocalAGI/core/types"
"github.com/sashabaranov/go-openai/jsonschema" "github.com/sashabaranov/go-openai/jsonschema"
) )

View File

@@ -3,7 +3,7 @@ package action
import ( import (
"context" "context"
"github.com/mudler/LocalAgent/core/types" "github.com/mudler/LocalAGI/core/types"
) )
// StopActionName is the name of the action // StopActionName is the name of the action

View File

@@ -3,7 +3,7 @@ package action
import ( import (
"context" "context"
"github.com/mudler/LocalAgent/core/types" "github.com/mudler/LocalAGI/core/types"
"github.com/sashabaranov/go-openai/jsonschema" "github.com/sashabaranov/go-openai/jsonschema"
) )

View File

@@ -3,7 +3,7 @@ package action
import ( import (
"context" "context"
"github.com/mudler/LocalAgent/core/types" "github.com/mudler/LocalAGI/core/types"
"github.com/sashabaranov/go-openai/jsonschema" "github.com/sashabaranov/go-openai/jsonschema"
) )

View File

@@ -3,7 +3,7 @@ package action
import ( import (
"context" "context"
"github.com/mudler/LocalAgent/core/types" "github.com/mudler/LocalAGI/core/types"
"github.com/sashabaranov/go-openai/jsonschema" "github.com/sashabaranov/go-openai/jsonschema"
) )

View File

@@ -4,7 +4,7 @@ import (
"context" "context"
"fmt" "fmt"
"github.com/mudler/LocalAgent/core/types" "github.com/mudler/LocalAGI/core/types"
"github.com/sashabaranov/go-openai/jsonschema" "github.com/sashabaranov/go-openai/jsonschema"
) )

View File

@@ -6,10 +6,10 @@ import (
"fmt" "fmt"
"os" "os"
"github.com/mudler/LocalAgent/core/action" "github.com/mudler/LocalAGI/core/action"
"github.com/mudler/LocalAgent/core/types" "github.com/mudler/LocalAGI/core/types"
"github.com/mudler/LocalAgent/pkg/xlog" "github.com/mudler/LocalAGI/pkg/xlog"
"github.com/sashabaranov/go-openai" "github.com/sashabaranov/go-openai"
) )

View File

@@ -7,11 +7,11 @@ import (
"sync" "sync"
"time" "time"
"github.com/mudler/LocalAgent/pkg/xlog" "github.com/mudler/LocalAGI/pkg/xlog"
"github.com/mudler/LocalAgent/core/action" "github.com/mudler/LocalAGI/core/action"
"github.com/mudler/LocalAgent/core/types" "github.com/mudler/LocalAGI/core/types"
"github.com/mudler/LocalAgent/pkg/llm" "github.com/mudler/LocalAGI/pkg/llm"
"github.com/sashabaranov/go-openai" "github.com/sashabaranov/go-openai"
) )

View File

@@ -13,7 +13,7 @@ func TestAgent(t *testing.T) {
RunSpecs(t, "Agent test suite") RunSpecs(t, "Agent test suite")
} }
var testModel = os.Getenv("LOCALAGENT_MODEL") var testModel = os.Getenv("LOCALAGI_MODEL")
var apiURL = os.Getenv("LOCALAI_API_URL") var apiURL = os.Getenv("LOCALAI_API_URL")
var apiKeyURL = os.Getenv("LOCALAI_API_KEY") var apiKeyURL = os.Getenv("LOCALAI_API_KEY")

View File

@@ -6,11 +6,11 @@ import (
"strings" "strings"
"sync" "sync"
"github.com/mudler/LocalAgent/pkg/xlog" "github.com/mudler/LocalAGI/pkg/xlog"
"github.com/mudler/LocalAgent/services/actions" "github.com/mudler/LocalAGI/services/actions"
. "github.com/mudler/LocalAgent/core/agent" . "github.com/mudler/LocalAGI/core/agent"
"github.com/mudler/LocalAgent/core/types" "github.com/mudler/LocalAGI/core/types"
. "github.com/onsi/ginkgo/v2" . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega" . "github.com/onsi/gomega"
"github.com/sashabaranov/go-openai" "github.com/sashabaranov/go-openai"

View File

@@ -4,7 +4,7 @@ import (
"fmt" "fmt"
"os" "os"
"github.com/mudler/LocalAgent/pkg/llm" "github.com/mudler/LocalAGI/pkg/llm"
) )
func (a *Agent) generateIdentity(guidance string) error { func (a *Agent) generateIdentity(guidance string) error {

View File

@@ -6,7 +6,7 @@ import (
"path/filepath" "path/filepath"
"time" "time"
"github.com/mudler/LocalAgent/pkg/xlog" "github.com/mudler/LocalAGI/pkg/xlog"
"github.com/sashabaranov/go-openai" "github.com/sashabaranov/go-openai"
) )

View File

@@ -7,8 +7,8 @@ import (
mcp "github.com/metoro-io/mcp-golang" mcp "github.com/metoro-io/mcp-golang"
"github.com/metoro-io/mcp-golang/transport/http" "github.com/metoro-io/mcp-golang/transport/http"
"github.com/mudler/LocalAgent/core/types" "github.com/mudler/LocalAGI/core/types"
"github.com/mudler/LocalAgent/pkg/xlog" "github.com/mudler/LocalAGI/pkg/xlog"
"github.com/sashabaranov/go-openai/jsonschema" "github.com/sashabaranov/go-openai/jsonschema"
) )

View File

@@ -5,7 +5,7 @@ import (
"strings" "strings"
"time" "time"
"github.com/mudler/LocalAgent/core/types" "github.com/mudler/LocalAGI/core/types"
"github.com/sashabaranov/go-openai" "github.com/sashabaranov/go-openai"
) )

View File

@@ -6,7 +6,7 @@ import (
"os" "os"
"path/filepath" "path/filepath"
"github.com/mudler/LocalAgent/core/action" "github.com/mudler/LocalAGI/core/action"
"github.com/sashabaranov/go-openai/jsonschema" "github.com/sashabaranov/go-openai/jsonschema"
) )

View File

@@ -1,7 +1,7 @@
package agent_test package agent_test
import ( import (
. "github.com/mudler/LocalAgent/core/agent" . "github.com/mudler/LocalAGI/core/agent"
. "github.com/onsi/ginkgo/v2" . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega" . "github.com/onsi/gomega"
) )

View File

@@ -5,7 +5,7 @@ import (
"html/template" "html/template"
"time" "time"
"github.com/mudler/LocalAgent/core/types" "github.com/mudler/LocalAGI/core/types"
"github.com/sashabaranov/go-openai" "github.com/sashabaranov/go-openai"
) )

View File

@@ -3,9 +3,9 @@ package state
import ( import (
"encoding/json" "encoding/json"
"github.com/mudler/LocalAgent/core/agent" "github.com/mudler/LocalAGI/core/agent"
"github.com/mudler/LocalAgent/core/types" "github.com/mudler/LocalAGI/core/types"
"github.com/mudler/LocalAgent/pkg/config" "github.com/mudler/LocalAGI/pkg/config"
) )
type ConnectorConfig struct { type ConnectorConfig struct {
@@ -30,10 +30,10 @@ func (d DynamicPromptsConfig) ToMap() map[string]string {
} }
type AgentConfig struct { type AgentConfig struct {
Connector []ConnectorConfig `json:"connectors" form:"connectors" ` Connector []ConnectorConfig `json:"connectors" form:"connectors" `
Actions []ActionsConfig `json:"actions" form:"actions"` Actions []ActionsConfig `json:"actions" form:"actions"`
DynamicPrompts []DynamicPromptsConfig `json:"dynamic_prompts" form:"dynamic_prompts"` DynamicPrompts []DynamicPromptsConfig `json:"dynamic_prompts" form:"dynamic_prompts"`
MCPServers []agent.MCPServer `json:"mcp_servers" form:"mcp_servers"` MCPServers []agent.MCPServer `json:"mcp_servers" form:"mcp_servers"`
Description string `json:"description" form:"description"` Description string `json:"description" form:"description"`
@@ -71,8 +71,8 @@ type AgentConfigMeta struct {
} }
func NewAgentConfigMeta( func NewAgentConfigMeta(
actionsConfig []config.FieldGroup, actionsConfig []config.FieldGroup,
connectorsConfig []config.FieldGroup, connectorsConfig []config.FieldGroup,
dynamicPromptsConfig []config.FieldGroup, dynamicPromptsConfig []config.FieldGroup,
) AgentConfigMeta { ) AgentConfigMeta {
return AgentConfigMeta{ return AgentConfigMeta{

View File

@@ -1,7 +1,7 @@
package state package state
import ( import (
. "github.com/mudler/LocalAgent/core/agent" . "github.com/mudler/LocalAGI/core/agent"
) )
type AgentPoolInternalAPI struct { type AgentPoolInternalAPI struct {

View File

@@ -12,16 +12,16 @@ import (
"sync" "sync"
"time" "time"
. "github.com/mudler/LocalAgent/core/agent" . "github.com/mudler/LocalAGI/core/agent"
"github.com/mudler/LocalAgent/core/sse" "github.com/mudler/LocalAGI/core/sse"
"github.com/mudler/LocalAgent/core/types" "github.com/mudler/LocalAGI/core/types"
"github.com/mudler/LocalAgent/pkg/llm" "github.com/mudler/LocalAGI/pkg/llm"
"github.com/mudler/LocalAgent/pkg/localrag" "github.com/mudler/LocalAGI/pkg/localrag"
"github.com/mudler/LocalAgent/pkg/utils" "github.com/mudler/LocalAGI/pkg/utils"
"github.com/sashabaranov/go-openai" "github.com/sashabaranov/go-openai"
"github.com/sashabaranov/go-openai/jsonschema" "github.com/sashabaranov/go-openai/jsonschema"
"github.com/mudler/LocalAgent/pkg/xlog" "github.com/mudler/LocalAGI/pkg/xlog"
) )
type AgentPool struct { type AgentPool struct {

View File

@@ -49,7 +49,7 @@ services:
image: busybox image: busybox
command: ["sh", "-c", "until wget -q -O - http://localrecall:8080 > /dev/null 2>&1; do echo 'Waiting for localrecall...'; sleep 1; done; echo 'localrecall is up!'"] command: ["sh", "-c", "until wget -q -O - http://localrecall:8080 > /dev/null 2>&1; do echo 'Waiting for localrecall...'; sleep 1; done; echo 'localrecall is up!'"]
localagent: localagi:
depends_on: depends_on:
localai: localai:
condition: service_healthy condition: service_healthy
@@ -62,14 +62,14 @@ services:
- 8080:3000 - 8080:3000
image: quay.io/mudler/localagi:master image: quay.io/mudler/localagi:master
environment: environment:
- LOCALAGENT_MODEL=arcee-agent - LOCALAGI_MODEL=arcee-agent
- LOCALAGENT_LLM_API_URL=http://localai:8080 - LOCALAGI_LLM_API_URL=http://localai:8080
- LOCALAGENT_LLM_API_KEY=sk-1234567890 - LOCALAGI_LLM_API_KEY=sk-1234567890
- LOCALAGENT_LOCALRAG_URL=http://localrecall:8080 - LOCALAGI_LOCALRAG_URL=http://localrecall:8080
- LOCALAGENT_STATE_DIR=/pool - LOCALAGI_STATE_DIR=/pool
- LOCALAGENT_TIMEOUT=5m - LOCALAGI_TIMEOUT=5m
- LOCALAGENT_ENABLE_CONVERSATIONS_LOGGING=false - LOCALAGI_ENABLE_CONVERSATIONS_LOGGING=false
extra_hosts: extra_hosts:
- "host.docker.internal:host-gateway" - "host.docker.internal:host-gateway"
volumes: volumes:
- ./volumes/localagent/:/pool - ./volumes/localagi/:/pool

View File

@@ -58,7 +58,7 @@ services:
image: busybox image: busybox
command: ["sh", "-c", "until wget -q -O - http://localrecall:8080 > /dev/null 2>&1; do echo 'Waiting for localrecall...'; sleep 1; done; echo 'localrecall is up!'"] command: ["sh", "-c", "until wget -q -O - http://localrecall:8080 > /dev/null 2>&1; do echo 'Waiting for localrecall...'; sleep 1; done; echo 'localrecall is up!'"]
localagent: localagi:
depends_on: depends_on:
localai: localai:
condition: service_healthy condition: service_healthy
@@ -71,16 +71,16 @@ services:
- 8080:3000 - 8080:3000
image: quay.io/mudler/localagi:master image: quay.io/mudler/localagi:master
environment: environment:
- LOCALAGENT_MODEL=mlabonne_gemma-3-27b-it-abliterated - LOCALAGI_MODEL=mlabonne_gemma-3-27b-it-abliterated
- LOCALAGENT_LLM_API_URL=http://localai:8080 - LOCALAGI_LLM_API_URL=http://localai:8080
- LOCALAGENT_LLM_API_KEY=sk-1234567890 - LOCALAGI_LLM_API_KEY=sk-1234567890
- LOCALAGENT_LOCALRAG_URL=http://localrecall:8080 - LOCALAGI_LOCALRAG_URL=http://localrecall:8080
- LOCALAGENT_STATE_DIR=/pool - LOCALAGI_STATE_DIR=/pool
- LOCALAGENT_TIMEOUT=5m - LOCALAGI_TIMEOUT=5m
- LOCALAGENT_ENABLE_CONVERSATIONS_LOGGING=false - LOCALAGI_ENABLE_CONVERSATIONS_LOGGING=false
- LOCALAGENT_MULTIMODAL_MODEL=minicpm-v-2_6 - LOCALAGI_MULTIMODAL_MODEL=minicpm-v-2_6
- LOCALAGENT_IMAGE_MODEL=flux.1-dev - LOCALAGI_IMAGE_MODEL=flux.1-dev
extra_hosts: extra_hosts:
- "host.docker.internal:host-gateway" - "host.docker.internal:host-gateway"
volumes: volumes:
- ./volumes/localagent/:/pool - ./volumes/localagi/:/pool

View File

@@ -55,7 +55,7 @@ services:
image: busybox image: busybox
command: ["sh", "-c", "until wget -q -O - http://localrecall:8080 > /dev/null 2>&1; do echo 'Waiting for localrecall...'; sleep 1; done; echo 'localrecall is up!'"] command: ["sh", "-c", "until wget -q -O - http://localrecall:8080 > /dev/null 2>&1; do echo 'Waiting for localrecall...'; sleep 1; done; echo 'localrecall is up!'"]
localagent: localagi:
depends_on: depends_on:
localai: localai:
condition: service_healthy condition: service_healthy
@@ -68,14 +68,14 @@ services:
- 8080:3000 - 8080:3000
image: quay.io/mudler/localagi:master image: quay.io/mudler/localagi:master
environment: environment:
- LOCALAGENT_MODEL=arcee-agent - LOCALAGI_MODEL=arcee-agent
- LOCALAGENT_LLM_API_URL=http://localai:8080 - LOCALAGI_LLM_API_URL=http://localai:8080
- LOCALAGENT_LLM_API_KEY=sk-1234567890 - LOCALAGI_LLM_API_KEY=sk-1234567890
- LOCALAGENT_LOCALRAG_URL=http://localrecall:8080 - LOCALAGI_LOCALRAG_URL=http://localrecall:8080
- LOCALAGENT_STATE_DIR=/pool - LOCALAGI_STATE_DIR=/pool
- LOCALAGENT_TIMEOUT=5m - LOCALAGI_TIMEOUT=5m
- LOCALAGENT_ENABLE_CONVERSATIONS_LOGGING=false - LOCALAGI_ENABLE_CONVERSATIONS_LOGGING=false
extra_hosts: extra_hosts:
- "host.docker.internal:host-gateway" - "host.docker.internal:host-gateway"
volumes: volumes:
- ./volumes/localagent/:/pool - ./volumes/localagi/:/pool

2
go.mod
View File

@@ -1,4 +1,4 @@
module github.com/mudler/LocalAgent module github.com/mudler/LocalAGI
go 1.22.0 go 1.22.0

28
main.go
View File

@@ -6,22 +6,22 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"github.com/mudler/LocalAgent/core/state" "github.com/mudler/LocalAGI/core/state"
"github.com/mudler/LocalAgent/services" "github.com/mudler/LocalAGI/services"
"github.com/mudler/LocalAgent/webui" "github.com/mudler/LocalAGI/webui"
) )
var testModel = os.Getenv("LOCALAGENT_MODEL") var testModel = os.Getenv("LOCALAGI_MODEL")
var multimodalModel = os.Getenv("LOCALAGENT_MULTIMODAL_MODEL") var multimodalModel = os.Getenv("LOCALAGI_MULTIMODAL_MODEL")
var apiURL = os.Getenv("LOCALAGENT_LLM_API_URL") var apiURL = os.Getenv("LOCALAGI_LLM_API_URL")
var apiKey = os.Getenv("LOCALAGENT_LLM_API_KEY") var apiKey = os.Getenv("LOCALAGI_LLM_API_KEY")
var timeout = os.Getenv("LOCALAGENT_TIMEOUT") var timeout = os.Getenv("LOCALAGI_TIMEOUT")
var stateDir = os.Getenv("LOCALAGENT_STATE_DIR") var stateDir = os.Getenv("LOCALAGI_STATE_DIR")
var localRAG = os.Getenv("LOCALAGENT_LOCALRAG_URL") var localRAG = os.Getenv("LOCALAGI_LOCALRAG_URL")
var withLogs = os.Getenv("LOCALAGENT_ENABLE_CONVERSATIONS_LOGGING") == "true" var withLogs = os.Getenv("LOCALAGI_ENABLE_CONVERSATIONS_LOGGING") == "true"
var apiKeysEnv = os.Getenv("LOCALAGENT_API_KEYS") var apiKeysEnv = os.Getenv("LOCALAGI_API_KEYS")
var imageModel = os.Getenv("LOCALAGENT_IMAGE_MODEL") var imageModel = os.Getenv("LOCALAGI_IMAGE_MODEL")
var conversationDuration = os.Getenv("LOCALAGENT_CONVERSATION_DURATION") var conversationDuration = os.Getenv("LOCALAGI_CONVERSATION_DURATION")
func init() { func init() {
if testModel == "" { if testModel == "" {

View File

@@ -1,4 +1,4 @@
package localagent package localagi
import ( import (
"encoding/json" "encoding/json"

View File

@@ -1,4 +1,4 @@
package localagent package localagi
import ( import (
"fmt" "fmt"

View File

@@ -1,4 +1,4 @@
package localagent package localagi
import ( import (
"bytes" "bytes"
@@ -9,14 +9,14 @@ import (
"time" "time"
) )
// Client represents a client for the LocalAgent API // Client represents a client for the LocalAGI API
type Client struct { type Client struct {
BaseURL string BaseURL string
APIKey string APIKey string
HTTPClient *http.Client HTTPClient *http.Client
} }
// NewClient creates a new LocalAgent client // NewClient creates a new LocalAGI client
func NewClient(baseURL string, apiKey string, timeout time.Duration) *Client { func NewClient(baseURL string, apiKey string, timeout time.Duration) *Client {
if timeout == 0 { if timeout == 0 {
timeout = time.Second * 30 timeout = time.Second * 30

View File

@@ -1,4 +1,4 @@
package localagent package localagi
import ( import (
"encoding/json" "encoding/json"

View File

@@ -5,7 +5,7 @@ import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"github.com/mudler/LocalAgent/pkg/xlog" "github.com/mudler/LocalAGI/pkg/xlog"
"github.com/sashabaranov/go-openai" "github.com/sashabaranov/go-openai"
"github.com/sashabaranov/go-openai/jsonschema" "github.com/sashabaranov/go-openai/jsonschema"
) )

View File

@@ -15,8 +15,8 @@ import (
"path/filepath" "path/filepath"
"time" "time"
"github.com/mudler/LocalAgent/core/agent" "github.com/mudler/LocalAGI/core/agent"
"github.com/mudler/LocalAgent/pkg/xlog" "github.com/mudler/LocalAGI/pkg/xlog"
) )
var _ agent.RAGDB = &WrappedClient{} var _ agent.RAGDB = &WrappedClient{}

View File

@@ -1,7 +1,7 @@
package xstrings_test package xstrings_test
import ( import (
xtrings "github.com/mudler/LocalAgent/pkg/xstrings" xtrings "github.com/mudler/LocalAGI/pkg/xstrings"
. "github.com/onsi/ginkgo/v2" . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega" . "github.com/onsi/gomega"
) )

View File

@@ -5,13 +5,13 @@ import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"github.com/mudler/LocalAgent/core/action" "github.com/mudler/LocalAGI/core/action"
"github.com/mudler/LocalAgent/core/state" "github.com/mudler/LocalAGI/core/state"
"github.com/mudler/LocalAgent/core/types" "github.com/mudler/LocalAGI/core/types"
"github.com/mudler/LocalAgent/pkg/config" "github.com/mudler/LocalAGI/pkg/config"
"github.com/mudler/LocalAgent/pkg/xlog" "github.com/mudler/LocalAGI/pkg/xlog"
"github.com/mudler/LocalAgent/services/actions" "github.com/mudler/LocalAGI/services/actions"
) )
const ( const (

View File

@@ -6,7 +6,7 @@ import (
"io" "io"
"net/http" "net/http"
"github.com/mudler/LocalAgent/core/types" "github.com/mudler/LocalAGI/core/types"
"github.com/sashabaranov/go-openai/jsonschema" "github.com/sashabaranov/go-openai/jsonschema"
"jaytaylor.com/html2text" "jaytaylor.com/html2text"
) )

View File

@@ -4,8 +4,8 @@ import (
"context" "context"
"fmt" "fmt"
"github.com/mudler/LocalAgent/core/state" "github.com/mudler/LocalAGI/core/state"
"github.com/mudler/LocalAgent/core/types" "github.com/mudler/LocalAGI/core/types"
"github.com/sashabaranov/go-openai" "github.com/sashabaranov/go-openai"
"github.com/sashabaranov/go-openai/jsonschema" "github.com/sashabaranov/go-openai/jsonschema"
) )

View File

@@ -5,7 +5,7 @@ import (
"fmt" "fmt"
"sync" "sync"
"github.com/mudler/LocalAgent/core/types" "github.com/mudler/LocalAGI/core/types"
"github.com/sashabaranov/go-openai/jsonschema" "github.com/sashabaranov/go-openai/jsonschema"
) )

View File

@@ -4,8 +4,8 @@ import (
"context" "context"
"fmt" "fmt"
"github.com/mudler/LocalAgent/core/types" "github.com/mudler/LocalAGI/core/types"
"github.com/mudler/LocalAgent/pkg/config" "github.com/mudler/LocalAGI/pkg/config"
"github.com/sashabaranov/go-openai" "github.com/sashabaranov/go-openai"
"github.com/sashabaranov/go-openai/jsonschema" "github.com/sashabaranov/go-openai/jsonschema"
) )
@@ -109,20 +109,20 @@ func GenImageConfigMeta() []config.Field {
HelpText: "OpenAI API key for image generation", HelpText: "OpenAI API key for image generation",
}, },
{ {
Name: "apiURL", Name: "apiURL",
Label: "API URL", Label: "API URL",
Type: config.FieldTypeText, Type: config.FieldTypeText,
Required: true, Required: true,
DefaultValue: "https://api.openai.com/v1", DefaultValue: "https://api.openai.com/v1",
HelpText: "OpenAI API URL", HelpText: "OpenAI API URL",
}, },
{ {
Name: "model", Name: "model",
Label: "Model", Label: "Model",
Type: config.FieldTypeText, Type: config.FieldTypeText,
Required: true, Required: true,
DefaultValue: "dall-e-3", DefaultValue: "dall-e-3",
HelpText: "Image generation model to use (e.g., dall-e-3)", HelpText: "Image generation model to use (e.g., dall-e-3)",
}, },
} }
} }

View File

@@ -4,9 +4,9 @@ import (
"context" "context"
"os" "os"
"github.com/mudler/LocalAgent/core/types" "github.com/mudler/LocalAGI/core/types"
. "github.com/mudler/LocalAgent/services/actions" . "github.com/mudler/LocalAGI/services/actions"
. "github.com/onsi/ginkgo/v2" . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega" . "github.com/onsi/gomega"
) )

View File

@@ -5,8 +5,8 @@ import (
"fmt" "fmt"
"github.com/google/go-github/v69/github" "github.com/google/go-github/v69/github"
"github.com/mudler/LocalAgent/core/types" "github.com/mudler/LocalAGI/core/types"
"github.com/mudler/LocalAgent/pkg/config" "github.com/mudler/LocalAGI/pkg/config"
"github.com/sashabaranov/go-openai/jsonschema" "github.com/sashabaranov/go-openai/jsonschema"
) )

View File

@@ -5,8 +5,8 @@ import (
"fmt" "fmt"
"github.com/google/go-github/v69/github" "github.com/google/go-github/v69/github"
"github.com/mudler/LocalAgent/core/types" "github.com/mudler/LocalAGI/core/types"
"github.com/mudler/LocalAgent/pkg/config" "github.com/mudler/LocalAGI/pkg/config"
"github.com/sashabaranov/go-openai/jsonschema" "github.com/sashabaranov/go-openai/jsonschema"
) )

View File

@@ -6,9 +6,9 @@ import (
"strings" "strings"
"github.com/google/go-github/v69/github" "github.com/google/go-github/v69/github"
"github.com/mudler/LocalAgent/core/types" "github.com/mudler/LocalAGI/core/types"
"github.com/mudler/LocalAgent/pkg/config" "github.com/mudler/LocalAGI/pkg/config"
"github.com/mudler/LocalAgent/pkg/xlog" "github.com/mudler/LocalAGI/pkg/xlog"
"github.com/sashabaranov/go-openai/jsonschema" "github.com/sashabaranov/go-openai/jsonschema"
) )
@@ -147,10 +147,10 @@ func GithubIssueLabelerConfigMeta() []config.Field {
HelpText: "GitHub repository owner", HelpText: "GitHub repository owner",
}, },
{ {
Name: "availableLabels", Name: "availableLabels",
Label: "Available Labels", Label: "Available Labels",
Type: config.FieldTypeText, Type: config.FieldTypeText,
HelpText: "Comma-separated list of available labels", HelpText: "Comma-separated list of available labels",
DefaultValue: "bug,enhancement", DefaultValue: "bug,enhancement",
}, },
{ {

View File

@@ -5,8 +5,8 @@ import (
"fmt" "fmt"
"github.com/google/go-github/v69/github" "github.com/google/go-github/v69/github"
"github.com/mudler/LocalAgent/core/types" "github.com/mudler/LocalAGI/core/types"
"github.com/mudler/LocalAgent/pkg/config" "github.com/mudler/LocalAGI/pkg/config"
"github.com/sashabaranov/go-openai/jsonschema" "github.com/sashabaranov/go-openai/jsonschema"
) )

View File

@@ -5,8 +5,8 @@ import (
"fmt" "fmt"
"github.com/google/go-github/v69/github" "github.com/google/go-github/v69/github"
"github.com/mudler/LocalAgent/core/types" "github.com/mudler/LocalAGI/core/types"
"github.com/mudler/LocalAgent/pkg/config" "github.com/mudler/LocalAGI/pkg/config"
"github.com/sashabaranov/go-openai/jsonschema" "github.com/sashabaranov/go-openai/jsonschema"
) )

View File

@@ -5,9 +5,9 @@ import (
"fmt" "fmt"
"github.com/google/go-github/v69/github" "github.com/google/go-github/v69/github"
"github.com/mudler/LocalAgent/core/types" "github.com/mudler/LocalAGI/core/types"
"github.com/mudler/LocalAgent/pkg/config" "github.com/mudler/LocalAGI/pkg/config"
"github.com/mudler/LocalAgent/pkg/xlog" "github.com/mudler/LocalAGI/pkg/xlog"
"github.com/sashabaranov/go-openai/jsonschema" "github.com/sashabaranov/go-openai/jsonschema"
) )

View File

@@ -5,8 +5,8 @@ import (
"fmt" "fmt"
"github.com/google/go-github/v69/github" "github.com/google/go-github/v69/github"
"github.com/mudler/LocalAgent/core/types" "github.com/mudler/LocalAGI/core/types"
"github.com/mudler/LocalAgent/pkg/config" "github.com/mudler/LocalAGI/pkg/config"
"github.com/sashabaranov/go-openai/jsonschema" "github.com/sashabaranov/go-openai/jsonschema"
) )
@@ -51,7 +51,7 @@ func (g *GithubRepositoryCreateOrUpdateContent) Run(ctx context.Context, params
} }
if result.CommitMessage == "" { if result.CommitMessage == "" {
result.CommitMessage = "LocalAgent commit" result.CommitMessage = "LocalAGI commit"
} }
if g.repository != "" && g.owner != "" { if g.repository != "" && g.owner != "" {

View File

@@ -5,8 +5,8 @@ import (
"fmt" "fmt"
"github.com/google/go-github/v69/github" "github.com/google/go-github/v69/github"
"github.com/mudler/LocalAgent/core/types" "github.com/mudler/LocalAGI/core/types"
"github.com/mudler/LocalAgent/pkg/config" "github.com/mudler/LocalAGI/pkg/config"
"github.com/sashabaranov/go-openai/jsonschema" "github.com/sashabaranov/go-openai/jsonschema"
) )

View File

@@ -5,8 +5,8 @@ import (
"fmt" "fmt"
"github.com/google/go-github/v69/github" "github.com/google/go-github/v69/github"
"github.com/mudler/LocalAgent/core/types" "github.com/mudler/LocalAGI/core/types"
"github.com/mudler/LocalAgent/pkg/config" "github.com/mudler/LocalAGI/pkg/config"
"github.com/sashabaranov/go-openai/jsonschema" "github.com/sashabaranov/go-openai/jsonschema"
) )

View File

@@ -4,7 +4,7 @@ import (
"context" "context"
"fmt" "fmt"
"github.com/mudler/LocalAgent/core/types" "github.com/mudler/LocalAGI/core/types"
"github.com/sashabaranov/go-openai/jsonschema" "github.com/sashabaranov/go-openai/jsonschema"
"github.com/tmc/langchaingo/tools/scraper" "github.com/tmc/langchaingo/tools/scraper"
) )

View File

@@ -6,8 +6,8 @@ import (
"log/slog" "log/slog"
"strings" "strings"
"github.com/mudler/LocalAgent/core/types" "github.com/mudler/LocalAGI/core/types"
"github.com/mudler/LocalAgent/pkg/config" "github.com/mudler/LocalAGI/pkg/config"
"github.com/sashabaranov/go-openai/jsonschema" "github.com/sashabaranov/go-openai/jsonschema"
"github.com/tmc/langchaingo/tools/duckduckgo" "github.com/tmc/langchaingo/tools/duckduckgo"
"mvdan.cc/xurls/v2" "mvdan.cc/xurls/v2"
@@ -45,7 +45,7 @@ func (a *SearchAction) Run(ctx context.Context, params types.ActionParams) (type
return types.ActionResult{}, err return types.ActionResult{}, err
} }
ddg, err := duckduckgo.New(a.results, "LocalAgent") ddg, err := duckduckgo.New(a.results, "LocalAGI")
if err != nil { if err != nil {
fmt.Printf("error: %v", err) fmt.Printf("error: %v", err)

View File

@@ -5,8 +5,8 @@ import (
"fmt" "fmt"
"net/smtp" "net/smtp"
"github.com/mudler/LocalAgent/core/types" "github.com/mudler/LocalAGI/core/types"
"github.com/mudler/LocalAgent/pkg/config" "github.com/mudler/LocalAGI/pkg/config"
"github.com/sashabaranov/go-openai/jsonschema" "github.com/sashabaranov/go-openai/jsonschema"
) )
@@ -93,12 +93,12 @@ func SendMailConfigMeta() []config.Field {
HelpText: "SMTP server host (e.g., smtp.gmail.com)", HelpText: "SMTP server host (e.g., smtp.gmail.com)",
}, },
{ {
Name: "smtpPort", Name: "smtpPort",
Label: "SMTP Port", Label: "SMTP Port",
Type: config.FieldTypeText, Type: config.FieldTypeText,
Required: true, Required: true,
DefaultValue: "587", DefaultValue: "587",
HelpText: "SMTP server port (e.g., 587)", HelpText: "SMTP server port (e.g., 587)",
}, },
{ {
Name: "username", Name: "username",

View File

@@ -5,8 +5,8 @@ import (
"fmt" "fmt"
"log" "log"
"github.com/mudler/LocalAgent/core/types" "github.com/mudler/LocalAGI/core/types"
"github.com/mudler/LocalAgent/pkg/config" "github.com/mudler/LocalAGI/pkg/config"
"github.com/sashabaranov/go-openai/jsonschema" "github.com/sashabaranov/go-openai/jsonschema"
"golang.org/x/crypto/ssh" "golang.org/x/crypto/ssh"
) )

View File

@@ -4,9 +4,9 @@ import (
"context" "context"
"fmt" "fmt"
"github.com/mudler/LocalAgent/core/types" "github.com/mudler/LocalAGI/core/types"
"github.com/mudler/LocalAgent/pkg/config" "github.com/mudler/LocalAGI/pkg/config"
"github.com/mudler/LocalAgent/services/connectors/twitter" "github.com/mudler/LocalAGI/services/connectors/twitter"
"github.com/sashabaranov/go-openai/jsonschema" "github.com/sashabaranov/go-openai/jsonschema"
) )
@@ -75,9 +75,9 @@ func TwitterPostConfigMeta() []config.Field {
HelpText: "Twitter API token for posting tweets", HelpText: "Twitter API token for posting tweets",
}, },
{ {
Name: "noCharacterLimit", Name: "noCharacterLimit",
Label: "No Character Limit", Label: "No Character Limit",
Type: config.FieldTypeCheckbox, Type: config.FieldTypeCheckbox,
HelpText: "If checked, tweets longer than the character limit will be split into multiple tweets", HelpText: "If checked, tweets longer than the character limit will be split into multiple tweets",
}, },
} }

View File

@@ -4,7 +4,7 @@ import (
"context" "context"
"fmt" "fmt"
"github.com/mudler/LocalAgent/core/types" "github.com/mudler/LocalAGI/core/types"
"github.com/sashabaranov/go-openai/jsonschema" "github.com/sashabaranov/go-openai/jsonschema"
"github.com/tmc/langchaingo/tools/wikipedia" "github.com/tmc/langchaingo/tools/wikipedia"
) )
@@ -25,7 +25,7 @@ func (a *WikipediaAction) Run(ctx context.Context, params types.ActionParams) (t
return types.ActionResult{}, err return types.ActionResult{}, err
} }
wiki := wikipedia.New("LocalAgent") wiki := wikipedia.New("LocalAGI")
res, err := wiki.Call(ctx, result.Query) res, err := wiki.Call(ctx, result.Query)
if err != nil { if err != nil {
fmt.Printf("error: %v", err) fmt.Printf("error: %v", err)

View File

@@ -3,11 +3,11 @@ package services
import ( import (
"encoding/json" "encoding/json"
"github.com/mudler/LocalAgent/pkg/config" "github.com/mudler/LocalAGI/pkg/config"
"github.com/mudler/LocalAgent/pkg/xlog" "github.com/mudler/LocalAGI/pkg/xlog"
"github.com/mudler/LocalAgent/services/connectors" "github.com/mudler/LocalAGI/services/connectors"
"github.com/mudler/LocalAgent/core/state" "github.com/mudler/LocalAGI/core/state"
) )
const ( const (

View File

@@ -5,7 +5,7 @@ import (
"sync" "sync"
"time" "time"
"github.com/mudler/LocalAgent/pkg/xlog" "github.com/mudler/LocalAGI/pkg/xlog"
"github.com/sashabaranov/go-openai" "github.com/sashabaranov/go-openai"
) )

View File

@@ -3,7 +3,7 @@ package connectors_test
import ( import (
"time" "time"
"github.com/mudler/LocalAgent/services/connectors" "github.com/mudler/LocalAGI/services/connectors"
. "github.com/onsi/ginkgo/v2" . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega" . "github.com/onsi/gomega"
"github.com/sashabaranov/go-openai" "github.com/sashabaranov/go-openai"

View File

@@ -6,10 +6,10 @@ import (
"time" "time"
"github.com/bwmarrin/discordgo" "github.com/bwmarrin/discordgo"
"github.com/mudler/LocalAgent/core/agent" "github.com/mudler/LocalAGI/core/agent"
"github.com/mudler/LocalAgent/core/types" "github.com/mudler/LocalAGI/core/types"
"github.com/mudler/LocalAgent/pkg/config" "github.com/mudler/LocalAGI/pkg/config"
"github.com/mudler/LocalAgent/pkg/xlog" "github.com/mudler/LocalAGI/pkg/xlog"
"github.com/sashabaranov/go-openai" "github.com/sashabaranov/go-openai"
) )

View File

@@ -6,10 +6,10 @@ import (
"time" "time"
"github.com/google/go-github/v69/github" "github.com/google/go-github/v69/github"
"github.com/mudler/LocalAgent/core/agent" "github.com/mudler/LocalAGI/core/agent"
"github.com/mudler/LocalAgent/core/types" "github.com/mudler/LocalAGI/core/types"
"github.com/mudler/LocalAgent/pkg/config" "github.com/mudler/LocalAGI/pkg/config"
"github.com/mudler/LocalAgent/pkg/xlog" "github.com/mudler/LocalAGI/pkg/xlog"
"github.com/sashabaranov/go-openai" "github.com/sashabaranov/go-openai"
) )

View File

@@ -6,10 +6,10 @@ import (
"time" "time"
"github.com/google/go-github/v69/github" "github.com/google/go-github/v69/github"
"github.com/mudler/LocalAgent/core/agent" "github.com/mudler/LocalAGI/core/agent"
"github.com/mudler/LocalAgent/core/types" "github.com/mudler/LocalAGI/core/types"
"github.com/mudler/LocalAgent/pkg/config" "github.com/mudler/LocalAGI/pkg/config"
"github.com/mudler/LocalAgent/pkg/xlog" "github.com/mudler/LocalAGI/pkg/xlog"
"github.com/sashabaranov/go-openai" "github.com/sashabaranov/go-openai"
) )

View File

@@ -5,11 +5,11 @@ import (
"strings" "strings"
"time" "time"
"github.com/mudler/LocalAgent/core/agent" "github.com/mudler/LocalAGI/core/agent"
"github.com/mudler/LocalAgent/core/types" "github.com/mudler/LocalAGI/core/types"
"github.com/mudler/LocalAgent/pkg/config" "github.com/mudler/LocalAGI/pkg/config"
"github.com/mudler/LocalAgent/pkg/xlog" "github.com/mudler/LocalAGI/pkg/xlog"
"github.com/mudler/LocalAgent/services/actions" "github.com/mudler/LocalAGI/services/actions"
"github.com/sashabaranov/go-openai" "github.com/sashabaranov/go-openai"
irc "github.com/thoj/go-ircevent" irc "github.com/thoj/go-ircevent"
) )

View File

@@ -10,14 +10,14 @@ import (
"sync" "sync"
"time" "time"
"github.com/mudler/LocalAgent/pkg/config" "github.com/mudler/LocalAGI/pkg/config"
"github.com/mudler/LocalAgent/pkg/xlog" "github.com/mudler/LocalAGI/pkg/xlog"
"github.com/mudler/LocalAgent/pkg/xstrings" "github.com/mudler/LocalAGI/pkg/xstrings"
"github.com/mudler/LocalAgent/services/actions" "github.com/mudler/LocalAGI/services/actions"
"github.com/sashabaranov/go-openai" "github.com/sashabaranov/go-openai"
"github.com/mudler/LocalAgent/core/agent" "github.com/mudler/LocalAGI/core/agent"
"github.com/mudler/LocalAgent/core/types" "github.com/mudler/LocalAGI/core/types"
"github.com/slack-go/slack/socketmode" "github.com/slack-go/slack/socketmode"

View File

@@ -12,12 +12,12 @@ import (
"github.com/go-telegram/bot" "github.com/go-telegram/bot"
"github.com/go-telegram/bot/models" "github.com/go-telegram/bot/models"
"github.com/mudler/LocalAgent/core/agent" "github.com/mudler/LocalAGI/core/agent"
"github.com/mudler/LocalAgent/core/types" "github.com/mudler/LocalAGI/core/types"
"github.com/mudler/LocalAgent/pkg/config" "github.com/mudler/LocalAGI/pkg/config"
"github.com/mudler/LocalAgent/pkg/xlog" "github.com/mudler/LocalAGI/pkg/xlog"
"github.com/mudler/LocalAgent/pkg/xstrings" "github.com/mudler/LocalAGI/pkg/xstrings"
"github.com/mudler/LocalAgent/services/actions" "github.com/mudler/LocalAGI/services/actions"
"github.com/sashabaranov/go-openai" "github.com/sashabaranov/go-openai"
) )
@@ -215,9 +215,9 @@ func TelegramConfigMeta() []config.Field {
Required: true, Required: true,
}, },
{ {
Name: "admins", Name: "admins",
Label: "Admins", Label: "Admins",
Type: config.FieldTypeText, Type: config.FieldTypeText,
HelpText: "Comma-separated list of Telegram usernames that are allowed to interact with the bot", HelpText: "Comma-separated list of Telegram usernames that are allowed to interact with the bot",
}, },
{ {

View File

@@ -6,11 +6,11 @@ import (
"os" "os"
"os/signal" "os/signal"
"github.com/mudler/LocalAgent/core/agent" "github.com/mudler/LocalAGI/core/agent"
"github.com/mudler/LocalAgent/core/types" "github.com/mudler/LocalAGI/core/types"
"github.com/mudler/LocalAgent/pkg/config" "github.com/mudler/LocalAGI/pkg/config"
"github.com/mudler/LocalAgent/pkg/xlog" "github.com/mudler/LocalAGI/pkg/xlog"
"github.com/mudler/LocalAgent/services/connectors/twitter" "github.com/mudler/LocalAGI/services/connectors/twitter"
"github.com/sashabaranov/go-openai" "github.com/sashabaranov/go-openai"
) )

View File

@@ -3,12 +3,12 @@ package services
import ( import (
"encoding/json" "encoding/json"
"github.com/mudler/LocalAgent/pkg/config" "github.com/mudler/LocalAGI/pkg/config"
"github.com/mudler/LocalAgent/pkg/xlog" "github.com/mudler/LocalAGI/pkg/xlog"
"github.com/mudler/LocalAgent/services/prompts" "github.com/mudler/LocalAGI/services/prompts"
"github.com/mudler/LocalAgent/core/agent" "github.com/mudler/LocalAGI/core/agent"
"github.com/mudler/LocalAgent/core/state" "github.com/mudler/LocalAGI/core/state"
) )
const ( const (
@@ -21,7 +21,7 @@ var AvailableBlockPrompts = []string{
func DynamicPromptsConfigMeta() []config.FieldGroup { func DynamicPromptsConfigMeta() []config.FieldGroup {
return []config.FieldGroup{ return []config.FieldGroup{
prompts.NewDynamicPromptConfigMeta(), prompts.NewDynamicPromptConfigMeta(),
} }
} }

View File

@@ -4,9 +4,9 @@ import (
"fmt" "fmt"
"strings" "strings"
"github.com/mudler/LocalAgent/core/agent" "github.com/mudler/LocalAGI/core/agent"
"github.com/mudler/LocalAgent/pkg/config" "github.com/mudler/LocalAGI/pkg/config"
"github.com/mudler/LocalAgent/pkg/xlog" "github.com/mudler/LocalAGI/pkg/xlog"
"github.com/traefik/yaegi/interp" "github.com/traefik/yaegi/interp"
"github.com/traefik/yaegi/stdlib" "github.com/traefik/yaegi/stdlib"
) )
@@ -50,33 +50,33 @@ func (a *DynamicPrompt) callInit() error {
} }
func NewDynamicPromptConfigMeta() config.FieldGroup { func NewDynamicPromptConfigMeta() config.FieldGroup {
return config.FieldGroup { return config.FieldGroup{
Name: "custom", Name: "custom",
Label: "Custom Prompt", Label: "Custom Prompt",
Fields: []config.Field{ Fields: []config.Field{
{ {
Name: "name", Name: "name",
Label: "Name", Label: "Name",
Type: config.FieldTypeText, Type: config.FieldTypeText,
Required: true, Required: true,
HelpText: "A unique name for your custom prompt", HelpText: "A unique name for your custom prompt",
Placeholder: "Enter a unique name", Placeholder: "Enter a unique name",
}, },
{ {
Name: "code", Name: "code",
Label: "Go Code", Label: "Go Code",
Type: config.FieldTypeTextarea, Type: config.FieldTypeTextarea,
Required: true, Required: true,
HelpText: "Enter code that implements the Render and Role functions here", HelpText: "Enter code that implements the Render and Role functions here",
Placeholder: "Write your Go code here", Placeholder: "Write your Go code here",
}, },
{ {
Name: "unsafe", Name: "unsafe",
Label: "Unsafe Code", Label: "Unsafe Code",
Type: config.FieldTypeCheckbox, Type: config.FieldTypeCheckbox,
Required: false, Required: false,
HelpText: "Enable if the code needs to use unsafe Go features", HelpText: "Enable if the code needs to use unsafe Go features",
}, },
}, },
} }
} }

View File

@@ -6,12 +6,12 @@
## When configuring the connector, supply the tokens with: ## When configuring the connector, supply the tokens with:
## { "botToken": "OAuth Tokens for Your Workspace", "appToken": "App-Level Tokens" } ## { "botToken": "OAuth Tokens for Your Workspace", "appToken": "App-Level Tokens" }
display_information: display_information:
name: LocalAgent name: LocalAGI
description: LocalAgent bot description: LocalAGI bot
background_color: "#0040ff" background_color: "#0040ff"
features: features:
bot_user: bot_user:
display_name: LocalAgent display_name: LocalAGI
always_online: true always_online: true
oauth_config: oauth_config:
scopes: scopes:

View File

@@ -13,9 +13,9 @@ func TestE2E(t *testing.T) {
RunSpecs(t, "E2E test suite") RunSpecs(t, "E2E test suite")
} }
var testModel = os.Getenv("LOCALAGENT_MODEL") var testModel = os.Getenv("LOCALAGI_MODEL")
var apiURL = os.Getenv("LOCALAI_API_URL") var apiURL = os.Getenv("LOCALAI_API_URL")
var localagentURL = os.Getenv("LOCALAGENT_API_URL") var localagiURL = os.Getenv("LOCALAGI_API_URL")
func init() { func init() {
if testModel == "" { if testModel == "" {

View File

@@ -3,7 +3,7 @@ package e2e_test
import ( import (
"time" "time"
localagent "github.com/mudler/LocalAgent/pkg/client" localagi "github.com/mudler/LocalAGI/pkg/client"
. "github.com/onsi/ginkgo/v2" . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega" . "github.com/onsi/gomega"
@@ -12,9 +12,9 @@ import (
var _ = Describe("Agent test", func() { var _ = Describe("Agent test", func() {
Context("Creates an agent and it answers", func() { Context("Creates an agent and it answers", func() {
It("create agent", func() { It("create agent", func() {
client := localagent.NewClient(localagentURL, "", 5*time.Minute) client := localagi.NewClient(localagiURL, "", 5*time.Minute)
err := client.CreateAgent(&localagent.AgentConfig{ err := client.CreateAgent(&localagi.AgentConfig{
Name: "testagent", Name: "testagent",
}) })
Expect(err).ToNot(HaveOccurred()) Expect(err).ToNot(HaveOccurred())

View File

@@ -11,17 +11,17 @@ import (
"time" "time"
"github.com/google/uuid" "github.com/google/uuid"
coreTypes "github.com/mudler/LocalAgent/core/types" coreTypes "github.com/mudler/LocalAGI/core/types"
"github.com/mudler/LocalAgent/pkg/llm" "github.com/mudler/LocalAGI/pkg/llm"
"github.com/mudler/LocalAgent/pkg/xlog" "github.com/mudler/LocalAGI/pkg/xlog"
"github.com/mudler/LocalAgent/services" "github.com/mudler/LocalAGI/services"
"github.com/mudler/LocalAgent/services/connectors" "github.com/mudler/LocalAGI/services/connectors"
"github.com/mudler/LocalAgent/webui/types" "github.com/mudler/LocalAGI/webui/types"
"github.com/sashabaranov/go-openai" "github.com/sashabaranov/go-openai"
"github.com/sashabaranov/go-openai/jsonschema" "github.com/sashabaranov/go-openai/jsonschema"
"github.com/mudler/LocalAgent/core/sse" "github.com/mudler/LocalAGI/core/sse"
"github.com/mudler/LocalAgent/core/state" "github.com/mudler/LocalAGI/core/state"
"github.com/donseba/go-htmx" "github.com/donseba/go-htmx"
fiber "github.com/gofiber/fiber/v2" fiber "github.com/gofiber/fiber/v2"

View File

@@ -1,7 +1,7 @@
/** /**
* Connector Templates * Connector Templates
* *
* This file contains templates for all connector types supported by LocalAgent. * This file contains templates for all connector types supported by LocalAGI.
* Each template is a function that returns an HTML string for the connector's form. * Each template is a function that returns an HTML string for the connector's form.
* *
* Note: We don't need to escape HTML in the value attributes because browsers * Note: We don't need to escape HTML in the value attributes because browsers

View File

@@ -62,7 +62,7 @@
</section> </section>
<footer class="text-center text-gray-500 text-sm mb-8"> <footer class="text-center text-gray-500 text-sm mb-8">
<p>&copy; 2025 LocalAgent.</p> <p>&copy; 2025 LocalAGI.</p>
</footer> </footer>
</div> </div>

View File

@@ -157,7 +157,7 @@
</div> </div>
<footer class="text-center text-gray-500 text-sm mb-8"> <footer class="text-center text-gray-500 text-sm mb-8">
<p>&copy; 2025 LocalAgent.</p> <p>&copy; 2025 LocalAGI.</p>
</footer> </footer>
</div> </div>

View File

@@ -140,7 +140,7 @@
<img src="/old/public/logo_1.png" width="250" alt="Company Logo"> <img src="/old/public/logo_1.png" width="250" alt="Company Logo">
</div> </div>
<h1 class="dashboard-title">LocalAgent</h1> <h1 class="dashboard-title">LocalAGI</h1>
<!-- Simple stats display --> <!-- Simple stats display -->
<div class="dashboard-stats"> <div class="dashboard-stats">

View File

@@ -16,7 +16,7 @@
</div> </div>
</div> </div>
<span class="text-xl font-bold transition-colors duration-300" <span class="text-xl font-bold transition-colors duration-300"
style="color: var(--primary); text-shadow: var(--neon-glow);">LocalAgent</span> style="color: var(--primary); text-shadow: var(--neon-glow);">LocalAGI</span>
</a> </a>
</div> </div>
<div class="hidden md:block ml-10"> <div class="hidden md:block ml-10">

View File

@@ -3,7 +3,7 @@ package webui
import ( import (
"time" "time"
"github.com/mudler/LocalAgent/core/state" "github.com/mudler/LocalAGI/core/state"
) )
type Config struct { type Config struct {

View File

@@ -31,7 +31,7 @@ function App() {
<div className="logo-image-container"> <div className="logo-image-container">
<img src="/app/logo_2.png" alt="Logo" className="logo-image" /> <img src="/app/logo_2.png" alt="Logo" className="logo-image" />
</div> </div>
{/* <span className="logo-text">LocalAgent</span> */} {/* <span className="logo-text">LocalAGI</span> */}
</Link> </Link>
</div> </div>

View File

@@ -15,9 +15,9 @@ function ActionsPlayground() {
// Update document title // Update document title
useEffect(() => { useEffect(() => {
document.title = 'Actions Playground - LocalAgent'; document.title = 'Actions Playground - LocalAGI';
return () => { return () => {
document.title = 'LocalAgent'; // Reset title when component unmounts document.title = 'LocalAGI'; // Reset title when component unmounts
}; };
}, []); }, []);

View File

@@ -14,10 +14,10 @@ function AgentSettings() {
// Update document title // Update document title
useEffect(() => { useEffect(() => {
if (name) { if (name) {
document.title = `Agent Settings: ${name} - LocalAgent`; document.title = `Agent Settings: ${name} - LocalAGI`;
} }
return () => { return () => {
document.title = 'LocalAgent'; // Reset title when component unmounts document.title = 'LocalAGI'; // Reset title when component unmounts
}; };
}, [name]); }, [name]);

View File

@@ -13,10 +13,10 @@ function AgentStatus() {
// Update document title // Update document title
useEffect(() => { useEffect(() => {
if (name) { if (name) {
document.title = `Agent Status: ${name} - LocalAgent`; document.title = `Agent Status: ${name} - LocalAGI`;
} }
return () => { return () => {
document.title = 'LocalAgent'; // Reset title when component unmounts document.title = 'LocalAGI'; // Reset title when component unmounts
}; };
}, [name]); }, [name]);

View File

@@ -96,9 +96,9 @@ function AgentsList() {
}; };
useEffect(() => { useEffect(() => {
document.title = 'Agents - LocalAgent'; document.title = 'Agents - LocalAGI';
return () => { return () => {
document.title = 'LocalAgent'; // Reset title when component unmounts document.title = 'LocalAGI'; // Reset title when component unmounts
}; };
}, []); }, []);

View File

@@ -23,10 +23,10 @@ function Chat() {
// Update document title // Update document title
useEffect(() => { useEffect(() => {
if (name) { if (name) {
document.title = `Chat with ${name} - LocalAgent`; document.title = `Chat with ${name} - LocalAGI`;
} }
return () => { return () => {
document.title = 'LocalAgent'; // Reset title when component unmounts document.title = 'LocalAGI'; // Reset title when component unmounts
}; };
}, [name]); }, [name]);

View File

@@ -11,9 +11,9 @@ function CreateAgent() {
const [formData, setFormData] = useState({}); const [formData, setFormData] = useState({});
useEffect(() => { useEffect(() => {
document.title = 'Create Agent - LocalAgent'; document.title = 'Create Agent - LocalAGI';
return () => { return () => {
document.title = 'LocalAgent'; // Reset title when component unmounts document.title = 'LocalAGI'; // Reset title when component unmounts
}; };
}, []); }, []);

View File

@@ -23,9 +23,9 @@ function GroupCreate() {
// Update document title // Update document title
useEffect(() => { useEffect(() => {
document.title = 'Create Agent Group - LocalAgent'; document.title = 'Create Agent Group - LocalAGI';
return () => { return () => {
document.title = 'LocalAgent'; // Reset title when component unmounts document.title = 'LocalAGI'; // Reset title when component unmounts
}; };
}, []); }, []);

View File

@@ -16,9 +16,9 @@ function Home() {
// Update document title // Update document title
useEffect(() => { useEffect(() => {
document.title = 'Agent Dashboard - LocalAgent'; document.title = 'Agent Dashboard - LocalAGI';
return () => { return () => {
document.title = 'LocalAgent'; // Reset title when component unmounts document.title = 'LocalAGI'; // Reset title when component unmounts
}; };
}, []); }, []);
@@ -57,10 +57,10 @@ function Home() {
return ( return (
<div> <div>
<div className="image-container"> <div className="image-container">
<img src="/app/logo_1.png" width="250" alt="LocalAgent Logo" /> <img src="/app/logo_1.png" width="250" alt="LocalAGI Logo" />
</div> </div>
{/*<h1 className="dashboard-title">LocalAgent</h1>*/} {/*<h1 className="dashboard-title">LocalAGI</h1>*/}
{/* Dashboard Stats */} {/* Dashboard Stats */}
<div className="dashboard-stats"> <div className="dashboard-stats">

View File

@@ -10,9 +10,9 @@ function ImportAgent() {
// Update document title // Update document title
useEffect(() => { useEffect(() => {
document.title = 'Import Agent - LocalAgent'; document.title = 'Import Agent - LocalAGI';
return () => { return () => {
document.title = 'LocalAgent'; // Reset title when component unmounts document.title = 'LocalAGI'; // Reset title when component unmounts
}; };
}, []); }, []);

View File

@@ -12,13 +12,13 @@ import (
fiber "github.com/gofiber/fiber/v2" fiber "github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/filesystem" "github.com/gofiber/fiber/v2/middleware/filesystem"
"github.com/gofiber/fiber/v2/middleware/keyauth" "github.com/gofiber/fiber/v2/middleware/keyauth"
"github.com/mudler/LocalAgent/core/sse" "github.com/mudler/LocalAGI/core/sse"
"github.com/mudler/LocalAgent/services/connectors" "github.com/mudler/LocalAGI/services/connectors"
"github.com/mudler/LocalAgent/core/state" "github.com/mudler/LocalAGI/core/state"
"github.com/mudler/LocalAgent/core/types" "github.com/mudler/LocalAGI/core/types"
"github.com/mudler/LocalAgent/pkg/xlog" "github.com/mudler/LocalAGI/pkg/xlog"
"github.com/mudler/LocalAgent/services" "github.com/mudler/LocalAGI/services"
) )
//go:embed old/views/* //go:embed old/views/*