ar

mcp
Guvenlik Denetimi
Uyari
Health Uyari
  • License — License: MIT
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Low visibility — Only 5 GitHub stars
Code Uyari
  • Code scan incomplete — No supported source files were scanned during light audit
Permissions Gecti
  • Permissions — No dangerous permissions requested
Purpose
This tool is an AI assistant development kit (ADK) written in Go. It provides a framework for building smart assistants that integrate with large language models (LLMs) and DingTalk, using the Model Context Protocol (MCP) to connect with external tools.

Security Assessment
Overall Risk: Medium. Based on the provided code examples, the tool is designed to route user queries to external LLM APIs (like Alibaba's Dashscope) and interact with local or remote MCP endpoints. While it requires external databases (Redis) and APIs (DingTalk) to function, the tool itself does not appear to execute arbitrary shell commands. However, the code examples contain hardcoded placeholders for API keys (`sk-xxxxxx`). Developers must ensure these sensitive credentials are securely managed using environment variables or secret managers rather than being hardcoded in the final application. Additionally, the automated code scan could not verify the underlying source code for hidden vulnerabilities.

Quality Assessment
The project is relatively new and currently has low visibility, evidenced by only 5 GitHub stars. However, it appears to be actively maintained, with repository updates pushed as recently as today. It uses the permissive and standard MIT license, which is a positive indicator for open-source collaboration and safe usage. Because it is a low-visibility project, community trust and extensive peer review are currently limited.

Verdict
Use with caution. While the framework provides useful integrations and is actively maintained, its low community adoption and the unverified nature of its source code mean you should thoroughly review its dependencies and ensure you implement secure credential management before integrating it into production.
SUMMARY

[氩-Ar] AI 智能助手开发库

README.md

氩-Ar

[氩-Ar] AI 智能助手开发库|Assistant Development Kit (ADK) for Go

Install

go get github.com/noble-gase/ar

Usage

Normal

点击展开
package main

import (
	"github.com/noble-gase/ar"
	"github.com/noble-gase/ar/dingtalk"
	"github.com/noble-gase/ar/llmchat"
	"github.com/noble-gase/ar/model/openai"
)

func main() {
	// agent
	agent := &llmchat.NormalAgent{
		Name: "iota",
		Description: "IOTA智能助手",
		Instruction: `你是一个企业内部智能助手。
## 基本规则
- 用中文回答,简洁、准确,使用 Markdown 格式
- 列表数据,请使用 Markdown 表格输出展示
- 不要凭自身知识回答问题,必须通过工具获取正确的信息
- 如果用户的问题与工具列表范围无关,请告知用户无法处理
- 遇到工具不能处理的问题,请如实告知,并让用户找「xxx」确认`,
		LLMAdapter: &llmchat.OpenAI{
			Config: openai.Config{
				APIKey: "sk-xxxxxx",
				BaseURL: "https://dashscope.aliyuncs.com/compatible-mode/v1",
				ModelName: "glm-5",
			},
		},
		Endpoints: []string{"http://localhost:8080/mcp/iotlink"},
	}

	// llmchat
	chat, err := ar.NewLLMChat("IOTA-Agent", db, redis, agent)
	if err != nil {
		panic(err)
	}

	// dingtalk
	cfg := &dingtalk.Config{
		ClientId: "clientId",
		ClientSecret: "clientSecret",
		CardTemplateId: "xxxxxx.schema",
	}
	assistant, err := ar.NewAssistant(cfg, redis, chat)
	if err != nil {
		panic(err)
	}
	defer assistant.Stop()

	assistant.Start()
}

AgentTool

点击展开
package main

import (
	"github.com/noble-gase/ar"
	"github.com/noble-gase/ar/dingtalk"
	"github.com/noble-gase/ar/llmchat"
	"github.com/noble-gase/ar/model/openai"
)

func main() {
	// agent
	agent := &llmchat.AgentTool{
		Name: "iota",
		Description: "IOTA智能助手",
		Instruction: `你是一个企业内部智能助手,负责理解用户意图并将任务分发给合适的 Agent 工具。
## 基本规则
- 不要凭自身知识回答问题,必须通过 Agent 工具获取正确的信息`,
		LLMAdapter: &llmchat.OpenAI{
			Config: openai.Config{
				APIKey: "sk-xxxxxx",
				BaseURL: "https://dashscope.aliyuncs.com/compatible-mode/v1",
				ModelName: "glm-5",
			},
		},
		Tools: []llmchat.AgentBuilder{
			&llmchat.MCPAgent{
				Name: "iotlink"
				Endpoint: "http://localhost:8080/mcp/iotlink",
				Description: "联接平台相关工具",
				Instruction: `你是一个物联网「联接平台」相关的工具集合,你可以回答 MQTT 连接相关的问题。
## 基本规则
- 用中文回答,简洁、准确,使用 Markdown 格式
- 列表数据,请使用 Markdown 表格输出展示
- 不要凭自身知识回答问题,必须通过工具获取正确的信息
- 如果用户的问题与工具列表范围无关,请告知用户无法处理
- 遇到工具不能处理的问题,请如实告知,并让用户找「xxx」确认`,
			},
		},
	}

	// llmchat
	chat, err := ar.NewLLMChat("IOTA-Agent", db, redis, agent)
	if err != nil {
		panic(err)
	}

	// dingtalk
	cfg := &dingtalk.Config{
		ClientId: "clientId",
		ClientSecret: "clientSecret",
		CardTemplateId: "xxxxxx.schema",
	}
	assistant, err := ar.NewAssistant(cfg, redis, chat)
	if err != nil {
		panic(err)
	}
	defer assistant.Stop()

	assistant.Start()
}

Yorumlar (0)

Sonuc bulunamadi