Skip to main content
Glama

⚡ AgentBox

AI 에이전트를 위한 이메일 및 아이덴티티 레이어

CI npm version npm downloads GitHub Release Rust MCP License: MIT

AgentBox는 모든 자율 AI 에이전트(Claude Code, Cursor, Antigravity, OpenAI Swarm)에게 머신 네이티브 이메일 아이덴티티, 받은 편지함, 아웃바운드 커뮤니케이션, 인증, 이벤트 기반 이메일 기능을 제공합니다 — 셀프 호스팅, 완전한 자주성, 그리고 놀라울 정도로 빠른 속도를 갖추고 있습니다.

빠른 시작 • 핵심 추상화 • 에이전트 아이덴티티 및 보안 • 사용 사례 • 벤치마크 • MCP 도구 • 아키텍처


💡 핵심 문제

자율 AI 에이전트는 인간 세계 및 서로와 상호작용할 방법이 필요합니다. 오늘날 이메일은 모든 소프트웨어와 플랫폼을 아우르는 보편적인 통신 프로토콜입니다:

  • 브라우저 에이전트가 GitHub나 AWS에서 계정을 어떻게 인증하나요? 이메일.

  • 고객이 AI 지원 어시스턴트에 어떻게 연락하나요? 이메일.

  • 외부 QA 에이전트가 코딩 에이전트에 버그 리포트를 어떻게 위임하나요? 이메일.

  • 리서치 에이전트가 arXiv 다이제스트와 업계 알림을 어떻게 받나요? 이메일.

머신 네이티브 이메일 인프라가 없으면 개발자는 취약한 API 폴링, 개인 Gmail 받은 편지함 해킹, 또는 수동으로 인증 링크를 클릭하는 방법에 의존해야 합니다.

AgentBox가 이 문제를 완전히 해결합니다.

                    ┌─────────────────────────┐
                    │        AGENTBOX         │
                    └────────────┬────────────┘
                                 │
              ┌──────────────────┴──────────────────┐
              ▼                                     ▼
        🧑🚀 IDENTITY                         📬 COMMUNICATION
  • User-Defined Name & Email           • Inbound Inbox (SMTP/IMAP/HTTP)
  • Persistent Agent ID                 • Outbound SMTP Relay
  • Scoped Capability Matrix            • Realtime Event Bus (<0.001ms)
  • Object-Level Ownership              • OTP Isolator & SafeLink Engine
              │                                     │
              └──────────────────┬──────────────────┘
                                 │
                                 ▼
                     Autonomous AI Agent

Related MCP server: Mailgent MCP Server

🧑🚀 에이전트 아이덴티티 및 보안 모델

AgentBox는 에이전트가 누구인지 규정하지 않습니다. 에이전트의 이름, 이메일, 권한 정책을 직접 정의합니다:

# 1. Create a Support Agent with a custom company email
npx agentbox-mail agent create support \
  --email support@mycompany.com \
  --capabilities "inbox.read,email.send"

# 2. Create an Autonomous Coding Agent
npx agentbox-mail agent create coder \
  --email coder@mycompany.com \
  --capabilities "inbox.read,task.claim,task.update,otp.read"

# 3. Create a Browser QA Agent with standard verification permissions
npx agentbox-mail agent create browser-qa \
  --capabilities "inbox.read,otp.read,links.read"
╔══════════════════════════════════════════════════════════════════╗
║             🧑‍🚀 AGENT IDENTITY PROVISIONED                      ║
╠══════════════════════════════════════════════════════════════════╣
║  Agent ID     : agent_coder_7f92a1                               ║
║  Name         : coder                                            ║
║  Email        : coder@mycompany.com                              ║
║  Auth Token   : agb_92d7e8f1c3a04b12                             ║
║  Capabilities : ["inbox.read", "task.claim", "otp.read"]        ║
║  Status       : active                                           ║
╚══════════════════════════════════════════════════════════════════╝
⚠️  NOTE: Store this auth_token securely. It is only displayed once upon creation.

🔐 다중 계층 보안 강제:

  1. 토큰 인증: 에이전트 아이덴티티와 상태(active vs revoked)를 검증합니다.

  2. 권한 범위(Scopes): 필요한 권한(inbox.read, email.send, otp.read, task.claim)을 확인합니다.

  3. 객체 수준 사서함 소유권: otp.read 권한을 가진 에이전트 A는 자신에게 할당된 사서함(owner_agent_id)으로만 엄격히 제한됩니다. 에이전트 간 접근을 시도하면 명시적인 AccessDenied 오류가 반환됩니다.

  4. 자격 증명 위생: 공개 쿼리(get_agent_identity, list_agent_identities)는 토큰을 절대 노출하지 않는 정제된 구조체를 사용합니다.


