# sim-security/ai-teaching-agent-team architecture

> Architecture diagram of the GitHub repository sim-security/ai-teaching-agent-team, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sim-security/ai-teaching-agent-team
- Repository: https://github.com/sim-security/ai-teaching-agent-team

## Overview

The product is a Streamlit app that turns a learner’s topic into a learning package: a supervisor coordinates knowledge-base, roadmap, resource-curation, and practice-material stages, then presents the outputs and document links. LangGraph carries shared state between stages; agents use LLMs, and selected agents use search and Google Docs tools. The README documents tracing and model flexibility, but the excerpts do not show their full runtime wiring.

Main entry points: [`src/supervisor.py`](https://github.com/sim-security/ai-teaching-agent-team/blob/main/src/supervisor.py) (Supervisor Router), [`src/graph.py`](https://github.com/sim-security/ai-teaching-agent-team/blob/main/src/graph.py) (LangGraph Workflow), [`src/state.py`](https://github.com/sim-security/ai-teaching-agent-team/blob/main/src/state.py) (Shared Teaching State), [`src/agents/research_librarian.py`](https://github.com/sim-security/ai-teaching-agent-team/blob/main/src/agents/research_librarian.py) (Resource Guide)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Learner Interface"]
  node_streamlit["Streamlit App<br/>[app.py]"]
end

subgraph group_workflow["Agent Workflow"]
  node_graph["LangGraph Workflow<br/>[graph.py]"]
  node_state["Shared Teaching State<br/>[state.py]"]
  node_supervisor["Supervisor Router<br/>[supervisor.py]"]
  node_professor["Knowledge Base<br/>[professor.py]"]
  node_advisor["Learning Roadmap"]
  node_librarian["Resource Guide"]
  node_assistant["Practice Materials"]
  node_agent_utils["Agent Tool Utilities<br/>[utils.py]"]
end

subgraph group_tools["Tools and Integrations"]
  node_docs_tools["Google Docs Tools<br/>[google_docs.py]"]
  node_search_tool["Web Search Tool<br/>[search.py]"]
end

subgraph group_services["External Services"]
  node_mcp["Composio MCP"]
  node_google_docs["Google Docs"]
  node_web_search["Web Search Provider"]
  node_llm["LLM Provider"]
  node_langsmith["LangSmith"]
end

node_learner(("Learner"))

node_learner -->|"enters topic"| node_streamlit
node_streamlit -->|"invokes workflow"| node_graph
node_streamlit -->|"loads tools"| node_docs_tools
node_streamlit -->|"loads tool"| node_search_tool
node_graph -->|"uses schema"| node_state
node_graph -->|"registers node"| node_supervisor
node_graph -->|"registers node"| node_professor
node_graph -->|"registers node"| node_advisor
node_graph -->|"registers node"| node_librarian
node_graph -->|"registers node"| node_assistant
node_supervisor -->|"routes first"| node_professor
node_supervisor -->|"routes next"| node_advisor
node_supervisor -->|"routes next"| node_librarian
node_supervisor -->|"routes next"| node_assistant
node_professor -->|"returns control"| node_supervisor
node_advisor -->|"returns control"| node_supervisor
node_librarian -->|"returns control"| node_supervisor
node_assistant -->|"returns control"| node_supervisor
node_professor -->|"updates output"| node_state
node_advisor -->|"updates output"| node_state
node_librarian -->|"updates output"| node_state
node_assistant -->|"updates output"| node_state
node_state -->|"provides knowledge base"| node_advisor
node_state -->|"provides roadmap"| node_librarian
node_state -->|"provides prior work"| node_assistant
node_professor -->|"saves content"| node_agent_utils
node_advisor -->|"saves content"| node_agent_utils
node_librarian -->|"uses tools"| node_agent_utils
node_assistant -->|"uses tools"| node_agent_utils
node_librarian -->|"searches resources"| node_search_tool
node_assistant -->|"searches examples"| node_search_tool
node_agent_utils -->|"invokes tools"| node_docs_tools
node_docs_tools -->|"connects via MCP"| node_mcp
node_mcp -->|"accesses documents"| node_google_docs
node_search_tool -->|"queries provider"| node_web_search
node_streamlit -.->|"selects model"| node_llm
node_streamlit -->|"configures tracing"| node_langsmith
node_graph -->|"passes model to agents"| node_llm

click node_streamlit "https://github.com/sim-security/ai-teaching-agent-team/blob/main/app.py"
click node_graph "https://github.com/sim-security/ai-teaching-agent-team/blob/main/src/graph.py"
click node_state "https://github.com/sim-security/ai-teaching-agent-team/blob/main/src/state.py"
click node_supervisor "https://github.com/sim-security/ai-teaching-agent-team/blob/main/src/supervisor.py"
click node_professor "https://github.com/sim-security/ai-teaching-agent-team/blob/main/src/agents/professor.py"
click node_advisor "https://github.com/sim-security/ai-teaching-agent-team/blob/main/src/agents/academic_advisor.py"
click node_librarian "https://github.com/sim-security/ai-teaching-agent-team/blob/main/src/agents/research_librarian.py"
click node_assistant "https://github.com/sim-security/ai-teaching-agent-team/blob/main/src/agents/teaching_assistant.py"
click node_agent_utils "https://github.com/sim-security/ai-teaching-agent-team/blob/main/src/agents/utils.py"
click node_docs_tools "https://github.com/sim-security/ai-teaching-agent-team/blob/main/src/tools/google_docs.py"
click node_search_tool "https://github.com/sim-security/ai-teaching-agent-team/blob/main/src/tools/search.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_streamlit toneBlue
class node_graph,node_state,node_supervisor,node_professor,node_advisor,node_librarian,node_assistant,node_agent_utils toneAmber
class node_docs_tools,node_search_tool toneMint
class node_mcp,node_google_docs,node_web_search,node_llm,node_langsmith toneRose
class node_learner toneIndigo
```

## Components

### Learner Interface

- [Streamlit App](https://github.com/sim-security/ai-teaching-agent-team/blob/main/app.py): `app.py`

### Agent Workflow

- [LangGraph Workflow](https://github.com/sim-security/ai-teaching-agent-team/blob/main/src/graph.py): `src/graph.py`
- [Shared Teaching State](https://github.com/sim-security/ai-teaching-agent-team/blob/main/src/state.py): `src/state.py`
- [Supervisor Router](https://github.com/sim-security/ai-teaching-agent-team/blob/main/src/supervisor.py): `src/supervisor.py`
- [Knowledge Base](https://github.com/sim-security/ai-teaching-agent-team/blob/main/src/agents/professor.py): `src/agents/professor.py`
- [Learning Roadmap](https://github.com/sim-security/ai-teaching-agent-team/blob/main/src/agents/academic_advisor.py): `src/agents/academic_advisor.py`
- [Resource Guide](https://github.com/sim-security/ai-teaching-agent-team/blob/main/src/agents/research_librarian.py): `src/agents/research_librarian.py`
- [Practice Materials](https://github.com/sim-security/ai-teaching-agent-team/blob/main/src/agents/teaching_assistant.py): `src/agents/teaching_assistant.py`
- [Agent Tool Utilities](https://github.com/sim-security/ai-teaching-agent-team/blob/main/src/agents/utils.py): `src/agents/utils.py`

### Tools and Integrations

- [Google Docs Tools](https://github.com/sim-security/ai-teaching-agent-team/blob/main/src/tools/google_docs.py): `src/tools/google_docs.py`
- [Web Search Tool](https://github.com/sim-security/ai-teaching-agent-team/blob/main/src/tools/search.py): `src/tools/search.py`

### External Services

- **Composio MCP**
- **Google Docs**
- **Web Search Provider**
- **LLM Provider**
- **LangSmith**

### Other components

- **Learner**

## Connections

- Learner → Streamlit App: enters topic (evidence: `README.md`)
- Streamlit App → LangGraph Workflow: invokes workflow (evidence: `app.py`)
- Streamlit App → Google Docs Tools: loads tools (evidence: `app.py`)
- Streamlit App → Web Search Tool: loads tool (evidence: `app.py`)
- LangGraph Workflow → Shared Teaching State: uses schema (evidence: `src/graph.py`)
- LangGraph Workflow → Supervisor Router: registers node (evidence: `src/graph.py`)
- LangGraph Workflow → Knowledge Base: registers node (evidence: `src/graph.py`)
- LangGraph Workflow → Learning Roadmap: registers node (evidence: `src/graph.py`)
- LangGraph Workflow → Resource Guide: registers node (evidence: `src/graph.py`)
- LangGraph Workflow → Practice Materials: registers node (evidence: `src/graph.py`)
- Supervisor Router → Knowledge Base: routes first (evidence: `README.md`)
- Supervisor Router → Learning Roadmap: routes next (evidence: `README.md`)
- Supervisor Router → Resource Guide: routes next (evidence: `README.md`)
- Supervisor Router → Practice Materials: routes next (evidence: `README.md`)
- Knowledge Base → Supervisor Router: returns control
- Learning Roadmap → Supervisor Router: returns control
- Resource Guide → Supervisor Router: returns control
- Practice Materials → Supervisor Router: returns control
- Knowledge Base → Shared Teaching State: updates output (evidence: `src/agents/professor.py`)
- Learning Roadmap → Shared Teaching State: updates output (evidence: `src/agents/academic_advisor.py`)
- Resource Guide → Shared Teaching State: updates output (evidence: `src/agents/research_librarian.py`)
- Practice Materials → Shared Teaching State: updates output (evidence: `src/agents/teaching_assistant.py`)
- Shared Teaching State → Learning Roadmap: provides knowledge base (evidence: `src/agents/academic_advisor.py`)
- Shared Teaching State → Resource Guide: provides roadmap (evidence: `src/agents/research_librarian.py`)
- Shared Teaching State → Practice Materials: provides prior work (evidence: `src/agents/teaching_assistant.py`)
- Knowledge Base → Agent Tool Utilities: saves content (evidence: `src/agents/professor.py`)
- Learning Roadmap → Agent Tool Utilities: saves content (evidence: `src/agents/academic_advisor.py`)
- Resource Guide → Agent Tool Utilities: uses tools (evidence: `src/agents/research_librarian.py`)
- Practice Materials → Agent Tool Utilities: uses tools (evidence: `src/agents/teaching_assistant.py`)
- Resource Guide → Web Search Tool: searches resources (evidence: `src/agents/research_librarian.py`)
- Practice Materials → Web Search Tool: searches examples (evidence: `src/agents/teaching_assistant.py`)
- Agent Tool Utilities → Google Docs Tools: invokes tools (evidence: `src/agents/utils.py`)
- Google Docs Tools → Composio MCP: connects via MCP (evidence: `src/tools/google_docs.py`)
- Composio MCP → Google Docs: accesses documents (evidence: `README.md`)
- Web Search Tool → Web Search Provider: queries provider (evidence: `src/tools/search.py`)
- Streamlit App → LLM Provider: selects model (evidence: `README.md`)
- Streamlit App → LangSmith: configures tracing (evidence: `app.py`)
- LangGraph Workflow → LLM Provider: passes model to agents (evidence: `src/graph.py`)
