Skip to content

Conversation

@catalyst17
Copy link
Contributor

@catalyst17 catalyst17 commented Jun 10, 2025

[Portal] Feature: Add Webhooks Documentation for AI Agents + Example with multiple ABIs for decoding

Notes for the reviewer

Example with multiple ABIs for decoding (related PR)

  1. Added examples on creating events filters with multiple ABI options

Also, this PR adds comprehensive documentation about using webhooks with AI agents in the Insight platform. The documentation covers:

  1. Use cases for webhooks with AI agents
  2. How to create and manage webhooks
  3. Filtering capabilities, including support for multiple ABIs
  4. Information about webhook payloads

Summary by CodeRabbit

  • Documentation
    • Added a new "Webhooks" section describing how to use webhooks with the Insight API for real-time blockchain event notifications and event-driven AI agents.
    • Provided use cases, filter examples, and links to detailed webhook and payload documentation.
    • Enhanced webhook filter documentation to clarify support for multiple ABIs, including examples for handling ERC-20 and ERC-721 Transfer events.

PR-Codex overview

This PR enhances the documentation for Webhooks, detailing their functionality, use cases, and configuration. It introduces clearer explanations and examples for creating and managing webhooks, filtering events, and understanding payloads, aimed at aiding developers in building event-driven AI agents.

Detailed summary

  • Added a section on Webhooks with an overview and use cases.
  • Included detailed instructions for creating and managing webhooks via the Insight API.
  • Expanded on filtering events with examples for ERC-20 and ERC-721.
  • Clarified payload structure and its importance for agents.
  • Updated filtering documentation to support multiple event ABIs.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@vercel vercel bot temporarily deployed to Preview – thirdweb-www June 10, 2025 16:05 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui June 10, 2025 16:05 Inactive
@vercel
Copy link

vercel bot commented Jun 10, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 10, 2025 7:03pm
4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
login ⬜️ Skipped (Inspect) Jun 10, 2025 7:03pm
thirdweb_playground ⬜️ Skipped (Inspect) Jun 10, 2025 7:03pm
thirdweb-www ⬜️ Skipped (Inspect) Jun 10, 2025 7:03pm
wallet-ui ⬜️ Skipped (Inspect) Jun 10, 2025 7:03pm

@linear
Copy link

linear bot commented Jun 10, 2025

@vercel vercel bot temporarily deployed to Preview – thirdweb_playground June 10, 2025 16:05 Inactive
@vercel vercel bot temporarily deployed to Preview – login June 10, 2025 16:05 Inactive
@changeset-bot
Copy link

changeset-bot bot commented Jun 10, 2025

⚠️ No Changeset found

Latest commit: a332124

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 10, 2025

Walkthrough

New documentation sections about webhooks were added to describe their use with the Insight API for real-time blockchain event notifications. The webhook filtering documentation was expanded to clarify support for multiple ABIs, including examples for handling events with shared signature hashes. No changes were made to code, APIs, or exported entities.

Changes

File(s) Change Summary
.../insight/agents-and-llms/llmstxt/page.mdx
.../insight/agents-and-llms/page.mdx
Added new "Webhooks" documentation sections describing webhook usage, management, filtering, and payload structure.
.../insight/webhooks/filtering/page.mdx Expanded documentation for webhook filters, clarifying the abi field and adding guidance/examples for supporting multiple ABIs.

Sequence Diagram(s)

sequenceDiagram
    User->>Insight API: Create webhook with filter (multiple ABIs)
    Insight API->>Blockchain: Monitor for matching events/transactions
    Blockchain-->>Insight API: Emits event (e.g., Transfer)
    Insight API->>Insight API: Decode event using provided ABI(s)
    Insight API->>Webhook Endpoint: Send payload with event/transaction data
    Webhook Endpoint->>User Agent: Parse and process payload
Loading

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (2)
  • ERC-20: Entity not found: Issue - Could not find referenced Issue.
  • ERC-721: Entity not found: Issue - Could not find referenced Issue.

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a332124 and 6393560.

📒 Files selected for processing (3)
  • apps/portal/src/app/insight/agents-and-llms/llmstxt/page.mdx (1 hunks)
  • apps/portal/src/app/insight/agents-and-llms/page.mdx (1 hunks)
  • apps/portal/src/app/insight/webhooks/filtering/page.mdx (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • apps/portal/src/app/insight/agents-and-llms/page.mdx
  • apps/portal/src/app/insight/agents-and-llms/llmstxt/page.mdx
  • apps/portal/src/app/insight/webhooks/filtering/page.mdx
⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: Lint Packages
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: Size
  • GitHub Check: Unit Tests
  • GitHub Check: Analyze (javascript)

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added the Portal Involves changes to the Portal (docs) codebase. label Jun 10, 2025
@catalyst17 catalyst17 requested review from a team and saminacodes June 10, 2025 16:05
Copy link
Contributor Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@codecov
Copy link

codecov bot commented Jun 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.57%. Comparing base (62af256) to head (6393560).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7317   +/-   ##
=======================================
  Coverage   55.57%   55.57%           
=======================================
  Files         909      909           
  Lines       58673    58673           
  Branches     4158     4158           
=======================================
  Hits        32607    32607           
  Misses      25959    25959           
  Partials      107      107           
Flag Coverage Δ
packages 55.57% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@catalyst17 catalyst17 marked this pull request as ready for review June 10, 2025 16:07
@catalyst17 catalyst17 requested review from a team as code owners June 10, 2025 16:08
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
apps/portal/src/app/insight/agents-and-llms/page.mdx (1)

345-383: Use JSON code fences for JSON snippets
The webhook filter example is pure JSON, not TypeScript. Please change the fence from typescript to json for clarity and correct syntax highlighting.

- ```typescript
+ ```json
  {
    "v1.events": {
      "chain_ids": ["1"],
      "signatures": [
        {
          "sig_hash": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
          "abi": "[{\"anonymous\":false,...},{\"anonymous\":false,...}]"
        }
      ]
    }
  }
- ```
+ ```
apps/portal/src/app/insight/agents-and-llms/llmstxt/page.mdx (1)

322-361: Standardize headings & use JSON fences

  • The headings ### Filtering and ### Payload here differ from Filtering Events and Understanding the Payload in the main Agents & LLMs page. Align them for consistency across docs.
  • The webhook filter example is JSON; update the fence declaration accordingly.
- ### Filtering
+ ### Filtering Events

- ### Payload
+ ### Understanding the Payload

- ```typescript
+ ```json
  {
    "v1.events": {
      "chain_ids": ["1"],
      "signatures": [
        { ... }
      ]
    }
  }
- ```
+ ```
apps/portal/src/app/insight/webhooks/filtering/page.mdx (1)

85-111: Use JSON fences for the multi-ABI example
The example payload is JSON, so switch the code block from TypeScript to JSON to ensure correct syntax highlighting.

- ```typescript
+ ```json
  {
    ...
    "filters": {
      "v1.events": {
        "chain_ids": ["1"],
        "signatures": [
          {
            "sig_hash": "...",
            "abi": "[{...},{...}]"
          }
        ]
      }
    }
    ...
  }
- ```
+ ```
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9643b8d and a332124.

📒 Files selected for processing (3)
  • apps/portal/src/app/insight/agents-and-llms/llmstxt/page.mdx (1 hunks)
  • apps/portal/src/app/insight/agents-and-llms/page.mdx (1 hunks)
  • apps/portal/src/app/insight/webhooks/filtering/page.mdx (3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Size
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (1)
apps/portal/src/app/insight/webhooks/filtering/page.mdx (1)

31-38: Clarified optional abi property
Great addition of abi?: string with clear docs that it can accept a single object or an array of objects as a string. This accurately reflects the new multi-ABI support.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 10, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 62.57 KB (0%) 1.3 s (0%) 440 ms (+154.02% 🔺) 1.7 s
thirdweb (cjs) 345.55 KB (0%) 7 s (0%) 1.3 s (+4.17% 🔺) 8.3 s
thirdweb (minimal + tree-shaking) 5.7 KB (0%) 114 ms (0%) 177 ms (+1531.32% 🔺) 291 ms
thirdweb/chains (tree-shaking) 531 B (0%) 11 ms (0%) 58 ms (+891.1% 🔺) 69 ms
thirdweb/react (minimal + tree-shaking) 19.56 KB (0%) 392 ms (0%) 207 ms (+744.51% 🔺) 599 ms

@graphite-app
Copy link
Contributor

graphite-app bot commented Jun 10, 2025

Merge activity

# [Portal] Feature: Add Webhooks Documentation for AI Agents + Example with multiple ABIs for decoding

## Notes for the reviewer

Example with multiple ABIs for decoding ([related PR](https://app.graphite.dev/github/pr/thirdweb-dev/insight-service/268/fix-improve-ABI-validation-to-support-array-format))

1. Added examples on creating events filters with multiple ABI options

Also, this PR adds comprehensive documentation about using webhooks with AI agents in the Insight platform. The documentation covers:

1. Use cases for webhooks with AI agents
2. How to create and manage webhooks
3. Filtering capabilities, including support for multiple ABIs
4. Information about webhook payloads

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

- **Documentation**
  - Added a new "Webhooks" section describing how to use webhooks with the Insight API for real-time blockchain event notifications and event-driven AI agents.
  - Provided use cases, filter examples, and links to detailed webhook and payload documentation.
  - Enhanced webhook filter documentation to clarify support for multiple ABIs, including examples for handling ERC-20 and ERC-721 Transfer events.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@graphite-app graphite-app bot force-pushed the arsenii/infra-1447-allow-filtering-by-multiple-abi-options branch from a332124 to 6393560 Compare June 10, 2025 18:53
@vercel vercel bot temporarily deployed to Preview – thirdweb-www June 10, 2025 18:53 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground June 10, 2025 18:53 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui June 10, 2025 18:53 Inactive
@vercel vercel bot temporarily deployed to Preview – login June 10, 2025 18:53 Inactive
@graphite-app graphite-app bot merged commit 6393560 into main Jun 10, 2025
24 checks passed
@graphite-app graphite-app bot deleted the arsenii/infra-1447-allow-filtering-by-multiple-abi-options branch June 10, 2025 19:04
@vercel vercel bot temporarily deployed to Production – thirdweb_playground June 10, 2025 19:05 Inactive
@vercel vercel bot temporarily deployed to Production – thirdweb-www June 10, 2025 19:05 Inactive
@vercel vercel bot temporarily deployed to Production – login June 10, 2025 19:05 Inactive
@vercel vercel bot temporarily deployed to Production – wallet-ui June 10, 2025 19:05 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Portal Involves changes to the Portal (docs) codebase.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants