How quocanhtapcode/k5-l3a-day03-problemsolver-promptfunctioncallingtooldesignmcp works
This is a small research-agent lab: a user submits a research request, a model selects declared tools, the agent executes them and returns results; interactive sessions can pause for clarification and save transcripts. A Streamlit demo wraps that runtime, while a separate evaluator measures tool routing and arguments against datasets and writes run records. The README also describes prompt/tool iteration and version tracking. The graph preserves the documented research capabilities; edges involving unsampled evaluator or demo internals rely on the README or SOURCE INDEX, so implementation details there are intentionally limited.
Main entry points: __init__.py Tool Registry · chat.py Interactive Chat · run_eval.py Eval Runner · agent.py Tool Agent
Components 21
User Interaction
- Streamlit UI
starter_v0/app.py - Demo Runtime
starter_v0/demo_runtime.py
Agent Runtime
- Interactive Chat
starter_v0/chat.py - Tool Agent
starter_v0/agent.py - Tool Registry
starter_v0/tools/__init__.py - Provider Adapters
starter_v0/providers/__init__.py - Environment Loader
starter_v0/env_loader.py
Research Tools
- Social Search
starter_v0/tools/social_search/tool.py - Web Lookup & Fetch
starter_v0/tools/lookup/tool.py - Account Timeline
starter_v0/tools/timeline/tool.py - Paper Search
starter_v0/tools/papers/tool.py - Paper Text
starter_v0/tools/paper_text/tool.py - Policy Search
starter_v0/tools/policy/tool.py - Clarification
starter_v0/tools/clarify/tool.py - Digest & Export
starter_v0/tools/export_digest/tool.py
Evaluation Loop
- Eval Runner
starter_v0/run_eval.py - Eval Cases
starter_v0/data/eval_base.json - Run Records
starter_v0/runs - Artifact Versioning
starter_v0/versioning.py
Other components
- Researcher
- Model API
Connections 26
- Researcher → Streamlit UI: submits request
README.md - Streamlit UI → Demo Runtime: uses runtime
starter_v0/app.py - Demo Runtime → Interactive Chat: delegates chat
starter_v0/demo_runtime.py - Researcher → Interactive Chat: enters request
README.md - Interactive Chat → Provider Adapters: selects provider
starter_v0/chat.py - Provider Adapters → Model API: requests completion
- Interactive Chat → Tool Registry: loads tools
starter_v0/chat.py - Interactive Chat → Tool Agent: runs tool loop
starter_v0/agent.py - Tool Agent → Provider Adapters: requests completion
starter_v0/agent.py - Tool Agent → Tool Registry: dispatches calls
starter_v0/agent.py - Tool Registry → Social Search: registers
starter_v0/tools/__init__.py - Tool Registry → Web Lookup & Fetch: registers
starter_v0/tools/__init__.py - Tool Registry → Account Timeline: registers
starter_v0/tools/__init__.py - Tool Registry → Paper Search: registers
starter_v0/tools/__init__.py - Tool Registry → Paper Text: registers
starter_v0/tools/__init__.py - Tool Registry → Policy Search: registers
starter_v0/tools/__init__.py - Tool Registry → Clarification: registers
starter_v0/tools/__init__.py - Tool Registry → Digest & Export: registers
starter_v0/tools/__init__.py - Eval Runner → Tool Agent: evaluates calls
starter_v0/run_eval.py - Eval Runner → Eval Cases: loads cases
README.md - Eval Runner → Provider Adapters: selects provider
starter_v0/run_eval.py - Eval Runner → Tool Registry: loads declarations
starter_v0/run_eval.py - Eval Runner → Run Records: writes results
README.md - Eval Runner → Artifact Versioning: hashes artifacts
starter_v0/run_eval.py - Interactive Chat → Artifact Versioning: hashes artifacts
starter_v0/chat.py - Interactive Chat → Environment Loader: loads environment
starter_v0/chat.py