Skip to content

Repository files navigation

AgentLink Platform

AgentLink

Build, Orchestrate, and Monetize Autonomous AI Teams

Powered by Google A2A Protocol | Multi-Agent Orchestration | Enterprise Ready

LicenseGo VersionNode VersionDockerA2A Protocol

English | 中文


🇺🇸 English

🚀 Overview

AgentLink is an enterprise-grade SaaS platform that enables AI creators to securely monetize their prompts and AI Agents, while allowing developers to integrate AI capabilities with a single API call.

What makes AgentLink special:

  • Level 1/2: Single-agent capabilities with secure prompt protection
  • Level 3: Multi-agent orchestration powered by Google A2A Protocol
  • Enterprise Ready: Built for scale with authentication, rate limiting, and circuit breakers

🌟 Key Features

FeatureDescription
🔒 Secure Prompt ProtectionSystem prompts encrypted with AES-256-GCM, never exposed to end users
🤖 Multi-Agent OrchestrationBuild complex AI workflows with Google A2A Protocol support
💰 Flexible MonetizationAccept fiat (Stripe) and crypto (Coinbase) payments
🔗 Blockchain OwnershipOn-chain proof of Agent ownership via ERC-1155 tokens
📚 RAG Knowledge BaseEnhance Agents with private knowledge using pgvector
🚀 High PerformanceGo backend with Redis caching, rate limiting, circuit breaker
🔄 Human-in-the-LoopApproval nodes for human oversight in workflows
📊 Analytics DashboardTrack usage, revenue, and performance metrics

🏗️ Architecture

┌─────────────────────────────────────────────────────────────────────────┐
│ Frontend (Next.js 14) │
│ Landing │ Marketplace │ Dashboards │ Workflow Studio (React Flow) │
└─────────────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────────┐
│ API Layer (Go/Gin) │
│ ┌─────────────┐ ┌─────────────────┐ ┌─────────────────────────────┐ │
│ │ API Gateway │ │ Proxy Gateway │ │ Orchestrator Engine (A2A) │ │
│ │ (8080) │ │ (8081) │ │ Multi-Agent Coordination │ │
│ └─────────────┘ └─────────────────┘ └─────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────────┐
│ Core Services │
│ ┌──────┐ ┌───────┐ ┌─────────┐ ┌───────┐ ┌──────────┐ ┌────────────┐ │
│ │ Auth │ │ Agent │ │ Payment │ │ Trial │ │Settlement│ │ Withdrawal │ │
│ └──────┘ └───────┘ └─────────┘ └───────┘ └──────────┘ └────────────┘ │
│ ┌───────┐ ┌──────────┐ ┌─────────────┐ ┌───────────────────────────┐ │
│ │ Squad │ │ Workflow │ │ Execution │ │ A2A Message Protocol │ │
│ └───────┘ └──────────┘ └─────────────┘ └───────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────────┐
│ Data Layer │
│ ┌────────────────────┐ ┌───────┐ ┌───────────┐ ┌────────────────────┐ │
│ │ PostgreSQL 16 │ │ Redis │ │ S3 (MinIO)│ │ Blockchain (Base) │ │
│ │ + pgvector (1536d) │ │ 7 │ │ │ │ ERC-1155 │ │
│ └────────────────────┘ └───────┘ └───────────┘ └────────────────────┘ │
└─────────────────────────────────────────────────────────────────────────┘

🔧 Google A2A Protocol Support

AgentLink implements the Google Agent2Agent (A2A) Protocol for multi-agent orchestration:

┌─────────────────────────────────────────────────────────────────────┐
│ A2A Protocol Integration │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────┐ A2A Message ┌─────────┐ A2A Message ┌─────────┐
│ │ Agent A │ ───────────────▶ │ Agent B │ ───────────────▶ │ Agent C │
│ │(Writer) │ │(Reviewer)│ │(Editor) │
│ └─────────┘ └─────────┘ └─────────┘
│ │ │ │
│ └─────────────────────────────┴─────────────────────────────┘
│ │
│ Shared Context (JSON)
│ │
│ ┌──────┴──────┐
│ │ Orchestrator │
│ │ Engine │
│ └─────────────┘
│ │
└─────────────────────────────────────────────────────────────────────┘

