← Back to Dashboard
AI Agent Assistant
Intelligent agents with built-in web search via DuckDuckGo. When relevant, answers are grounded with fresh context.
How the agent thinks and acts
The interaction pattern follows ReAct—agents interleave reasoning steps with actions such as web lookups or tool calls to gather evidence.
The open-source LangChain ReAct agent demonstrates how prompts, scratchpads, and tools come together. This demo keeps it framework-agnostic but mirrors the same orchestration.
View Sample Code
def process_agent_message(message: str) -> tuple[str, str]:
search_results = search_duckduckgo(message)
if search_results:
prompt = f"Search results: {search_results}
Question: {message}
Use the search findings when relevant."
source = "search"
else:
prompt, source = message, "direct"
reply = call_openai([
{"role": "system", "content": "You are a helpful AI research assistant."},
{"role": "user", "content": prompt},
])
return reply, source
The research agent is waiting for your first message.