$ show datawhalechina/agentic-ai
This is a Chinese-language educational companion to DeepLearning.AI's 'Agentic AI' course by Andrew Ng, maintained by the Datawhale community. The repository is a hybrid learning resource: ~60 translated markdown files across 5 modules (agentic workflow intro, reflection design patterns, tool use, practical building tips, highly autonomous agents) plus executable Jupyter notebooks and supporting Python modules that implement the lab exercises. It is not a production application or service — it is courseware with real, runnable agent code demonstrating current LLM agent patterns.
The LLM identified 4 files worth highlighting for reuse:
Implements a TOOL_REGISTRY dispatcher with canonicalize_args, missing_required detection, and resolve_args resolution for LLM-invoked tools. This is a genuinely well-structured tool-dispatch layer: an agent can enumerate available tools, the registry validates and canonicalizes arguments before invocation, and missing-required checks provide clean error feedback loops for the LLM. The pattern is framework-agnostic and could be lifted into any agent project needing deterministic tool routing with argument normalization.
Contains execute_plan_with_reflection, an orchestration loop where an LLM generates a multi-step Python plan, the plan is executed against a TinyDB/DuckDB inventory, execution results and errors are fed back to the LLM, and the plan is revised until success. This is a clean, self-contained implementation of the 'code as plan' autonomous-agent pattern — the reflection loop (execute → observe → revise) is reusable across many domains and demonstrates non-obvious agent engineering.
A compact set of email tools (send, search, filter by sender, delete) wrapped around a simulated REST email API. Each function has a rich, LLM-oriented docstring describing inputs, outputs, and failure semantics — exactly the contract LLM tool-calling needs. The module demonstrates the standard 'define function with docstring → expose to LLM' pattern that underlies all major agent frameworks, and could be extracted as a reference implementation for wrapping any external API as agent tools.
Provides create_transactions_db, get_schema, and execute_sql helpers that build a synthetic but realistic event-sourced transactions database (insert, restock, sale, price_update events) and expose its schema for natural-language-to-SQL generation. Combined with the lab's reflection workflow in the notebook (generate_sql → execute → feed results/errors back to LLM → refine_sql_external_feedback), this is a compact, reusable implementation of the external-feedback reflection pattern — teaching how actual query execution output can correct LLM semantic errors. The schema-introspection approach is directly portable to any NL-to-SQL agent.