🌐 다양한 사용 사례

AgentBox는 기반이 되는 이메일 아이덴티티 레이어를 제공합니다. 그 위에 구축할 수 있는 가장 강력한 워크플로우 몇 가지를 소개합니다:

1. 🤖 에이전트 간 작업 위임 및 태스크 프로토콜

외부 QA 또는 디스커버리 에이전트(예: Jules)가 버그 또는 기능 요청이 담긴 이메일을 보냅니다. AgentBox의 내장 TaskDetector가 제목([TASK:BUG])을 자동으로 파싱하고, 저장소, 브랜치, 우선순위, 라인 인용을 추출하며, AgentTask를 프로비저닝하고, 이벤트 버스를 통해 코딩 에이전트를 깨웁니다:

   Jules (QA Agent)
          │
          │ 1. Sends email: "[TASK:BUG] Fix duplicate property filter in EstateFlow"
          │    Body: "Repository: RABNEER/EstateFlow\nPriority: high\nEvidence: tests/search.spec.ts:87"
          ▼
 ┌─────────────────┐
 │    AgentBox     │ ──► Auto-detects Work Order via `TaskDetector`
 └────────┬────────┘ ──► Provisions `AgentTask` & records audit event
          │
          │ 2. Realtime Event Bus Dispatch (<0.001ms) / SSE Daemon Bridge
          ▼
 Coder (Worker Agent / Claude Code)
          │ 3. Instantaneously claims task via `claim_agent_task`
          │ 4. Fixes code, opens GitHub PR, calls `update_task_progress`
          │ 5. Calls `complete_agent_task` with CI results
          ▼
 ┌─────────────────┐
 │    AgentBox     │ ──► Status: "completed" + Immutable Audit Lineage
 └────────┬────────┘
          │ 6. Emits completion notification to Jules / User
          ▼
   Jules closes ticket

2. 🔐 자율 SaaS 가입 및 2FA / OTP 인증

브라우저 에이전트(Puppeteer, Playwright, Stagehand)는 도구에 가입하고, 이메일 주소를 인증하며, OTP 챌린지를 해결해야 합니다:

  • 에이전트가 받은 편지함 생성: create_agent_inbox(name: "signup-bot").

  • 플랫폼(예: AWS, Stripe, Vercel)에서 가입 트리거.

  • get_latest_otp() 호출(0.14ms 미만의 정규식 추출) 또는 get_verification_link() 호출(안티-리다이렉트 및 피싱 방어 적용).

  • 인간의 개입 없이 계정이 자율적으로 인증됩니다.


3. 💬 자율 인바운드 지원 및 고객 트리아지

고객 지원 에이전트에 자체 이메일 주소(support@yourcompany.com)를 부여하세요:

  • 고객이 문제를 이메일로 지원팀에 보냅니다.

  • AgentBox가 원시 SMTP 또는 IMAP 동기화를 통해 이메일을 수집합니다.

  • 실시간 SSE 이벤트가 지원 에이전트에 알립니다.

  • 에이전트가 문의를 분석하고, 내부 문서를 참조하며, send_agent_email()로 답변합니다.


4. 🔬 리서치 및 인텔리전스 수집

리서치 에이전트에 아이덴티티(researcher@yourcompany.com)를 부여하세요:

  • 업계 뉴스레터, 보안 권고(CVE), arXiv 다이제스트 피드에 구독합니다.

  • 에이전트가 read_agent_inbox()를 사용하여 주기적으로 인바운드 이메일을 읽습니다.

  • 경영진 브리핑을 종합하고, 결과를 요약하며, 다이제스트를 팀에 전달합니다.


5. 🛡️ DevOps 알림 및 자동화된 인시던트 대응

인시던트 대응 에이전트에 아이덴티티(oncall@yourcompany.com)를 부여하세요:

  • Datadog, Sentry 또는 PagerDuty에서 중요한 오류 알림을 수신합니다.

  • 실시간 이벤트 훅이 에이전트를 즉시 깨웁니다.

  • 에이전트가 로그를 조회하고, 실패한 커밋을 식별하며, 코딩 에이전트에 수정 지시를 전달합니다.


📊 재현 가능한 성능 벤치마크

