Install a piece
Install the package for the integration you need. Every shipped piece is native and includes its runtime dependencies.Create an instance and select tools
pieceConfig into your root config alongside your database, collections, secret, and AI provider configuration. This example uses a developer access token. For user-owned credentials, reuse the factory instances from the OAuth connection example.
Pieces expose actions directly. Pass only the actions your agent needs in tools, or pass the piece to expose all of its actions. Each action can also be called on the server with { input, req } to use the caller’s credentials; add overrideAccess: true for a trusted call with no user. An action’s run receives the agent run’s overrideAccess (or the call’s, default false) and forwards it to the files it reads and writes.
An action is also a tool object, so you change one by spreading it: { ...googleSheets.updateRow, approval: 'ask' } asks a person before each call and keeps the action’s connection. Listed next to the whole piece, it replaces the piece’s tool of the same slug. See Change a tool you didn’t write.
Tool slugs combine the instance slug and action name, such as google-sheets_getRows, so tools from different pieces do not collide. See Google actions for the action inventory and key input details.
Factory options
Every piece factory accepts these options. Each piece page lists the full set for its factory, including the piece’s own options.OAuthApp takes:
Keep tool sets focused
Configure only the tools an agent needs. About 20 to 40 tools per agent is a practical ceiling for reliable selection by the model. Prefer explicit action subsets when combining several pieces.Network access
The HTTP and GraphQL pieces can request arbitrary URLs without an allowlist. Only assign them to trusted agents and treat access to private network addresses and cloud metadata endpoints as an intentional SSRF risk.File output
Pieces that create files buffer the complete result in memory and write it to the collection markedfile: true. Set upload size limits appropriate for your deployment. Without a marked collection, those actions fail when they run:
filesCollectionSlug, which returns the marked collection’s slug or throws that error:
Pass
collection to req.frogbot.create with the file to store it, with req and the overrideAccess your action’s run received.
Credentials and linked accounts
Pass developer credentials as factoryauth. To let users link accounts, configure root connections entries with oauth: true, secret: true, or both supported methods. Factory oauth holds your app credentials; it does not enable linking by itself. See Connections.
A piece’s OAuth recipe either describes a redirect flow (authorizationUrl, tokenUrl) that FrogBot runs with your app, or runs the sign-in itself through authorize, as OpenAI’s Continue with ChatGPT does. A piece that runs its own sign-in needs no OAuth app. See Pieces that run their own sign-in.
Use the identity-only createGoogle factory for Google sign-in. Pass google.oauth to createGoogleSheets, createGoogleDrive, createGoogleCalendar, or createGmail to share the app credentials. Each product has its own scopes, connection entry, and callback. A Google login or identity connection does not authorize product actions.