Ha11oWe1t/agent-learning

Learning Resources

A LangGraph-based practice lab for requirement clarification, note-taking, document generation and human review.

177
1
Python
7 days old

Overview

Agent Lab is a practice environment for learning agent development with LangGraph. Its first working stage covers requirement clarification: the learner picks a requirement scenario, interviews a model-driven "requirement owner" agent, saves notes, and has a summarizer agent produce a requirement document with source evidence. Stage 3 adds a technical-design canvas with a plan review step; stage 5 agent development is not implemented yet.

The main graph pauses with LangGraph interrupts at user-input and human-review points, and two compiled subgraphs (clarification and document generation) are registered directly on the main graph and share the parent checkpointer. Practice sessions, conversations, notes, document versions and graph checkpoints are stored in data/practice.sqlite3.

Getting started

Requirements: Python 3.11 or newer, a Windows/PowerShell environment for the provided scripts, and optionally a DeepSeek API key for real model calls.

python -m venv .venv
.\.venv\Scripts\python.exe -m pip install -r requirements.txt
.\start.ps1

Open http://127.0.0.1:4190. Then choose one of the four scenarios (customer service, internal IT support, equipment troubleshooting, sales follow-up), ask questions to clarify goals, scope, process, data, permissions, acceptance criteria and constraints, save notes with the "记笔记" action, and generate the document after at least one exchange. Review the evidence snapshots behind each source, then either confirm and finalize or return to further clarification. Markdown export includes a full source appendix.

For real model replies, copy .env.example to .env and set DEEPSEEK_API_KEY. Without a key, the offline demo still starts and uses keyword-matched fixed scenario facts; it exercises the UI and flow but does not demonstrate free-form dialogue.

Model configuration and behavior

All real agents use deepseek-flash at https://api.deepseek.com. The process environment variable DEEPSEEK_API_KEY takes precedence over the project .env; keys are re-read on each request and a page refresh is enough. Keys are kept out of LangGraph state, browser responses and the session database. Requests time out after 120 seconds and are not automatically retried; a failed request keeps the user's question and retry ID rather than fabricating an agent answer. Chat requests are idempotent by ID.

Constraints

  • The service listens on localhost only and has no multi-user authentication; do not expose it publicly. Run a single process to preserve the per-session in-memory lock.
  • Each practice allows at most 50 chat turns and 60 notes. Background tasks, streaming output and task-state queries after browser disconnect are not supported.
  • The summarizer only receives the public opening, actual conversation and notes, not the hidden scenario facts. API calls send these materials to the provider and incur cost.
  • Finalizing a document is a manual review step, not real business sign-off. Source-ID validation confirms that a source exists, not that the content matches the evidence.
  • In stage 3, reviews suggest changes but never modify the canvas automatically, and plans do not execute real business tools.
  • No license is declared in the repository.

HotRepo's take

This is a small-community educational project: it gained 63 stars in a roughly 24-hour window recorded on 2026-11-01 on the Python new-project list, with no recorded all-language daily rank. The notable part is its honest scope: it is a two-role system where the learner controls when to ask and when to generate, with real compiled LangGraph subgraphs and SQLite checkpoint persistence rather than a README-only demo. Treat it as a study of graph interruption, evidence tracing and human approval in agent workflows, not as a production multi-user service.

Project source and documentation

Written by AI from the project's README, updated . The project's own docs are the source of truth.