AgentBox는 원시 바이트부터 전체 JSON-RPC 출력까지 전체 파이프라인을 측정하는 완전한 벤치마크 테스트 스위트(tests/benchmark.rs)를 포함합니다:

cargo test --release --test benchmark -- --nocapture

⚡ 검증된 전체 엔드투엔드 MCP 파이프라인 (1,000 사이클):

테스트 파이프라인: 원시 MIME 수집 ➔ mail-parser ➔ SafeLink 분석 ➔ 정규식 OTP ➔ SQLite INSERT ➔ 브로드캐스트 디스패치 ➔ 인증된 MCP 도구 호출 (tools/call) ➔ JSON-RPC 결과 출력

파이프라인 지표

측정된 지연 시간

처리량

평균 (Mean)

451.9 µs (0.451 ms)

초당 2,213회 완전한 MCP 사이클

p50 중앙값

431.5 µs (0.431 ms)

—

p95

586.2 µs (0.586 ms)

—

p99

1.04 ms

—

⚡ 하위 컴포넌트 마이크로초 지연 시간 (10,000회 반복):

  • 이벤트 버스 채널 디스패치: 0.216 µs (0.0002 ms) — 초당 462만 건의 이벤트

  • 링크 안전성 및 안티-리다이렉트: 0.652 µs (0.0007 ms) — 초당 153만 건의 검사

  • OTP 정규식 추출: 138.2 µs (0.138 ms) — 초당 7,230회 추출


🛠️ MCP 도구 참조

AgentBox는 stdio를 통해 Model Context Protocol (MCP) 사양을 구현합니다:

카테고리

도구

매개변수

설명

아이덴티티

create_agent_identity

name, email?, capabilities?

사용자 지정/자동 이메일로 영구 아이덴티티를 생성하고 일회용 인증 토큰을 반환합니다.

아이덴티티

get_agent_identity

agent_id

공개 에이전트 메타데이터를 검색합니다 (토큰은 정제됨).

아이덴티티

list_agent_identities

—

등록된 모든 공개 에이전트 아이덴티티와 활성 정책을 나열합니다.

아이덴티티

revoke_agent_identity

agent_id

에이전트 아이덴티티를 폐기하고 인증 토큰을 즉시 무효화합니다.

사서함

create_agent_inbox

name, address?, agent_token?

호출 에이전트 아이덴티티에 연결된 새 가상 사서함을 생성합니다.

사서함

get_latest_otp

account_id, agent_token?

소유권 검사와 함께 최신 4~8자리 인증 코드를 0.14ms 미만으로 추출합니다.

사서함

wait_for_email

account_id, timeout_secs?, agent_token?

이벤트 기반 훅: 비동기 Tokio 브로드캐스트 채널이 0.001ms 미만으로 에이전트를 깨웁니다.

사서함

get_verification_link

account_id, agent_token?

딥 링크 안전성 및 안티-리다이렉트 방어가 적용된 파싱된 활성화 링크를 반환합니다.

사서함

read_agent_inbox

account_id, limit?, agent_token?

최근 메시지, 전체 본문 텍스트, HTML, 발신자 메타데이터를 검색합니다.

사서함

send_agent_email

account_id, to, subject, body, agent_token?

권한 인증과 함께 SMTP 릴레이를 통해 아웃바운드 이메일을 전송합니다.

사서함

delete_agent_inbox

account_id, agent_token?

임시 사서함을 삭제하고 저장된 메시지를 제거합니다.

태스크 프로토콜

dispatch_agent_task

action, description, repository?, branch?, priority?, target_agent?, evidence?, acceptance_criteria?, agent_token?

한 에이전트에서 다른 에이전트로 구조화된 작업 지시를 전달합니다.

태스크 프로토콜

claim_agent_task

task_id, agent_token

태스크를 원자적으로 잠그고 요청한 작업자 에이전트에 할당합니다.

태스크 프로토콜

update_task_progress

task_id, status, commit_sha?, pr_url?, test_results?, note?, agent_token

태스크 상태(running, testing, pr_opened)를 업데이트하고 감사 로그를 기록합니다.

태스크 프로토콜

complete_agent_task

task_id, summary, commit_sha?, pr_url?, test_results?, agent_token

완료 세부 정보와 함께 태스크를 종료하고 완료 이벤트를 발생시킵니다.

태스크 프로토콜

list_agent_tasks

status?, agent_token?, limit?

수명 주기 상태 또는 에이전트 아이덴티티로 필터링된 태스크를 나열합니다.

