Use
meta_tools when you create a session to enable or disable individual tools.
nango_tool_search
Keep the agent’s context small even when the toolset contains hundreds of tools. The agent finds the tools it needs on demand and runs them withnango_execute.
Search the session’s toolset with up to five queries in one call. Use a few keywords per tool and pass the user’s overall task as goal.
integrations and returns one result per query, in request order. Each result includes matches with tool names, descriptions, and input schemas when available.
nango_execute
Run a session tool by name and return its result. This lets the agent call tools it finds through search, including tools that aren’t pinned.Keep
nango_execute enabled when nango_tool_search is on. With execution disabled, the agent can still find unpinned tools through search, but it can’t call them.nango_proxy
Call the provider’s API directly when the session has no tool for the operation you need. Nango authenticates the HTTP request using the integration’s connection.query_params and headers for additional request parameters. Nango rejects credential headers such as authorization and x-api-key.
The response includes the provider’s status, headers, and body. The body can be JSON or UTF-8 text up to 5 MB. Use the HTTP proxy for binary or larger responses and file uploads.
nango_create_connection
By default, the agent can use only the connections available when the session starts. Enablenango_create_connection so the agent can ask the user to connect an integration when it first needs it or reconnect an integration if its connection stops working.
The agent shares the returned connect_url with the user. Once the user opens the Connect link and authorizes the connection, the agent can use the integration’s tools immediately in the same session.
Tag connections for future sessions
Nango adds thenango/agent_session tag so the current session can find the new connection. Add your own connection tags when you enable nango_create_connection. Use identifiers that matter to your app, such as a user or organization ID, so you can select the connection in future sessions and filter for it elsewhere in Nango.
organization_id: acme in tenant.connections.any[].tags. See Select connections by tags.
Reconnecting a connection
Connections can stop working when tokens expire and can’t be refreshed, or when the user revokes access. Passreconnect: true to create a reauthorization link for an integration already connected in the session. Once the user reauthorizes, the agent can resume using the integration’s tools in the same session. The connection keeps its ID, tags, and metadata.
See Build re-authorization for the general Nango flow.