{"id":34549020,"url":"https://github.com/cyrilluce/langchain-demo","last_synced_at":"2026-05-19T16:32:38.361Z","repository":{"id":329397944,"uuid":"1114404511","full_name":"cyrilluce/langchain-demo","owner":"cyrilluce","description":null,"archived":false,"fork":false,"pushed_at":"2025-12-31T03:36:21.000Z","size":822,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-02T22:35:57.561Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/cyrilluce.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-11T10:22:03.000Z","updated_at":"2025-12-31T03:36:24.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/cyrilluce/langchain-demo","commit_stats":null,"previous_names":["cyrilluce/langchain-demo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cyrilluce/langchain-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyrilluce%2Flangchain-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyrilluce%2Flangchain-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyrilluce%2Flangchain-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyrilluce%2Flangchain-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cyrilluce","download_url":"https://codeload.github.com/cyrilluce/langchain-demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyrilluce%2Flangchain-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33224587,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-19T15:49:41.270Z","status":"ssl_error","status_checked_at":"2026-05-19T15:49:22.917Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":[],"created_at":"2025-12-24T07:40:45.979Z","updated_at":"2026-05-19T16:32:38.355Z","avatar_url":"https://github.com/cyrilluce.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Langchain Demo - Monorepo LLM Agent\n\nA minimal development scaffold featuring a Python FastAPI backend with LangChain/LangGraph integration and a React TypeScript frontend.\n\n## Project Structure\n\n```\n.\n├── server/          # Python FastAPI LLM Agent\n├── ui/              # React TypeScript Frontend\n└── specs/           # Feature specifications\n```\n\n## Quick Start\n\n### Prerequisites\n\n- Python 3.10+\n- Bun (latest version)\n- Optional: Aliyun Dashscope API key\n\n### 1. Start the Server\n\n```bash\ncd server\npython -m venv venv\nsource venv/bin/activate  # On Windows: venv\\Scripts\\activate\npip install -r requirements.txt\n\n# Optional: Configure Aliyun LLM\nexport DASHSCOPE_API_KEY=\"your-api-key-here\"\n\n# Start server\nuvicorn app.main:app --reload --port 5001\n```\n\nServer will be available at http://localhost:5001\n\n### 2. Start the UI\n\n```bash\ncd ui\nbun install\nbun run dev\n```\n\nUI will be available at http://localhost:5173\n\n### 3. Test the Integration\n\nOpen http://localhost:5173 in your browser and submit a prompt to the LLM agent.\n\n## API Endpoints\n\n- `POST /agent` - Submit a prompt to the LLM agent\n- `GET /health` - Check service health status\n\n## Development\n\n### Server Tests\n\n```bash\ncd server\npytest tests/ -v\n```\n\n### UI Tests\n\n```bash\ncd ui\nbun test\n```\n\n## Configuration\n\n### Server Environment Variables\n\n- `DASHSCOPE_API_KEY` - Aliyun Dashscope API key (optional, uses fallback if not set)\n- `DASHSCOPE_MODEL` - Model name (default: qwen-turbo)\n\n## Features\n\n- **FastAPI Backend**: High-performance async Python web framework\n- **LangChain Integration**: LLM orchestration with langchain/langgraph\n- **Aliyun Dashscope**: Integration with Qwen models\n- **React UI**: Modern TypeScript React frontend with Vite\n- **Graceful Fallback**: Works without LLM credentials for development\n- **Error Handling**: Comprehensive error handling with HTTP 503 for LLM failures\n- **Long Timeouts**: 6-minute client-side timeout for complex queries\n\n## Documentation\n\nSee `specs/001-monorepo-llm-agent/` for detailed feature specifications:\n- `spec.md` - Feature requirements\n- `plan.md` - Implementation plan\n- `quickstart.md` - Detailed setup guide\n- `contracts/openapi.yaml` - API specification\n\n## Troubleshooting\n\n### CORS Errors\n\nEnsure the server is running. CORS is configured to allow all origins for development.\n\n### Import Errors\n\n```bash\n# Server\npip install --upgrade pip\npip install -r requirements.txt --force-reinstall\n\n# UI\nbun install --force\n```\n\n### Timeout Issues\n\nThe UI has a 6-minute timeout for LLM responses. For faster responses:\n- Use a more powerful model (qwen-plus or qwen-max)\n- Simplify your prompts\n- Check your network connection\n\n## License\n\nThis is a development scaffold. See your organization's licensing requirements.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyrilluce%2Flangchain-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcyrilluce%2Flangchain-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyrilluce%2Flangchain-demo/lists"}