Skip to content

Adding integrations

Noel Fran Thomas edited this page Jul 21, 2024 · 3 revisions

updated July 19, 2024

The code changes for each can be found around July 16, 2024.

How to add data integrations

A data integration imports data from one source and stores it in Bridge. Bridge decides how and where to load the data, and will also decide what information to return during a query. For this, we are using Nango as a proxy API.


  • Non-syncing (for now)
  • Bridge decides how to search
  1. Add integration to Nango
  2. Add connection to Nango
  3. Add to the type-selector, by updating labels in @/lib/data/data.tsx
  4. Add code to build a file that can be sent to Bridge. For example, in the Linear connection, we build a json file that holds all issues. On submit, this is sent to Bridge. Name this code @/components/add-data-.tsx. Make sure to send the file type as the c_type argument if it has a specific structure (PDFs, and .docx can be inferred, but Linear json can’t be).
  5. Create the appropriate routes under app/api/upload//route.ts
  6. Add code to Bridge to check for the new file type (if there is one)
  7. Add code to Bridge to handle that file in the load function under storage.py

How to add search integrations

A search integration does not import any data. Instead, these integrations are called at query time. Sorting, ranking and so forth are the responsibility of the integration.

  • Syncing
  • Search results are decided by the search integration
  1. Create a results type. What do you expect to receive when the search API is called?
  2. Create a tool that can be registered, and makes an API call. Call this @/lib/agents/tools/-search.tsx
  3. Register the tool to @/lib/agents/tools/index.tsx
  4. Update the prompt in @/lib/agents/researcher.tsx to help the called LLM understand the new tool.
  5. Add code to @/components/ to create a search results section. This will handle how your results are displayed. Call this @/components/search-results-.tsx.
  6. Update @/components/search-section.tsx to receive the new search results

Clone this wiki locally