Skip to content

Python: Add BotsRated to the Python community projects - #9660

Open
amcc8q wants to merge 1 commit into
microsoft:mainfrom
amcc8q:feat/community-botsrated
Open

amcc8q wants to merge 1 commit into
microsoft:mainfrom
amcc8q:feat/community-botsrated

Conversation

@amcc8q

@amcc8q amcc8q commented Oct 23, 2026 •

Copy link
Copy Markdown

Motivation & Context

I work on BotsRated (https://botsrated.com), so I'm affiliated with the project this row lists. BotsRated probes paid x402 sellers on Base and records the payTo wallet each one quotes. This PR adds our Agent Framework integration to the Middleware section of the Python catalog.

The integration is published for the Python SDK. agent-framework-botsrated (0.1.2 on PyPI) is in our public MIT repository at https://github.com/botsrated/botsrated/tree/main/integrations/microsoft-agent-framework. It is on PyPI: pip install agent-framework-botsrated (pypi.org/project/agent-framework-botsrated). The package works like this:

  • BotsRatedPaymentMiddleware subclasses FunctionMiddleware and only checks the payment functions you name. It reads the quote (url, pay_to, amount, network) from the call's arguments, or uses an extractor you supply. It then asks BotsRated's free preflight (no key, no wallet) whether that payTo was observed for the seller.
  • If the payTo wasn't observed, or the quote can't be read, the call never reaches call_next. The reason becomes the call's result so the model reads it. With on_block="raise", the run ends with a MiddlewareFailure subclass instead. The decision is stored in context.metadata["botsrated_decision"].
  • botsrated_check_payment_tool() is a FunctionTool the model can call to check a payment option itself.

The row links to the integration's README, and issues go to https://github.com/botsrated/botsrated/issues/new. I'm not listing our hosted MCP server, because the catalog excludes standard MCP servers.

Testing: the package has 21 tests. They use a scripted chat client built on FunctionInvocationLayer and ChatMiddlewareLayer, so no model API key is needed. 17 tests run offline and pass with agent-framework-core 1.23.0 (an earlier version of the suite also ran on 1.22.0). 4 tests are live and call the real free BotsRated preflight and the hosted MCP server. A payment call with an unknown payTo was blocked without running, and a call with the payTo BotsRated observed for the seller ran. The payment function is a stub, so nothing was paid. To reproduce in a minute with no API key, clone the repository, pip install -e integrations/microsoft-agent-framework, then run python integrations/microsoft-agent-framework/examples/quickstart.py.

Description & Review Guide

  • What are the major changes? One row in the Middleware section of python/samples/community-projects.md, in alphabetical order between ACGS and Tracekit.
  • What is the impact of these changes? Documentation only.
  • What do you want reviewers to focus on? The wording of the row. I'm happy to change it or move it.

Related Issue

N/A - trivial change: one catalog row in the format the catalog criteria define, no code.

AI Assistance

  • No material AI assistance was used.
  • This is an AI-assisted contribution. I reviewed, understood, and verified all submitted content and accept responsibility for it.

AI assistance details: an AI assistant drafted the catalog row, this description, and the linked integration's code, tests and README. I tested them as described above.

Contribution Checklist

  • The code builds clean without any errors or warnings
  • All unit tests pass, and I have added new tests where possible
  • The PR follows the Contribution Guidelines
  • This PR links to an agreed issue with no competing open PR, or the Related Issue section documents a trivial-change or repository-automation exception.
  • This is not a breaking change. If it is a breaking change, add the breaking change label (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.

Copilot AI balanced review requested due to automatic review settings October 23, 2026 21:17
@amcc8q
amcc8q deployed to github-app-auth October 23, 2026 21:17 — with GitHub Actions Active
@amcc8q
amcc8q deployed to github-app-auth October 23, 2026 21:17 — with GitHub Actions Active
@agent-framework-automation agent-framework-automation Bot added documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs python Usage: [Issues, PRs], Target: Python labels Oct 23, 2026
@amcc8q
amcc8q deployed to github-app-auth October 23, 2026 21:17 — with GitHub Actions Active
@github-actions github-actions Bot changed the title Add BotsRated to the Python community projects Python: Add BotsRated to the Python community projects Oct 23, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Local catalog checks pass, but the required Markdown link-check result remains unverified.

No open issues 🎉

What changed in this PR

Adds BotsRated’s published Python integration to the community-project catalog under Middleware.

Changes:

  • Describes payment-call checks and the optional model-callable payment-check tool.
  • Links directly to the integration and external issue-creation page.
  • Places BotsRated alphabetically between ACGS and Tracekit.
File Description
python/​samples/​community-projects.md Adds the BotsRated middleware catalog entry; documentation only.

Review effort: Balanced

@amcc8q
amcc8q deployed to github-app-auth October 23, 2026 21:21 — with GitHub Actions Active
@amcc8q
amcc8q deployed to github-app-auth October 24, 2026 02:52 — with GitHub Actions Active

This branch was successfully deployed

1 active deployment
github-app-auth — 7c94b2eb Deployed Oct 24, 2026 by amcc8q via add_label #26070
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs python Usage: [Issues, PRs], Target: Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants