Skip to content

[Fleet Execution] Add Tool Filtering Custom AI Workflow Example #311

@jules-fleet

Description

@jules-fleet

Objective

Create a Tier 5 Custom AI Workflow demonstrating Vercel AI SDK adapter usage with tool filtering (stitchTools({ include: [...] })), highlighting how to restrict or sandbox available tools for LLMs.

Code-Level Diagnosis

Code path: packages/sdk/examples/tool-filtering/
Mechanism: The packages/sdk/examples/ directory lacks the tool-filtering script.
Root cause: Missing concrete example isolating and demonstrating the Vercel AI SDK filtering capability inherent to stitchTools().

Current Implementation

// No tool-filtering example currently exists

Proposed Implementation

Files to modify: Create packages/sdk/examples/tool-filtering/index.ts and packages/sdk/examples/tool-filtering/README.md.

Integration (Before -> After)

+// Create tool-filtering index.ts and README.md
+import { stitchTools } from "@google/stitch-sdk/ai";
+import "../_require-key.js";
+// Implement logic restricting AI tools

Test Scenarios

  1. Execute cd packages/sdk/examples/tool-filtering && bun index.ts -> Ensure script executes successfully and logs the filtered set of tools available to the simulated LLM runtime.

Target Files

  • packages/sdk/examples/tool-filtering/index.ts
  • packages/sdk/examples/tool-filtering/README.md

Boundary Rules

Restrict your modifications exclusively to the files listed in the Target Files section. Ensure your source changes are entirely backward-compatible if unowned tests outside your boundary fail. Retain all existing file names and locations outside your explicitly declared target list.


Fleet Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    fleetFleet-managed issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions