Skip to content

Draft: Reimplement Duo Chat agent with LangChain

What does this merge request do and why?

refactor: generalize Agents by using LCEL

In order to make our Agent abstraction support multiple providers (see #471 (closed)) we incorporate the LangChain Expression Language (LCEL) to our stack, which provides generic interfaces for LLM chains supporting various backends. To make this initial changeset more manageable, we add langchain utils on top of our existing LLM abstractions. Future changes can further simplify our structure by migrating some of our homegrown logic to the ready-made LCEL abstractions.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Merge request checklist

  • Tests added for new functionality. If not, please raise an issue to follow up.
  • Documentation added/updated, if needed.

Merge request reports