{"id":35887436,"url":"https://github.com/pasonk/ai-chatkit","last_synced_at":"2026-01-15T06:00:45.989Z","repository":{"id":300927879,"uuid":"1001341359","full_name":"pasonk/ai-chatkit","owner":"pasonk","description":"A full-stack ai agent chat project, built with langgraph+fastapi+nextjs, supporting tool invocation and RAG knowledge base","archived":false,"fork":false,"pushed_at":"2025-08-20T08:29:40.000Z","size":4555,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-20T10:28:27.645Z","etag":null,"topics":["ai","ai-agents","chatbot","fastapi","langchain","langgraph","nextjs","python","rag","sqlmodel"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pasonk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2025-06-13T08:05:40.000Z","updated_at":"2025-08-20T08:29:43.000Z","dependencies_parsed_at":"2025-06-24T10:41:32.791Z","dependency_job_id":null,"html_url":"https://github.com/pasonk/ai-chatkit","commit_stats":null,"previous_names":["pasonk/ai-chatkit"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pasonk/ai-chatkit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pasonk%2Fai-chatkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pasonk%2Fai-chatkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pasonk%2Fai-chatkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pasonk%2Fai-chatkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pasonk","download_url":"https://codeload.github.com/pasonk/ai-chatkit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pasonk%2Fai-chatkit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28444124,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-15T05:05:00.929Z","status":"ssl_error","status_checked_at":"2026-01-15T05:04:58.515Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["ai","ai-agents","chatbot","fastapi","langchain","langgraph","nextjs","python","rag","sqlmodel"],"created_at":"2026-01-08T22:00:39.538Z","updated_at":"2026-01-15T06:00:45.886Z","avatar_url":"https://github.com/pasonk.png","language":"Python","funding_links":[],"categories":["Agent Categories"],"sub_categories":["\u003ca name=\"Unclassified\"\u003e\u003c/a\u003eUnclassified"],"readme":"\u003ch1 align=\"center\"\u003e AI-CHATKIT \u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n  \u003cstrong style=\"background-color: green;\"\u003eEnglish\u003c/strong\u003e\n  |\n  \u003ca href=\"./README_zh.md\" target=\"_Self\"\u003e中文\u003c/a\u003e\n\u003c/p\u003e\nAI-CHATKIT is a full-stack AI agent chat tool built using components such as langGraph, FastAPI, NextJS, and Chroma.\n\nThis project serves as a template to help you quickly build related AI agent chat applications using the langGraph framework, and supports RAG (Retrieval-Augmented Generation) to enhance the knowledge base Q\u0026A capabilities of agents.\n\n\u003cimg src=\"./pictures/chat_img.png\" width=\"700\"/\u003e  \n\nmulti-agent:\n\n\u003cimg src=\"./pictures/chat_multi_agent_img.png\" width=\"700\"/\u003e\n\n\n## Features\n\n1. AI agent chat application built on the langGraph framework, supporting custom behavior logic orchestration for agents.\n2. Supports custom knowledge base Q\u0026A capabilities for agents, using ChromaDB for knowledge base storage and querying.\n3. Supports custom tool invocation for agents.\n4. Python backend interface API, implemented based on FastAPI, Support full asynchronous calls.\n5. Supports custom frontend applications for agents, implemented using NextJS.\n6. Supports chat streaming output, with frontend support for SSE (Server-Sent Events) streaming.\n7. Supports multiple custom agents\n8. Support multi-agent collaboration\n9. Chat history is saved in the local browser cache\n\n\n\n## Structure\n\n- `backend`: Backend service code\n- `frontend`: Frontend service code\n\n## Quick Start\n\n### Backend Service\n\n\nBackend .env file configuration\nRename .env.example to .env\n\n```properties\n# Environment variable configuration\n\n# Database configuration\n# SQLite URL\nDATABASE_URL=sqlite+aiosqlite:///resource/database.db\n# MySQL\n# DATABASE_URL=mysql+aiomysql://root:root@localhost/ai-chatkit\n\n# Application configuration\nDEBUG=True\nAPP_NAME=AI ChatKit\n\n# OpenAI\nOPENAI_BASE_URL=\nOPENAI_API_KEY=\nDEFAULT_MODEL=gpt-4o-mini\n\n# DashScope\n#DASHSCOPE_API_KEY=\n#DEFAULT_MODEL=qwen-plus\n\n#DeepSeek\n#DEEPSEEK_API_KEY=\n#DEFAULT_MODEL=deepseek-chat\n\n\n\n# Use bge-m3 as the embedding model, supporting both Chinese and English; requires local deployment of the bge-m3 model via Ollama\nEMBEDDING_MODEL=bge-m3\n\n# Relative storage path for ChromaDB\nCHROMA_PATH=resource/chroma_db\n```\nrun backend server:\n```sh\n# Use the uv tool to manage Python dependencies\npip install uv\n\n# Replace ${workdir} with your own working directory\ncd ${workdir}/backend\n\nuv sync --frozen\n# activate a Python virtual environment.\nsource .venv/bin/activate\n\n# activate the environment variables on windows\n# .venv/Script/active\n\n#run server\npython app/run_server.py\n```\n\n### RAG Deployment\n\nThis project by default accesses the locally deployed bge-m3 model via Ollama. Therefore, to access the knowledge base locally, you need to deploy Ollama locally. For local Ollama deployment of bge-m3, please refer to: https://ollama.com/library/bge-m3\n\n\n### Frontend Application\n\n```sh\n# Replace ${workdir} with your own working directory\ncd ${workdir}/frontend\n# Use pnpm to manage dependencies\npnpm install\n# Start the frontend application\npnpm dev\n```\n\nAfter successful startup, you can access the application at: http://localhost:3000/\n\nYou can use the langGraph extension in this project to create and orchestrate multiple agents, each with its own behavioral logic. The orchestration logic for agents can be written in the `backend/app/ai/agent` directory. You can switch between different agents for conversation in the frontend.\n\nThis project comes with the following agents:\n\n1. **OA-ASSISTANT**: Mainly used to demonstrate the OA assistant agent, supporting employee information query and employee handbook knowledge base retrieval.\n   For details, please refer to: `backend/app/ai/agent/oa_assistant.py`\n\n2. **MULTI_AGENT**: Mainly used to demonstrate multi-agent collaboration, supporting collaboration between multiple agents. The multi_agent includes three agents:\n   1) `math_agent`: Mathematical agent, mainly used for mathematical calculations\n   2) `code_agent`: Code agent, mainly used for code generation\n   3) `general_agent`: General agent, mainly used for handling general questions\n   These three agents are collaboratively managed through a supervisor.\n\n   For details, please refer to: `backend/app/ai/agent/multi_agent.py`\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpasonk%2Fai-chatkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpasonk%2Fai-chatkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpasonk%2Fai-chatkit/lists"}