Skip to main content
Glama
Anshv784
by Anshv784

AgentGate

AI 에이전트를 위한 통제된 도구 호출 게이트웨이 — Terminal 3의 ADK 기반.

LLM 에이전트에게 API 키를 주면 그 에이전트는 무엇이든 호출하고, 무엇이든 지출하고, 무엇이든 유출할 수 있습니다 — 그리고 그 사실을 뒤늦게, 에이전트가 스스로 작성한 로그를 통해서만 알게 됩니다.

AgentGate는 에이전트와 외부 세계 사이에 하드웨어 격리 엔클레이브(enclave)를 둡니다. 에이전트는 URL이 아닌 엔드포인트(endpoint) 를 지정합니다. 에이전트는 자격 증명(credential)을 절대 보유하지 않습니다. 사용자의 개인 데이터를 절대 볼 수 없습니다. 그리고 에이전트가 시도하는 모든 요청 — 허용되든 거부되든 — 은 에이전트가 편집할 수 없는 원장(ledger)에 기록됩니다.

이 제품은 MCP 서버로 제공되므로, 모든 MCP 클라이언트(Claude Code, Claude Desktop, Cursor, SDK 에이전트)는 설정 항목 하나만 추가하면 통제된 도구 호출을 사용할 수 있습니다. 프레임워크도, 재작성도 필요 없습니다.

  MCP client (Claude / Cursor / your agent)
    │  call_endpoint { endpoint: "resend", path: "/emails",
    │                  body: { to: ["{{profile.verified_contacts.email.value}}"] } }
    ▼
  AgentGate MCP server            ← holds the T3N session; the model holds nothing
    │
    ▼
┌─ z:<tid>:agentgate — TEE contract (Rust → WASM, Intel TDX) ───────────────┐
│  1. every {{…}} marker must be profile.* AND on this endpoint's allowlist │
│  2. path must be one the tenant enumerated — exact match, no globs        │
│  3. credential read from the sealed z:<tid>:secrets map                   │
│  4. host substitutes real PII inside the enclave (contract never sees it) │
│  5. upstream response projected to declared fields only                   │
│  6. ledger entry appended — for ALLOWED and DENIED alike                  │
└───────────────────────────────────────────────────────────────────────────┘
    ▼
  api.resend.com   ← reached only if the data owner's grant permits this host

실제로 동작합니다. 영수증입니다

T3N 테스트넷에서 npm run demo 실행 — 아래의 모든 호출은 조직이 발행한 에이전트가 수행한 것입니다:

🛑 DENIED   profile field outside the endpoint's allowlist  ({{profile.ssn}})
            marker rejected: 'ssn' is not in this endpoint's allowed_placeholders
🛑 DENIED   marker reaching for another namespace  ({{secret.resend_api_key}})
            marker rejected: 'secret.resend_api_key' is not a profile marker
🛑 DENIED   path the tenant never enumerated  (/domains)
            path rejected: '/domains' is not in this endpoint's allowed_paths
🛑 DENIED   endpoint that does not exist  (stripe)
            unknown endpoint

── policy is per-ENDPOINT, not per-host ──────────────────────────────
   'resend' and 'resend-notify' share a host AND a credential.
   The same marker is allowed on one and refused on the other.

✅ ALLOWED  {{profile.first_name}} via 'resend'        (allowlisted there)
            {"data":{"id":"d7299ce6-668f-47f2-8e22-8f3f96c0f255"},"status":200}
🛑 DENIED   {{profile.first_name}} via 'resend-notify' (allowlist is empty)
            marker rejected: 'first_name' is not in this endpoint's allowed_placeholders
✅ ALLOWED  no markers via 'resend-notify'             (allowed, returns nothing)
            {"data":{},"status":200}

실제 이메일이 전송되었습니다. 수신자의 주소와 이름은 데이터 소유자의 프로필에서 엔클레이브 내부에서 확인되었으며 — 에이전트의 입력, MCP 전송 계층, 계약의 메모리, 원장 어디에도 나타나지 않습니다.

마지막 줄은 기본 거부(deny-by-default) 응답 투영(projection)입니다: resend-notifyresponse_fields를 선언하지 않으므로, 성공적인 호출은 상태 코드와 빈 객체를 반환합니다. 업스트림의 메시지 ID조차도 공개되지 않습니다.

이후의 원장:

denied     0  resend/emails         markers=["profile.ssn", …]        'ssn' not allowed here
denied     0  resend/emails         markers=["secret.resend_api_key"] not a profile marker
denied     0  resend/domains        markers=[]                        path not enumerated
denied     0  stripe/emails         markers=[]                        unknown endpoint
ok       200  resend/emails         markers=["first_name","last_name","verified_contacts.email.value"]
denied     0  resend-notify/emails  markers=["profile.first_name", …] 'first_name' not allowed here
ok       200  resend-notify/emails  markers=[]

마커(marker) 이름 은 기록됩니다. 마커 은 기록할 수 없었습니다.

Related MCP server: Proofpane

빠른 시작

npm install
cp .env.example .env          # add your T3N_API_KEY from terminal3.io/claim-page
npm run test                  # 9 native policy tests, no network, no credits
npm run build                 # Rust → wasm32-wasip2
npm run deploy                # idempotent — safe to re-run
npm run doctor                # pre-flight a deployment you didn't just create
npm run demo                  # the run shown above

MCP 클라이언트에 추가:

{ "mcpServers": {
    "agentgate": { "command": "npx", "args": ["tsx", "/path/to/agentgate/mcp/server.ts"] } } }

엔드포인트 추가

파일 하나면 됩니다. Rust도, 계약 재배포도 필요 없습니다.

// agentgate.config.json
"endpoints": {
  "stripe": {
    "base": "https://api.stripe.com",
    "secret_key": "stripe_api_key",        // key in z:<tid>:secrets
    "auth_header": "Authorization",
    "auth_prefix": "Bearer ",
    "allowed_paths": ["/v1/customers"],    // exact match only
    "allowed_placeholders": ["first_name", "verified_contacts.email.value"],
    "response_fields": ["id"]              // everything else is dropped
  }
}

그런 다음 npm run deploy를 실행합니다. wasm이 변경되지 않았으면 계약 등록을 건너뛰므로, 엔드포인트 추가 비용은 약 1,850 크레딧이 아닌 약 160 크레딧입니다.

설계가 이렇게 된 이유

플랫폼에 대해 읽은 것이 아니라 측정한 결과에서 나온 세 가지 결정:

  • 거부는 Err가 아닌 Ok를 반환합니다. 계약 쓰기는 오류 발생 시 롤백되므로, 정책 거부 시 Err를 반환하면 해당 거부를 기록하는 감사 항목도 롤백됩니다 — 에이전트가 정책을 반복적으로 위반해도 흔적을 남기지 않을 수 있습니다.

  • 응답은 통과(pass-through)가 아닌 투영(projection)됩니다. http-with-placeholders아웃바운드 구간만 보호합니다. 업스트림 응답은 전체가 WASM으로 반환되므로, 요청을 그대로 반향(echo)하는 엔드포인트는 마커가 숨긴 PII를 다시 돌려줄 수 있습니다. docs/BUGS.md에서 실증되었습니다.

  • 계약은 Content-Type을 설정하지 않습니다. 호스트 앱이 사용자의 Content-Type을 대체하지 않고 자체 값을 추가하므로 application/json,application/json이 생성되고, 엄격한 업스트림은 이를 — HTTP 200과 빈 본문으로 — 조용히 거부합니다. docs/BUGS.md#1 참조.

저장소 구조

경로

설명

contract/

TEE 계약 — policy.rs는 순수(pure) 함수이며 네이티브 테스트됨, gateway.rs는 호스트와 통신

mcp/server.ts

MCP 서버 — 도구 3개

scripts/deploy.ts

멱등(idempotent) 배포; contract_id 원장을 관리

scripts/doctor.ts

사전 점검(pre-flight) 상태 확인

scripts/demo.ts

위에서 보여준 실행

agentgate.config.json

모든 엔드포인트와 권한을 선언적으로 정의 (엔드포인트 2개, 대조적인 정책)

deployments.json

지금까지 발급된 모든 contract_id의 커밋된 원장

docs/BUGS.md

플랫폼에 대한 발견 사항 13건

docs/ARCHITECTURE.md

엔클레이브 경계가 그 위치에 있는 이유

docs/HANDOVER.md

다음 운영자를 위한 런북(runbook)

contract-probe/

플레이스홀더 표면을 매핑하는 데 사용한 일회용 진단 도구 — 배포 대상 아님

상태

@terminal3/t3n-sdk@5.2.0으로 T3N 테스트넷에서 엔드투엔드로 구축 및 검증 완료, 전체 3-주체 흐름 실행:

주체

보유 항목

위 실행에서의 역할

테넌트

eth 키, 자금 조달됨

계약 소유, 자격 증명 봉인, 정책 열거

데이터 소유자

자체 DID + 프로필

에이전트에게 권한 부여; 마커는 소유자의 프로필을 기준으로 해석됨

에이전트

불투명한 베어러 토큰, 그 외 없음

위에 표시된 모든 호출 수행

에이전트의 서명 키는 TEE 내부에서 생성되었으며 절대 외부로 나가지 않았습니다. API 키도, URL도, 개인 데이터도 보유하지 않으며, 자신의 권한을 조회하기 위해 코어 계약에 접근할 수도 없습니다 — 그런데도 실제 받은편지함에 개인화된 이메일을 전달합니다.

이를 달성하려면 Terminal 3가 에이전트 DID에 수동으로 자금을 조달해야 했습니다: 발행된 에이전트는 0에서 시작하며 한 번의 호출이 10,000 토큰을 예약하는데, 셀프서비스 충전 기능이 없습니다 (docs/BUGS.md#10). 모든 개발자가 첫 에이전트에서 이 문제를 겪게 될 것입니다.

F
license - not found
Not graded
quality - not tested
B
maintenance

Maintenance

0Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    A
    maintenance
    Provides a trust and governance layer for AI agents, enabling secure API access, credential vaulting, paid execution with human approval, and automatic call resume.
    15
    2
  • A
    license
    B
    quality
    A
    maintenance
    A governance proxy for AI tools — every MCP/agent tool call is policy-gated, secret-redacted, and written to a hash-chained, offline-verifiable audit trail.
    13
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Bounded egress gateway & secret proxy for AI agents and applications, enabling safe credential injection into upstream requests while keeping raw secrets out of LLM prompt contexts.
    6
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Governed MCP gateway that lets AI agents call tools with policy enforcement, prompt-injection screening, a kill-switch, and tamper-evident signed audit logs.
    Apache 2.0

View all related MCP servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Anshv784/agentgate'

If you have feedback or need assistance with the MCP directory API, please join our Discord server