A2A Features:

  • 🔄 Agent Discovery - Agents can discover and communicate with each other
  • 📨 Message Protocol - Standardized message format for agent communication
  • 🔐 Secure Exchange - Encrypted context sharing between agents
  • Async First - Designed for long-running tasks and human-in-the-loop
  • 🎯 Task Coordination - Complex workflow orchestration across multiple agents

💻 Tech Stack

LayerTechnology
FrontendNext.js 14, Tailwind CSS, Shadcn UI, React Flow
BackendGo 1.23 (Gin), PostgreSQL 16, Redis 7
AI ProvidersOpenAI, Anthropic Claude, Google Gemini
Vector DBpgvector (1536 dimensions for embeddings)
BlockchainBase (L2), ERC-1155 NFT
PaymentsStripe, Coinbase Commerce
ProtocolGoogle A2A Protocol v0.3
Testingrapid (Property-Based Testing)

📁 Project Structure

AgentLink/
├── backend/ # Go backend services
│ ├── cmd/ # Application entry points
│ │ ├── api/ # Main API server (port 8080)
│ │ ├── proxy/ # Proxy Gateway (port 8081)
│ │ └── migrate/ # Database migration tool
│ ├── internal/ # Private application code
│ │ ├── agent/ # Agent CRUD & AES-256 encryption
│ │ ├── apikey/ # API Key management
│ │ ├── auth/ # JWT + Argon2id authentication
│ │ ├── cache/ # Redis cache utilities
│ │ ├── config/ # Configuration management
│ │ ├── database/ # PostgreSQL connection pool
│ │ ├── errors/ # Standardized error handling
│ │ ├── middleware/ # HTTP middleware (JWT, CORS, Rate Limit)
│ │ ├── models/ # Data models
│ │ ├── monitoring/ # Prometheus metrics
│ │ ├── payment/ # Stripe & Coinbase integration
│ │ ├── proxy/ # Proxy Gateway (rate limit, circuit breaker)
│ │ ├── settlement/ # Creator earnings settlement
│ │ ├── trial/ # Trial mechanism
│ │ └── withdrawal/ # Creator withdrawal
│ └── migrations/ # Database migrations (6 files)
├── frontend/ # Next.js 14 frontend
│ └── src/
│ ├── app/ # App Router pages
│ ├── components/ # React components
│ └── lib/ # Utilities & API client
├── docs/ # Documentation
│ ├── dev-logs/ # Development logs (20+ entries)
│ │ ├── phase-0/ # Environment setup
│ │ ├── phase-1/ # Infrastructure
│ │ ├── phase-2/ # Authentication
│ │ ├── phase-3/ # Agent & Proxy Gateway
│ │ ├── phase-4/ # Level 3 Database
│ │ ├── phase-5/ # Payment & Monetization
│ │ └── error-fixes/ # Error fix logs (8 entries)
│ ├── CHANGELOG.md # Version history
│ └── EXTERNAL_SERVICES.md # External services setup
├── scripts/ # Development scripts
├── docker-compose.yml # Local development services
└── README.md # This file

🚀 Quick Start

Prerequisites

  • Go 1.23+
  • Node.js 20+
  • Docker & Docker Compose
  • pnpm (recommended) or npm

1. Clone the Repository

git clone https://github.com/aimerfeng/AgentLink.git
cd AgentLink

2. Configure Environment

cp .env.example .env.local
# Edit .env.local with your API keys

3. Start Local Services

docker-compose up -d

4. Run Database Migrations

cd backend && make migrate-up

5. Start Development Servers

# Terminal 1: Backend APIcd backend && make run-api
# Terminal 2: Proxy Gatewaycd backend && make run-proxy
# Terminal 3: Frontendcd frontend && npm install && npm run dev

6. Access the Application

ServiceURLDescription
Frontendhttp://localhost:3000Web application
APIhttp://localhost:8080REST API
Proxy Gatewayhttp://localhost:8081AI Agent proxy
MinIO Consolehttp://localhost:9001S3 storage
Mailhoghttp://localhost:8025Email testing

📈 Development Progress

PhaseStatusDescription
Phase 0✅ CompleteEnvironment Setup (Git, Docker, External Services)
Phase 1✅ CompleteInfrastructure (PostgreSQL, Redis, Logging, Monitoring)
Phase 2✅ CompleteAuthentication (JWT, Argon2id, Wallet Binding)
Phase 3✅ CompleteAgent System & Proxy Gateway (CRUD, Encryption, Rate Limit)
Phase 4✅ CompleteLevel 3 Database Extension (Squad, Workflow, Execution)
Phase 5✅ CompletePayment & Monetization (Stripe, Coinbase, Settlement)
Phase 6⏳ PendingAdvanced Features (RAG, Blockchain, Multi-AI)
Phase 7⏳ PendingSquad Service (Level 3 Multi-Agent)
Phase 8⏳ PendingWorkflow Service (DAG Validation)
Phase 9⏳ PendingOrchestrator Engine (A2A Protocol)
Phase 10+⏳ PendingAdvanced Execution, Human-in-the-Loop, Frontend

📚 Documentation

DocumentDescription
Development Logs20+ detailed implementation logs
Error Fixes8 common issues with solutions
External ServicesThird-party service setup guide
ChangelogVersion history and updates

🔐 Security Features

  • AES-256-GCM Encryption - System prompts encrypted at rest
  • Argon2id Password Hashing - Industry-standard password security
  • JWT Authentication - Secure token-based auth with refresh tokens
  • Rate Limiting - Redis sliding window (10/1000 calls per minute)
  • Circuit Breaker - Prevent cascade failures with sony/gobreaker
  • CORS Protection - Configurable cross-origin resource sharing
  • API Key Management - SHA-256 hashed keys with revocation

🇨🇳 中文

🚀 概述

AgentLink 是一个企业级 SaaS 平台,使 AI 创作者能够安全地将其提示词和 AI Agent 变现,同时允许开发者通过单个 API 调用集成 AI 能力。

AgentLink 的独特之处:

  • Level 1/2:单智能体能力,具有安全的提示词保护
  • Level 3:基于 Google A2A 协议的多智能体编排
  • 企业就绪:内置认证、限速和熔断器,为规模化而生

🌟 核心特性

特性描述
🔒 安全的提示词保护System Prompt 使用 AES-256-GCM 加密,永不暴露给终端用户
🤖 多智能体编排支持 Google A2A 协议构建复杂的 AI 工作流
💰 灵活的变现方式支持法币(Stripe)和加密货币(Coinbase)支付
🔗 区块链所有权通过 ERC-1155 代币实现 Agent 所有权的链上证明
📚 RAG 知识库使用 pgvector 增强 Agent 的私有知识库
🚀 高性能Go 后端配合 Redis 缓存、限速和熔断器
🔄 人机协作工作流中的审批节点支持人工监督
📊 分析仪表盘追踪使用量、收入和性能指标

🔧 Google A2A 协议支持

AgentLink 实现了 Google Agent2Agent (A2A) 协议,用于多智能体编排:

A2A 协议特性:

  • 🔄 智能体发现 - 智能体可以相互发现和通信
  • 📨 消息协议 - 标准化的智能体通信消息格式
  • 🔐 安全交换 - 智能体之间的加密上下文共享
  • 异步优先 - 为长时间运行的任务和人机协作设计
  • 🎯 任务协调 - 跨多个智能体的复杂工作流编排

A2A 协议由 Google 于 2025 年 4 月发布,得到了 50 多家技术合作伙伴的支持,包括 Atlassian、Box、Salesforce、SAP、ServiceNow 等。该协议旨在打破不同 AI 智能体框架和供应商之间的壁垒,实现安全高效的跨平台协作。

💻 技术栈