태스크 프로토콜

get_task_audit_trail

task_id, agent_token?

태스크의 불변 감사 로그와 수명 주기 이력을 검색합니다.


🚀 빠른 시작

1. 헤드리스 NPM CLI (제로 설정)

1초 만에 AI 도구를 즉시 자동 구성하세요:

# 1-Click Auto-Install MCP Server & AI Skill into Claude Code, Cursor, Antigravity
npx agentbox-mail init

# Start MCP stdio server with live daemon SSE event bridge
npx agentbox-mail mcp

# Create an Agent Identity with scoped capabilities
npx agentbox-mail agent create support --email support@mycompany.com --capabilities "inbox.read,email.send"

# Retrieve latest OTP code
npx agentbox-mail otp agent@yourdomain.com

# Launch Web Dashboard
npx agentbox-mail ui

2. 네이티브 Electron 데스크톱 앱

# Clone the repository
git clone https://github.com/RABNEER/AgentBox.git
cd AgentBox

# Install dependencies and start Desktop App
npm install
npm run app

3. 고속 Rust 코어 데몬

# Build the optimized production binary
cargo build --release

# Start all-in-one daemon (HTTP Port 3000 + SMTP Port 2525)
./target/release/agentbox-mail server --port 3000

🏗️ 아키텍처

                                  ┌───────────────────────────┐
                                  │   Inbound Emails & Tasks  │
                                  └─────────────┬─────────────┘
                                                │
                 ┌──────────────────────────────┼──────────────────────────────┐
                 │                              │                              │
                 ▼                              ▼                              ▼
     ┌───────────────────────┐      ┌───────────────────────┐      ┌───────────────────────┐
     │ Hostinger / Titan /   │      │ Raw SMTP Listener     │      │ Inbound HTTP Webhook  │
     │ Google IMAP TLS (993) │      │ (0.0.0.0:2525)        │      │ (POST /v1/inbound)    │
     └───────────┬───────────┘      └───────────┬───────────┘      └───────────┬───────────┘
                 │                              │                              │
                 └──────────────────────────────┼──────────────────────────────┘
                                                │
                                                ▼
                                 ┌─────────────────────────────┐
                                 │   High-Speed Parser Engine  │
                                 │  • 4–8 Digit OTP Isolator   │
                                 │  • Link Safety Engine       │
                                 │  • TaskDetector (Work Order)│
                                 └──────────────┬──────────────┘
                                                │
                                                ▼
                                 ┌─────────────────────────────┐
                                 │ Embedded SQLite Storage     │
                                 │       (`agentbox.db`)       │
                                 │  • Identities & Auth Tokens │
                                 │  • Mailboxes & Messages     │
                                 │  • Resource Ownership Graph │
                                 │  • Agent Tasks & Audit Logs │
                                 └──────────────┬──────────────┘
                                                │
                 ┌──────────────────────────────┼──────────────────────────────┐
                 │                              │                              │
                 ▼                              ▼                              ▼
     ┌───────────────────────┐      ┌───────────────────────┐      ┌───────────────────────┐
     │ Realtime SSE Bus      │      │ MCP Server (stdio)    │      │ Native Desktop App /  │
     │ (`GET /v1/events`)    │      │ Full Tool Interface   │      │ Web Dashboard (:3000) │
     │ (Live Daemon Bridge)  │      │ Object-Level Auth     │      │                       │
     └───────────────────────┘      └───────────────────────┘      └───────────────────────┘

📄 라이선스

MIT 라이선스에 따라 배포됩니다. 자세한 내용은 LICENSE를 참조하세요.

🖤를 담아 RABNEER 및 AgentBox 오픈소스 커뮤니티가 제작했습니다

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    C
    maintenance
    Disposable email MCP server for autonomous AI agents. Create labeled temporary inboxes, wait for verification emails, extract OTP codes and confirmation links — zero human intervention required.
    6
    MIT
  • A
    license
    Not graded
    quality
    F
    maintenance
    Provides identity infrastructure for AI agents to manage email communications, including sending, replying, and organizing messages. It also includes a secure vault for managing credentials and generating TOTP codes.
    9 npm
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    An MCP server that provides AI agents with a persistent, agent-native email mailbox for sending, receiving, and managing emails through bounded-context retrieval, idempotent operations, and explicit acknowledgement.
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Disposable email for humans and AI agents. Enables AI agents to create mailboxes and receive verification emails through an MCP server.
    37
    MIT