# langchain-ai/lca-lc-foundations architecture

> Architecture diagram of the GitHub repository langchain-ai/lca-lc-foundations, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/langchain-ai/lca-lc-foundations
- Repository: https://github.com/langchain-ai/lca-lc-foundations

## Overview

This repository is a LangChain Academy course companion, not one integrated application: its lessons demonstrate agent creation, MCP, and production-oriented agent patterns, with an optional chat UI. The principal user-to-result flow is exploring a lesson project to see an agent perform a domain task; in the email lesson, the UI also supports inspecting and responding to human-review interruptions. The README documents additional lesson topics, but most lesson implementations are not sampled, so those capabilities are represented without speculative internal links.

Main entry points: [`notebooks/module-1/1.5_personal_chef.py`](https://github.com/langchain-ai/lca-lc-foundations/blob/main/notebooks/module-1/1.5_personal_chef.py) (Personal Chef), [`notebooks/module-3/agent-chat-ui/src/components/thread/agent-inbox/index.tsx`](https://github.com/langchain-ai/lca-lc-foundations/blob/main/notebooks/module-3/agent-chat-ui/src/components/thread/agent-inbox/index.tsx) (Interrupt Review), [`notebooks/module-3/3.5_email_agent.py`](https://github.com/langchain-ai/lca-lc-foundations/blob/main/notebooks/module-3/3.5_email_agent.py) (Email Agent), [`notebooks/module-3/agent-chat-ui/src/app/page.tsx`](https://github.com/langchain-ai/lca-lc-foundations/blob/main/notebooks/module-3/agent-chat-ui/src/app/page.tsx) (Chat UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_course["Course Projects"]
  node_chef["Personal Chef"]
  node_mcp["MCP Server<br/>[2.1_mcp_server.py]"]
  node_email["Email Agent<br/>[3.5_email_agent.py]"]
end

subgraph group_chat["Chat Interface"]
  node_webapp["Chat UI<br/>[page.tsx]"]
  node_thread["Conversation View<br/>[index.tsx]"]
  node_history["Thread History<br/>[index.tsx]"]
  node_messages["Message Rendering<br/>[ai.tsx]"]
  node_multimodal["Content Previews"]
end

subgraph group_review["Human Review"]
  node_inbox["Interrupt Review<br/>[index.tsx]"]
  node_actions["Review Actions"]
  node_input["Decision Input"]
  node_state["State Inspector<br/>[state-view.tsx]"]
end

subgraph group_runtime["UI Runtime"]
  node_api["API Proxy<br/>[route.ts]"]
  node_threadprovider["Thread Provider<br/>[Thread.tsx]"]
  node_client["Graph Client<br/>[client.ts]"]
  node_stream["Stream Provider<br/>[Stream.tsx]"]
end

node_learner(("Learner"))
node_model(("Model Providers"))
node_search(("Tavily Search"))
node_graphapi(("LangGraph API"))

node_learner -->|"explores lesson"| node_chef
node_learner -->|"explores lesson"| node_mcp
node_learner -->|"explores lesson"| node_email
node_learner -->|"uses bonus UI"| node_webapp
node_messages -->|"renders review"| node_inbox
node_inbox -->|"shows actions"| node_actions
node_inbox -->|"shows state"| node_state
node_actions -->|"collects decisions"| node_input
node_threadprovider -->|"creates client"| node_client
node_stream -->|"uses provider"| node_threadprovider
node_chef -.->|"uses models"| node_model
node_email -.->|"uses models"| node_model
node_chef -.->|"uses search"| node_search
node_webapp -.->|"connects to runtime"| node_graphapi

click node_chef "https://github.com/langchain-ai/lca-lc-foundations/blob/main/notebooks/module-1/1.5_personal_chef.py"
click node_mcp "https://github.com/langchain-ai/lca-lc-foundations/blob/main/notebooks/module-2/resources/2.1_mcp_server.py"
click node_email "https://github.com/langchain-ai/lca-lc-foundations/blob/main/notebooks/module-3/3.5_email_agent.py"
click node_webapp "https://github.com/langchain-ai/lca-lc-foundations/blob/main/notebooks/module-3/agent-chat-ui/src/app/page.tsx"
click node_api "https://github.com/langchain-ai/lca-lc-foundations/blob/main/notebooks/module-3/agent-chat-ui/src/app/api/%5B..._path%5D/route.ts"
click node_threadprovider "https://github.com/langchain-ai/lca-lc-foundations/blob/main/notebooks/module-3/agent-chat-ui/src/providers/Thread.tsx"
click node_client "https://github.com/langchain-ai/lca-lc-foundations/blob/main/notebooks/module-3/agent-chat-ui/src/providers/client.ts"
click node_stream "https://github.com/langchain-ai/lca-lc-foundations/blob/main/notebooks/module-3/agent-chat-ui/src/providers/Stream.tsx"
click node_thread "https://github.com/langchain-ai/lca-lc-foundations/blob/main/notebooks/module-3/agent-chat-ui/src/components/thread/index.tsx"
click node_history "https://github.com/langchain-ai/lca-lc-foundations/blob/main/notebooks/module-3/agent-chat-ui/src/components/thread/history/index.tsx"
click node_messages "https://github.com/langchain-ai/lca-lc-foundations/blob/main/notebooks/module-3/agent-chat-ui/src/components/thread/messages/ai.tsx"
click node_multimodal "https://github.com/langchain-ai/lca-lc-foundations/blob/main/notebooks/module-3/agent-chat-ui/src/components/thread/MultimodalPreview.tsx"
click node_inbox "https://github.com/langchain-ai/lca-lc-foundations/blob/main/notebooks/module-3/agent-chat-ui/src/components/thread/agent-inbox/index.tsx"
click node_actions "https://github.com/langchain-ai/lca-lc-foundations/blob/main/notebooks/module-3/agent-chat-ui/src/components/thread/agent-inbox/components/thread-actions-view.tsx"
click node_input "https://github.com/langchain-ai/lca-lc-foundations/blob/main/notebooks/module-3/agent-chat-ui/src/components/thread/agent-inbox/components/inbox-item-input.tsx"
click node_state "https://github.com/langchain-ai/lca-lc-foundations/blob/main/notebooks/module-3/agent-chat-ui/src/components/thread/agent-inbox/components/state-view.tsx"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_chef,node_mcp,node_email toneBlue
class node_webapp,node_thread,node_history,node_messages,node_multimodal toneAmber
class node_inbox,node_actions,node_input,node_state,node_graphapi toneMint
class node_api,node_threadprovider,node_client,node_stream toneRose
class node_learner,node_model,node_search toneIndigo
```

## Components

### Course Projects

- [Personal Chef](https://github.com/langchain-ai/lca-lc-foundations/blob/main/notebooks/module-1/1.5_personal_chef.py): `notebooks/module-1/1.5_personal_chef.py`
- [MCP Server](https://github.com/langchain-ai/lca-lc-foundations/blob/main/notebooks/module-2/resources/2.1_mcp_server.py): `notebooks/module-2/resources/2.1_mcp_server.py`
- [Email Agent](https://github.com/langchain-ai/lca-lc-foundations/blob/main/notebooks/module-3/3.5_email_agent.py): `notebooks/module-3/3.5_email_agent.py`

### Chat Interface

- [Chat UI](https://github.com/langchain-ai/lca-lc-foundations/blob/main/notebooks/module-3/agent-chat-ui/src/app/page.tsx): `notebooks/module-3/agent-chat-ui/src/app/page.tsx`
- [Conversation View](https://github.com/langchain-ai/lca-lc-foundations/blob/main/notebooks/module-3/agent-chat-ui/src/components/thread/index.tsx): `notebooks/module-3/agent-chat-ui/src/components/thread/index.tsx`
- [Thread History](https://github.com/langchain-ai/lca-lc-foundations/blob/main/notebooks/module-3/agent-chat-ui/src/components/thread/history/index.tsx): `notebooks/module-3/agent-chat-ui/src/components/thread/history/index.tsx`
- [Message Rendering](https://github.com/langchain-ai/lca-lc-foundations/blob/main/notebooks/module-3/agent-chat-ui/src/components/thread/messages/ai.tsx): `notebooks/module-3/agent-chat-ui/src/components/thread/messages/ai.tsx`
- [Content Previews](https://github.com/langchain-ai/lca-lc-foundations/blob/main/notebooks/module-3/agent-chat-ui/src/components/thread/MultimodalPreview.tsx): `notebooks/module-3/agent-chat-ui/src/components/thread/MultimodalPreview.tsx`

### Human Review

- [Interrupt Review](https://github.com/langchain-ai/lca-lc-foundations/blob/main/notebooks/module-3/agent-chat-ui/src/components/thread/agent-inbox/index.tsx): `notebooks/module-3/agent-chat-ui/src/components/thread/agent-inbox/index.tsx`
- [Review Actions](https://github.com/langchain-ai/lca-lc-foundations/blob/main/notebooks/module-3/agent-chat-ui/src/components/thread/agent-inbox/components/thread-actions-view.tsx): `notebooks/module-3/agent-chat-ui/src/components/thread/agent-inbox/components/thread-actions-view.tsx`
- [Decision Input](https://github.com/langchain-ai/lca-lc-foundations/blob/main/notebooks/module-3/agent-chat-ui/src/components/thread/agent-inbox/components/inbox-item-input.tsx): `notebooks/module-3/agent-chat-ui/src/components/thread/agent-inbox/components/inbox-item-input.tsx`
- [State Inspector](https://github.com/langchain-ai/lca-lc-foundations/blob/main/notebooks/module-3/agent-chat-ui/src/components/thread/agent-inbox/components/state-view.tsx): `notebooks/module-3/agent-chat-ui/src/components/thread/agent-inbox/components/state-view.tsx`

### UI Runtime

- [API Proxy](https://github.com/langchain-ai/lca-lc-foundations/blob/main/notebooks/module-3/agent-chat-ui/src/app/api/%5B..._path%5D/route.ts): `notebooks/module-3/agent-chat-ui/src/app/api/[..._path]/route.ts`
- [Thread Provider](https://github.com/langchain-ai/lca-lc-foundations/blob/main/notebooks/module-3/agent-chat-ui/src/providers/Thread.tsx): `notebooks/module-3/agent-chat-ui/src/providers/Thread.tsx`
- [Graph Client](https://github.com/langchain-ai/lca-lc-foundations/blob/main/notebooks/module-3/agent-chat-ui/src/providers/client.ts): `notebooks/module-3/agent-chat-ui/src/providers/client.ts`
- [Stream Provider](https://github.com/langchain-ai/lca-lc-foundations/blob/main/notebooks/module-3/agent-chat-ui/src/providers/Stream.tsx): `notebooks/module-3/agent-chat-ui/src/providers/Stream.tsx`

### Other components

- **Learner**
- **Model Providers**
- **Tavily Search**
- **LangGraph API**

## Connections

- Learner → Personal Chef: explores lesson (evidence: `README.md`)
- Learner → MCP Server: explores lesson (evidence: `README.md`)
- Learner → Email Agent: explores lesson (evidence: `README.md`)
- Learner → Chat UI: uses bonus UI (evidence: `README.md`)
- Message Rendering → Interrupt Review: renders review (evidence: `notebooks/module-3/agent-chat-ui/src/components/thread/messages/ai.tsx`)
- Interrupt Review → Review Actions: shows actions (evidence: `notebooks/module-3/agent-chat-ui/src/components/thread/agent-inbox/index.tsx`)
- Interrupt Review → State Inspector: shows state (evidence: `notebooks/module-3/agent-chat-ui/src/components/thread/agent-inbox/index.tsx`)
- Review Actions → Decision Input: collects decisions (evidence: `notebooks/module-3/agent-chat-ui/src/components/thread/agent-inbox/components/thread-actions-view.tsx`)
- Thread Provider → Graph Client: creates client (evidence: `notebooks/module-3/agent-chat-ui/src/providers/Thread.tsx`)
- Stream Provider → Thread Provider: uses provider (evidence: `notebooks/module-3/agent-chat-ui/src/providers/Stream.tsx`)
- Personal Chef → Model Providers: uses models (evidence: `README.md`)
- Email Agent → Model Providers: uses models (evidence: `README.md`)
- Personal Chef → Tavily Search: uses search (evidence: `README.md`)
- Chat UI → LangGraph API: connects to runtime (evidence: `README.md`)
