Compare commits
18 Commits
fix-mcp-co
...
mcp
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9bea6c7322 | ||
|
|
0ab7a615f0 | ||
|
|
b4b77c564e | ||
|
|
24c3e41d27 | ||
|
|
ebf26ebb64 | ||
|
|
3e80bd9608 | ||
|
|
34d0954171 | ||
|
|
9b7344fbdf | ||
|
|
608d7aba85 | ||
|
|
bd903a3f33 | ||
|
|
0e1106eaf5 | ||
|
|
e9cd6a1073 | ||
|
|
4b727116cd | ||
|
|
3ebeb82f0d | ||
|
|
6d9c58e6c0 | ||
|
|
02490ea8a2 | ||
|
|
eec88d74fe | ||
|
|
33b8aaddfe |
2
.github/workflows/tests.yml
vendored
2
.github/workflows/tests.yml
vendored
@@ -15,7 +15,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v2
|
||||||
- run: |
|
- run: |
|
||||||
# Add Docker's official GPG key:
|
# Add Docker's official GPG key:
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<img src="./webui/react-ui/public/logo_1.png" alt="LocalAGI Logo" width="220"/>
|
<img src="./webui/react-ui/public/logo_1.png" alt="LocalAGI Logo" width="220"/>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h3 align="center"><em>Your AI. Your Hardware. Your Rules</em></h3>
|
<h3 align="center"><em>Your AI. Your Hardware. Your Rules.</em></h3>
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
|
|
||||||
@@ -13,9 +13,9 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
Create customizable AI assistants, automations, chat bots and agents that run 100% locally. No need for agentic Python libraries or cloud service keys, just bring your GPU (or even just CPU) and a web browser.
|
We empower you building AI Agents that you can run locally, without coding.
|
||||||
|
|
||||||
**LocalAGI** is a powerful, self-hostable AI Agent platform that allows you to design AI automations without writing code. A complete drop-in replacement for OpenAI's Responses APIs with advanced agentic capabilities. No clouds. No data leaks. Just pure local AI that works on consumer-grade hardware (CPU and GPU).
|
**LocalAGI** is a powerful, self-hostable AI Agent platform designed for maximum privacy and flexibility. A complete drop-in replacement for OpenAI's Responses APIs with advanced agentic capabilities. No clouds. No data leaks. Just pure local AI that works on consumer-grade hardware (CPU and GPU).
|
||||||
|
|
||||||
## 🛡️ Take Back Your Privacy
|
## 🛡️ Take Back Your Privacy
|
||||||
|
|
||||||
@@ -37,7 +37,6 @@ LocalAGI ensures your data stays exactly where you want it—on your hardware. N
|
|||||||
- 🖼 **Multimodal Support**: Ready for vision, text, and more.
|
- 🖼 **Multimodal Support**: Ready for vision, text, and more.
|
||||||
- 🔧 **Extensible Custom Actions**: Easily script dynamic agent behaviors in Go (interpreted, no compilation!).
|
- 🔧 **Extensible Custom Actions**: Easily script dynamic agent behaviors in Go (interpreted, no compilation!).
|
||||||
- 🛠 **Fully Customizable Models**: Use your own models or integrate seamlessly with [LocalAI](https://github.com/mudler/LocalAI).
|
- 🛠 **Fully Customizable Models**: Use your own models or integrate seamlessly with [LocalAI](https://github.com/mudler/LocalAI).
|
||||||
- 📊 **Observability**: Monitor agent status and view detailed observable updates in real-time.
|
|
||||||
|
|
||||||
## 🛠️ Quickstart
|
## 🛠️ Quickstart
|
||||||
|
|
||||||
@@ -195,8 +194,6 @@ LocalAGI is part of the powerful Local family of privacy-focused AI tools:
|
|||||||

|

|
||||||

|

|
||||||

|

|
||||||

|
|
||||||
|
|
||||||
|
|
||||||
### Connectors Ready-to-Go
|
### Connectors Ready-to-Go
|
||||||
|
|
||||||
|
|||||||
@@ -12,11 +12,6 @@ services:
|
|||||||
- /dev/dri/card1
|
- /dev/dri/card1
|
||||||
- /dev/dri/renderD129
|
- /dev/dri/renderD129
|
||||||
|
|
||||||
mcpbox:
|
|
||||||
extends:
|
|
||||||
file: docker-compose.yaml
|
|
||||||
service: mcpbox
|
|
||||||
|
|
||||||
localrecall:
|
localrecall:
|
||||||
extends:
|
extends:
|
||||||
file: docker-compose.yaml
|
file: docker-compose.yaml
|
||||||
|
|||||||
@@ -17,11 +17,6 @@ services:
|
|||||||
count: 1
|
count: 1
|
||||||
capabilities: [gpu]
|
capabilities: [gpu]
|
||||||
|
|
||||||
mcpbox:
|
|
||||||
extends:
|
|
||||||
file: docker-compose.yaml
|
|
||||||
service: mcpbox
|
|
||||||
|
|
||||||
localrecall:
|
localrecall:
|
||||||
extends:
|
extends:
|
||||||
file: docker-compose.yaml
|
file: docker-compose.yaml
|
||||||
@@ -35,4 +30,4 @@ services:
|
|||||||
localagi:
|
localagi:
|
||||||
extends:
|
extends:
|
||||||
file: docker-compose.yaml
|
file: docker-compose.yaml
|
||||||
service: localagi
|
service: localagi
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package localoperator
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
|||||||
@@ -10,10 +10,6 @@ import (
|
|||||||
"github.com/sashabaranov/go-openai/jsonschema"
|
"github.com/sashabaranov/go-openai/jsonschema"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
|
||||||
MetadataBrowserAgentHistory = "browser_agent_history"
|
|
||||||
)
|
|
||||||
|
|
||||||
type BrowserAgentRunner struct {
|
type BrowserAgentRunner struct {
|
||||||
baseURL, customActionName string
|
baseURL, customActionName string
|
||||||
client *api.Client
|
client *api.Client
|
||||||
@@ -66,7 +62,7 @@ func (b *BrowserAgentRunner) Run(ctx context.Context, params types.ActionParams)
|
|||||||
|
|
||||||
return types.ActionResult{
|
return types.ActionResult{
|
||||||
Result: fmt.Sprintf("Browser agent completed successfully. History:\n%s", historyStr),
|
Result: fmt.Sprintf("Browser agent completed successfully. History:\n%s", historyStr),
|
||||||
Metadata: map[string]interface{}{MetadataBrowserAgentHistory: stateHistory},
|
Metadata: map[string]interface{}{"browser_agent_history": stateHistory},
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/mudler/LocalAGI/pkg/config"
|
"github.com/mudler/LocalAGI/pkg/config"
|
||||||
"github.com/mudler/LocalAGI/pkg/localoperator"
|
|
||||||
"github.com/mudler/LocalAGI/pkg/xlog"
|
"github.com/mudler/LocalAGI/pkg/xlog"
|
||||||
"github.com/mudler/LocalAGI/pkg/xstrings"
|
"github.com/mudler/LocalAGI/pkg/xstrings"
|
||||||
"github.com/mudler/LocalAGI/services/actions"
|
"github.com/mudler/LocalAGI/services/actions"
|
||||||
@@ -168,38 +167,8 @@ func replaceUserIDsWithNamesInMessage(api *slack.Client, message string) string
|
|||||||
return message
|
return message
|
||||||
}
|
}
|
||||||
|
|
||||||
func generateAttachmentsFromJobResponse(j *types.JobResult, api *slack.Client, channelID, ts string) (attachments []slack.Attachment) {
|
func generateAttachmentsFromJobResponse(j *types.JobResult) (attachments []slack.Attachment) {
|
||||||
for _, state := range j.State {
|
for _, state := range j.State {
|
||||||
// coming from the browser agent
|
|
||||||
if history, exists := state.Metadata[actions.MetadataBrowserAgentHistory]; exists {
|
|
||||||
if historyStruct, ok := history.(*localoperator.StateHistory); ok {
|
|
||||||
state := historyStruct.States[len(historyStruct.States)-1]
|
|
||||||
// Decode base64 screenshot and upload to Slack
|
|
||||||
if state.Screenshot != "" {
|
|
||||||
screenshotData, err := base64.StdEncoding.DecodeString(state.Screenshot)
|
|
||||||
if err != nil {
|
|
||||||
xlog.Error(fmt.Sprintf("Error decoding screenshot: %v", err))
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
data := string(screenshotData)
|
|
||||||
// Upload the file to Slack
|
|
||||||
_, err = api.UploadFileV2(slack.UploadFileV2Parameters{
|
|
||||||
Reader: bytes.NewReader(screenshotData),
|
|
||||||
FileSize: len(data),
|
|
||||||
ThreadTimestamp: ts,
|
|
||||||
Channel: channelID,
|
|
||||||
Filename: "screenshot.png",
|
|
||||||
InitialComment: "Browser Agent Screenshot",
|
|
||||||
})
|
|
||||||
if err != nil {
|
|
||||||
xlog.Error(fmt.Sprintf("Error uploading screenshot: %v", err))
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// coming from the search action
|
// coming from the search action
|
||||||
if urls, exists := state.Metadata[actions.MetadataUrls]; exists {
|
if urls, exists := state.Metadata[actions.MetadataUrls]; exists {
|
||||||
for _, url := range xstrings.UniqueSlice(urls.([]string)) {
|
for _, url := range xstrings.UniqueSlice(urls.([]string)) {
|
||||||
@@ -406,7 +375,7 @@ func replyWithPostMessage(finalResponse string, api *slack.Client, ev *slackeven
|
|||||||
slack.MsgOptionEnableLinkUnfurl(),
|
slack.MsgOptionEnableLinkUnfurl(),
|
||||||
slack.MsgOptionText(message, true),
|
slack.MsgOptionText(message, true),
|
||||||
slack.MsgOptionPostMessageParameters(postMessageParams),
|
slack.MsgOptionPostMessageParameters(postMessageParams),
|
||||||
slack.MsgOptionAttachments(generateAttachmentsFromJobResponse(res, api, ev.Channel, "")...),
|
slack.MsgOptionAttachments(generateAttachmentsFromJobResponse(res)...),
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
xlog.Error(fmt.Sprintf("Error posting message: %v", err))
|
xlog.Error(fmt.Sprintf("Error posting message: %v", err))
|
||||||
@@ -418,7 +387,7 @@ func replyWithPostMessage(finalResponse string, api *slack.Client, ev *slackeven
|
|||||||
slack.MsgOptionEnableLinkUnfurl(),
|
slack.MsgOptionEnableLinkUnfurl(),
|
||||||
slack.MsgOptionText(res.Response, true),
|
slack.MsgOptionText(res.Response, true),
|
||||||
slack.MsgOptionPostMessageParameters(postMessageParams),
|
slack.MsgOptionPostMessageParameters(postMessageParams),
|
||||||
slack.MsgOptionAttachments(generateAttachmentsFromJobResponse(res, api, ev.Channel, "")...),
|
slack.MsgOptionAttachments(generateAttachmentsFromJobResponse(res)...),
|
||||||
// slack.MsgOptionTS(ts),
|
// slack.MsgOptionTS(ts),
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -439,7 +408,7 @@ func replyToUpdateMessage(finalResponse string, api *slack.Client, ev *slackeven
|
|||||||
slack.MsgOptionLinkNames(true),
|
slack.MsgOptionLinkNames(true),
|
||||||
slack.MsgOptionEnableLinkUnfurl(),
|
slack.MsgOptionEnableLinkUnfurl(),
|
||||||
slack.MsgOptionText(messages[0], true),
|
slack.MsgOptionText(messages[0], true),
|
||||||
slack.MsgOptionAttachments(generateAttachmentsFromJobResponse(res, api, ev.Channel, msgTs)...),
|
slack.MsgOptionAttachments(generateAttachmentsFromJobResponse(res)...),
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
xlog.Error(fmt.Sprintf("Error updating final message: %v", err))
|
xlog.Error(fmt.Sprintf("Error updating final message: %v", err))
|
||||||
@@ -466,7 +435,7 @@ func replyToUpdateMessage(finalResponse string, api *slack.Client, ev *slackeven
|
|||||||
slack.MsgOptionLinkNames(true),
|
slack.MsgOptionLinkNames(true),
|
||||||
slack.MsgOptionEnableLinkUnfurl(),
|
slack.MsgOptionEnableLinkUnfurl(),
|
||||||
slack.MsgOptionText(finalResponse, true),
|
slack.MsgOptionText(finalResponse, true),
|
||||||
slack.MsgOptionAttachments(generateAttachmentsFromJobResponse(res, api, ev.Channel, msgTs)...),
|
slack.MsgOptionAttachments(generateAttachmentsFromJobResponse(res)...),
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
xlog.Error(fmt.Sprintf("Error updating final message: %v", err))
|
xlog.Error(fmt.Sprintf("Error updating final message: %v", err))
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ oauth_config:
|
|||||||
- commands
|
- commands
|
||||||
- groups:history
|
- groups:history
|
||||||
- files:read
|
- files:read
|
||||||
- files:write
|
|
||||||
- im:history
|
- im:history
|
||||||
- im:read
|
- im:read
|
||||||
- im:write
|
- im:write
|
||||||
|
|||||||
Reference in New Issue
Block a user