reminix.adapters.langchain.from_chat_model

reminix.adapters.langchain.from_chat_model(model, *, name, metadata=None)[source]

Create a Reminix Agent from a LangChain chat model.

This is the simplest adapter - wraps a chat model directly without any chain or agent logic.

Parameters:
  • model (LangChainChatModelProtocol) – A LangChain chat model instance (ChatOpenAI, ChatAnthropic, etc.).

  • name (str) – Name for the Reminix agent.

  • metadata (dict[str, Any] | None) – Optional metadata for the agent.

Return type:

Agent

Returns:

A Reminix Agent that wraps the chat model.

Example:

from langchain_openai import ChatOpenAI
from reminix.adapters.langchain import from_chat_model
from reminix.runtime import serve

# Create chat model
llm = ChatOpenAI(model="gpt-4o")

# Wrap and serve
reminix_agent = from_chat_model(llm, name="gpt4-chat")
serve(reminix_agent)