Skip to content

About

Apartment search agent

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

NYC Apartment Search Agent

An interactive apartment search assistant powered by LangChain Deep Agents and Tavily web search. Uses Anthropic's Claude Sonnet 4.6 for LLM inference.

Features

  • Conversational intake — Asks clarifying questions about budget, neighborhood, commute, pets, amenities, and more before searching
  • Structured research — Searches StreetEasy, Apartments.com, Zillow, and other sources using Tavily
  • NYC expertise — Built-in knowledge of boroughs, neighborhoods, transit lines, and rental market norms
  • LangSmith tracing — Full observability of agent planning, tool calls, and responses
  • Session management — Maintains conversation context; type new to start a fresh search

Prerequisites

Setup

1. Install dependencies

pip install -e .

Or with uv:

uv sync

2. Configure API keys

Edit the .env file with your actual keys:

ANTHROPIC_API_KEY=sk-ant-your-actual-key
TAVILY_API_KEY=tvly-your-actual-key
LANGSMITH_API_KEY=lsv2-your-actual-key
LANGSMITH_TRACING=true
LANGSMITH_PROJECT=apt-search

3. Run the agent

python agent.py

Usage

The agent follows a structured workflow:

  1. Intake — Asks you about budget, preferred neighborhoods, commute, apartment size, pets, amenities, deal-breakers, and more
  2. Confirmation — Summarizes your criteria and asks you to confirm
  3. Research — Searches multiple sources for matching listings and neighborhood data
  4. Report — Presents organized findings with recommendations
  5. Iteration — Refines the search based on your feedback

Commands

Command Action
new Start a new search session
quit / exit End the program

Project Structure

apt-search/
├── .env                              # API keys
├── pyproject.toml                    # Dependencies
├── agent.py                          # Main interactive agent
├── README.md
└── skills/
    ├── apartment-search-intake/
    │   └── SKILL.md                  # Intake & clarifying questions
    ├── apartment-research/
    │   └── SKILL.md                  # Search strategy & reporting
    └── nyc-neighborhoods/
        └── SKILL.md                  # NYC neighborhood knowledge

Skills

apartment-search-intake

Guides the agent to collect comprehensive search criteria before doing any research. Covers: budget, location, commute, apartment size, move-in timeline, pets, amenities, deal-breakers, lease preferences, and financial readiness.

apartment-research

Provides the structured research workflow: search strategy across multiple platforms, evaluation criteria, comparison framework, and report format.

nyc-neighborhoods

NYC-specific knowledge base covering all five boroughs, subway lines, commute estimates, pricing tiers, and essential rental market facts (broker fees, income requirements, rent stabilization, etc.).

LangSmith Tracing

Tracing is enabled by default via the .env file. View your traces at smith.langchain.com under the apt-search project to see:

  • Agent planning and task decomposition
  • Tavily search queries and results
  • Skill activation and usage
  • Full conversation history

About

Apartment search agent

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages