Deep Agents
Customer Support Chatbot with Deep Agents
Build an AI customer support chatbot that searches your FAQ knowledge base and answers questions accurately — with working Deep Agents code.
chatbotcustomer supportFAQknowledge base
Working Code
from deepagents import create_deep_agentfrom langchain_core.tools import tool
@tooldef search_faq(query: str) -> str: """Search the FAQ knowledge base for relevant answers.""" results = faq_store.similarity_search(query, k=3) return "\n\n".join( f"Q: {r.metadata['question']}\nA: {r.page_content}" for r in results )
agent = create_deep_agent( model="anthropic:claude-sonnet-4-5-20250929", tools=[search_faq], system_prompt="You are a helpful customer support agent. Use search_faq to find answers from the knowledge base before responding. Always cite the source FAQ.",)
result = agent.invoke({ "messages": [("user", "How do I reset my password?")]})print(result["messages"][-1].content)Step by Step
1
Install dependencies
Install Deep Agents and the required tools for this use case.
2
Define your tools
Create the domain-specific tool functions your agent will use to interact with external services.
3
Create the agent and run
Initialize the Deep Agents agent with your tools, set the system prompt, and execute a query.
Build with other frameworks
Ready to build with Deep Agents?
Generate a production-ready project with Deep Agents pre-configured — FastAPI + Next.js, auth, streaming, and more.
Get StartedReady to build your first production AI agent?
Open-source tools, battle-tested patterns, zero boilerplate. Configure your stack and ship in minutes — not months.