Multi-tool research agent
Bind Brime's three tools to a LangChain agent that picks the right one per question.
Wire the three Brime tools (BrimeSearch, BrimeExtract, BrimeResearch) into create_agent and let the LLM pick which to call.
from langchain.agents import create_agent
from langchain_brime import BrimeSearch, BrimeExtract, BrimeResearch
agent = create_agent(
model="anthropic:claude-3-5-haiku-latest",
tools=[BrimeSearch(), BrimeExtract(), BrimeResearch()],
system_prompt=(
"You're a research assistant. Use brime_search for quick lookups, "
"brime_extract for full page content, and brime_research only when "
"the user asks for a synthesised report."
),
)
result = agent.invoke(
{"messages": [{"role": "user", "content": "What new features shipped in the latest Stripe API release?"}]}
)
print(result["messages"][-1].content)The agent will (typically) call brime_search once, optionally brime_extract for the deepest source, and synthesise a final answer with citations.
For how deep research runs end to end, see How research works.
This recipe will be expanded with full traces, LangSmith integration, and prompt tuning notes.