# deekshitha-palla/week-5-project architecture

> Architecture diagram of the GitHub repository deekshitha-palla/week-5-project, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/deekshitha-palla/week-5-project
- Repository: https://github.com/deekshitha-palla/week-5-project

## Overview

Code Scout is a conversational coding agent: a user asks for help, the agent routes the request through an LLM/tool loop, and returns a response, while persisting session history. Keyword-matched skills inject task-specific guidance and can unlock optional tools. The tool suite covers repository exploration, sandboxed file and command operations, planning, web research, paper lookup, and remote MCP servers. The excerpts establish several internal calls; other tool dispatch links are supported by the SOURCE INDEX, so details of unsampled implementations are not inferred.

Main entry points: [`agent.py`](https://github.com/deekshitha-palla/week-5-project/blob/master/agent.py) (Agent Loop), [`tools/paper.py`](https://github.com/deekshitha-palla/week-5-project/blob/master/tools/paper.py) (Paper Search & Read), [`tools/web.py`](https://github.com/deekshitha-palla/week-5-project/blob/master/tools/web.py) (Web Search & Fetch), [`skill_matcher.py`](https://github.com/deekshitha-palla/week-5-project/blob/master/skill_matcher.py) (Skill Matcher)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_agent["Agent Runtime"]
  node_agent["Agent Loop<br/>[agent.py]"]
  node_sessions["Session History<br/>[agent.py]"]
  node_todos[("Todo Plans<br/>[plan.py]")]
end

subgraph group_skills["Skill Routing"]
  node_loader["Skill Loader<br/>[skill_loader.py]"]
  node_matcher["Skill Matcher<br/>[skill_matcher.py]"]
end

subgraph group_workspace["Codebase Tools"]
  node_explore["Search &amp; Outline<br/>[explore.py]"]
  node_files["Workspace Files<br/>[file.py]"]
  node_commands["Command Runner<br/>[execute.py]"]
end

subgraph group_research["Research Integrations"]
  node_web["Web Search &amp; Fetch<br/>[web.py]"]
  node_papers["Paper Search &amp; Read<br/>[paper.py]"]
  node_mcp["MCP Connector<br/>[mcp_connector.py]"]
end

node_user(("User"))
node_mcpservers{{"MCP Servers"}}
node_llm{{"LLM API"}}
node_webservice{{"Web Services"}}
node_paperapi{{"Hugging Face Papers API"}}

node_user -->|"sends prompt"| node_agent
node_agent -->|"requests completion"| node_llm
node_agent -->|"loads and saves"| node_sessions
node_agent -->|"loads skills"| node_loader
node_agent -->|"matches request"| node_matcher
node_matcher -->|"uses skill types"| node_loader
node_agent -->|"checks pending"| node_todos
node_agent -->|"dispatches tools"| node_explore
node_agent -->|"dispatches tools"| node_files
node_agent -->|"dispatches tools"| node_commands
node_agent -->|"dispatches tools"| node_web
node_agent -->|"dispatches tools"| node_papers
node_agent -->|"connects and dispatches"| node_mcp
node_mcp -->|"calls remote tools"| node_mcpservers
node_papers -->|"requests paper data"| node_paperapi
node_papers -->|"fetches fallback page"| node_web
node_web -->|"searches and fetches"| node_webservice
node_agent -->|"returns response"| node_user

click node_agent "https://github.com/deekshitha-palla/week-5-project/blob/master/agent.py"
click node_sessions "https://github.com/deekshitha-palla/week-5-project/blob/master/agent.py"
click node_todos "https://github.com/deekshitha-palla/week-5-project/blob/master/tools/plan.py"
click node_loader "https://github.com/deekshitha-palla/week-5-project/blob/master/skill_loader.py"
click node_matcher "https://github.com/deekshitha-palla/week-5-project/blob/master/skill_matcher.py"
click node_explore "https://github.com/deekshitha-palla/week-5-project/blob/master/tools/explore.py"
click node_files "https://github.com/deekshitha-palla/week-5-project/blob/master/tools/file.py"
click node_commands "https://github.com/deekshitha-palla/week-5-project/blob/master/tools/execute.py"
click node_web "https://github.com/deekshitha-palla/week-5-project/blob/master/tools/web.py"
click node_papers "https://github.com/deekshitha-palla/week-5-project/blob/master/tools/paper.py"
click node_mcp "https://github.com/deekshitha-palla/week-5-project/blob/master/mcp_connector.py"

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_agent,node_sessions,node_todos,node_user toneBlue
class node_loader,node_matcher toneAmber
class node_explore,node_files,node_commands,node_mcpservers,node_llm,node_paperapi toneMint
class node_web,node_papers,node_mcp toneRose
class node_webservice toneIndigo
```

## Components

### Agent Runtime

- [Agent Loop](https://github.com/deekshitha-palla/week-5-project/blob/master/agent.py): `agent.py`
- [Session History](https://github.com/deekshitha-palla/week-5-project/blob/master/agent.py): `agent.py`
- [Todo Plans](https://github.com/deekshitha-palla/week-5-project/blob/master/tools/plan.py): `tools/plan.py`

### Skill Routing

- [Skill Loader](https://github.com/deekshitha-palla/week-5-project/blob/master/skill_loader.py): `skill_loader.py`
- [Skill Matcher](https://github.com/deekshitha-palla/week-5-project/blob/master/skill_matcher.py): `skill_matcher.py`

### Codebase Tools

- [Search & Outline](https://github.com/deekshitha-palla/week-5-project/blob/master/tools/explore.py): `tools/explore.py`
- [Workspace Files](https://github.com/deekshitha-palla/week-5-project/blob/master/tools/file.py): `tools/file.py`
- [Command Runner](https://github.com/deekshitha-palla/week-5-project/blob/master/tools/execute.py): `tools/execute.py`

### Research Integrations

- [Web Search & Fetch](https://github.com/deekshitha-palla/week-5-project/blob/master/tools/web.py): `tools/web.py`
- [Paper Search & Read](https://github.com/deekshitha-palla/week-5-project/blob/master/tools/paper.py): `tools/paper.py`
- [MCP Connector](https://github.com/deekshitha-palla/week-5-project/blob/master/mcp_connector.py): `mcp_connector.py`

### Other components

- **User**
- **MCP Servers**
- **LLM API**
- **Web Services**
- **Hugging Face Papers API**

## Connections

- User → Agent Loop: sends prompt (evidence: `agent.py`)
- Agent Loop → LLM API: requests completion (evidence: `agent.py`)
- Agent Loop → Session History: loads and saves (evidence: `agent.py`)
- Agent Loop → Skill Loader: loads skills (evidence: `agent.py`)
- Agent Loop → Skill Matcher: matches request (evidence: `agent.py`)
- Skill Matcher → Skill Loader: uses skill types (evidence: `skill_matcher.py`)
- Agent Loop → Todo Plans: checks pending (evidence: `agent.py`)
- Agent Loop → Search & Outline: dispatches tools (evidence: `agent.py`)
- Agent Loop → Workspace Files: dispatches tools (evidence: `agent.py`)
- Agent Loop → Command Runner: dispatches tools (evidence: `agent.py`)
- Agent Loop → Web Search & Fetch: dispatches tools (evidence: `agent.py`)
- Agent Loop → Paper Search & Read: dispatches tools (evidence: `agent.py`)
- Agent Loop → MCP Connector: connects and dispatches (evidence: `agent.py`)
- MCP Connector → MCP Servers: calls remote tools (evidence: `mcp_connector.py`)
- Paper Search & Read → Hugging Face Papers API: requests paper data (evidence: `tools/paper.py`)
- Paper Search & Read → Web Search & Fetch: fetches fallback page (evidence: `tools/paper.py`)
- Web Search & Fetch → Web Services: searches and fetches (evidence: `tools/web.py`)
- Agent Loop → User: returns response (evidence: `agent.py`)
