{"id":51067212,"url":"https://github.com/zjunlp/smartcomment","last_synced_at":"2026-06-23T07:32:24.457Z","repository":{"id":361877210,"uuid":"1228602335","full_name":"zjunlp/smartcomment","owner":"zjunlp","description":"A lightweight Python tracing toolkit for recording execution graphs from existing systems. ","archived":false,"fork":false,"pushed_at":"2026-06-01T15:40:58.000Z","size":507,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-06-01T17:23:15.500Z","etag":null,"topics":["agentic-ai","agentic-workflow","natural-language-processing","python","smartcomment","tracing","tracing-library"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zjunlp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-04T07:28:17.000Z","updated_at":"2026-06-01T16:22:43.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/zjunlp/smartcomment","commit_stats":null,"previous_names":["zjunlp/smartcomment"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/zjunlp/smartcomment","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zjunlp%2Fsmartcomment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zjunlp%2Fsmartcomment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zjunlp%2Fsmartcomment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zjunlp%2Fsmartcomment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zjunlp","download_url":"https://codeload.github.com/zjunlp/smartcomment/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zjunlp%2Fsmartcomment/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34680620,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-23T02:00:07.161Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agentic-ai","agentic-workflow","natural-language-processing","python","smartcomment","tracing","tracing-library"],"created_at":"2026-06-23T07:32:21.792Z","updated_at":"2026-06-23T07:32:24.451Z","avatar_url":"https://github.com/zjunlp.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## smartcomment\n\n`smartcomment` is a lightweight Python tracing toolkit for recording execution graphs from existing systems. It lets developers annotate variables, operations, and dependencies without reorganizing the original program.\n\nThe package is designed for systems that maintain complex state over time, such as multi-agent systems, memory systems, and data workflows. Instead of only recording events or function calls, `smartcomment` records how variables flow through developer-specified operations, making the resulting trace useful for visualization, program understanding, and failure attribution.\n\n### Installation\n\nInstall the core package:\n\n```bash\npip install smartcomment\n```\n\nInstall optional visualization dependencies:\n\n```bash\npip install smartcomment[viz]\n```\n\nFor local development from source:\n\n```bash\ngit clone https://github.com/zjunlp/smartcomment.git\ncd smartcomment\npip install -e .\n```\n\n### Quick Example\n\n```python\nfrom smartcomment import comment_fn, comment_graph\n\n\n@comment_fn(\n    op_name=\"demo.generate\",\n    comment=\"Generate a response from a user query.\",\n    category=\"generation\",\n)\ndef generate_response(query: str) -\u003e str:\n    return \"smartcomment records execution graphs.\"\n\n\nwith comment_graph() as graph:\n    response = generate_response(\"What does smartcomment do?\")\n\nprint(graph.to_runtime_graph().to_markdown())\n```\n\n### Documentation\n\nThe repository includes a set of focused guides under [`docs/`](docs/).\n\n### Citation\n\nIf you use `smartcomment` in your work, please cite:\n\n```bibtex\n@misc{deng2026memtracetracingattributingerrors,\n      title={MemTrace: Tracing and Attributing Errors in Large Language Model Memory Systems}, \n      author={Xinle Deng and Ruobin Zhong and Hujin Peng and Xiaoben Lu and Yanzhe Wu and Guang Li and Buqiang Xu and Yunzhi Yao and Jizhan Fang and Haoliang Cao and Junjie Guo and Yuan Yuan and Ziqing Ma and Yuanqiang Yu and Rui Hu and Baohua Dong and Hangcheng Zhu and Ningyu Zhang},\n      year={2026},\n      eprint={2605.28732},\n      archivePrefix={arXiv},\n      primaryClass={cs.CL},\n      url={https://arxiv.org/abs/2605.28732}, \n}\n```\n\n### License\n\nThis project is released under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzjunlp%2Fsmartcomment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzjunlp%2Fsmartcomment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzjunlp%2Fsmartcomment/lists"}