层级技术
前端Next.js 14, Tailwind CSS, Shadcn UI, React Flow
后端Go 1.23 (Gin), PostgreSQL 16, Redis 7
AI 提供商OpenAI, Anthropic Claude, Google Gemini
向量数据库pgvector (1536 维嵌入向量)
区块链Base (L2), ERC-1155 NFT
支付Stripe, Coinbase Commerce
协议Google A2A Protocol v0.3
测试rapid (属性测试)

🚀 快速开始

前置条件

  • Go 1.23+
  • Node.js 20+
  • Docker & Docker Compose
  • pnpm(推荐)或 npm

1. 克隆仓库

git clone https://github.com/aimerfeng/AgentLink.git
cd AgentLink

2. 配置环境

cp .env.example .env.local
# 编辑 .env.local 填入你的 API 密钥

3. 启动本地服务

docker-compose up -d

4. 运行数据库迁移

cd backend && make migrate-up

5. 启动开发服务器

# 终端 1: 后端 APIcd backend && make run-api
# 终端 2: 代理网关cd backend && make run-proxy
# 终端 3: 前端cd frontend && npm install && npm run dev

6. 访问应用

服务地址说明
前端http://localhost:3000Web 应用
APIhttp://localhost:8080REST API
代理网关http://localhost:8081AI Agent 代理
MinIO 控制台http://localhost:9001S3 存储
Mailhoghttp://localhost:8025邮件测试

📈 开发进度

阶段状态说明
Phase 0✅ 完成环境准备(Git、Docker、外部服务)
Phase 1✅ 完成基础架构(PostgreSQL、Redis、日志、监控)
Phase 2✅ 完成认证系统(JWT、Argon2id、钱包绑定)
Phase 3✅ 完成Agent 系统和代理网关(CRUD、加密、限速)
Phase 4✅ 完成Level 3 数据库扩展(Squad、Workflow、Execution)
Phase 5✅ 完成支付与商业化(Stripe、Coinbase、结算)
Phase 6⏳ 待开始高级功能(RAG、区块链、多 AI)
Phase 7⏳ 待开始Squad 服务(Level 3 多智能体)
Phase 8⏳ 待开始Workflow 服务(DAG 验证)
Phase 9⏳ 待开始编排引擎(A2A 协议)
Phase 10+⏳ 待开始高级执行、人机协作、前端

📚 文档

文档说明
开发日志20+ 条详细的实现日志
错误修复8 个常见问题及解决方案
外部服务第三方服务配置指南
变更日志版本历史和更新

🔐 安全特性

  • AES-256-GCM 加密 - System Prompt 静态加密存储
  • Argon2id 密码哈希 - 行业标准的密码安全
  • JWT 认证 - 安全的基于令牌的认证,支持刷新令牌
  • 限速 - Redis 滑动窗口(每分钟 10/1000 次调用)
  • 熔断器 - 使用 sony/gobreaker 防止级联故障
  • CORS 保护 - 可配置的跨域资源共享
  • API Key 管理 - SHA-256 哈希密钥,支持撤销

🤝 Contributing / 贡献

  1. Fork the repository / Fork 仓库
  2. Create your feature branch / 创建功能分支 (git checkout -b feature/amazing-feature)
  3. Commit your changes / 提交更改 (git commit -m 'feat: add amazing feature')
  4. Push to the branch / 推送分支 (git push origin feature/amazing-feature)
  5. Open a Pull Request / 创建 Pull Request

Commit Convention / 提交规范

TypeDescription
feat:New feature / 新功能
fix:Bug fix / 错误修复
docs:Documentation / 文档
chore:Maintenance / 维护
refactor:Refactoring / 重构
test:Tests / 测试
error:Error fix / 错误修复

Branch Strategy / 分支策略

  • main - Production-ready code / 生产就绪代码
  • develop - Development branch / 开发分支
  • feature/* - New features / 新功能
  • error-fix/* - Bug fixes / 错误修复

📄 License / 许可证

This project is licensed under the MIT License - see the LICENSE file for details.

本项目采用 MIT 许可证 - 详见 LICENSE 文件。

🔗 Links / 链接


Made with ❤️ by the AgentLink Team

Building the future of AI Agent collaboration

About

ai变现认证项目

Resources

Stars

13 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages