Skip to content

feat(examples): add agent trust check via TWZRD Agent Intel MCP server#1929

Open
twzrd-sol wants to merge 1 commit into
openai:mainfrom
twzrd-sol:add-twzrd-agent-trust-example
Open

feat(examples): add agent trust check via TWZRD Agent Intel MCP server#1929
twzrd-sol wants to merge 1 commit into
openai:mainfrom
twzrd-sol:add-twzrd-agent-trust-example

Conversation

@twzrd-sol

Copy link
Copy Markdown

What

Adds examples/agent-trust-check.ts — a working example that shows how to verify an AI agent's wallet trust score (via TWZRD Agent Intel, an MCP server) before passing the result to OpenAI for a pass/fail decision.

Pattern

MCP tool call (score_agent / preflight_check) → OpenAI chat completion → ALLOW / BLOCK

This is a common multi-agent pattern: external tool → LLM decision. The TWZRD server is free for score_agent and preflight_check — no API key needed.

Usage

npm install @modelcontextprotocol/sdk
OPENAI_API_KEY=sk-... yarn tsn -T examples/agent-trust-check.ts

MCP server details

  • Endpoint: https://intel.twzrd.xyz/mcp (streamable-http)
  • Tools: score_agent(wallet), preflight_check(wallet) (free), get_trust_receipt(wallet) (paid x402)
  • npm: twzrd-agent-intel

@twzrd-sol twzrd-sol requested a review from a team as a code owner June 6, 2026 22:36

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7b588eec9f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +17 to +18
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Declare the MCP SDK dependency

This new example imports @modelcontextprotocol/sdk, but neither the root package.json nor examples/package.json/lockfile declares that package. The repo's lint path runs ./node_modules/typescript/bin/tsc with tsconfig.json including examples, so a normal checkout after yarn install/scripts/bootstrap will fail type-checking with an unresolved module before anyone has manually run the install command from this file's comment. Add the dependency to the checked-in examples package metadata so CI and consumers can resolve the import.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant