1 line
7.8 KiB
JSON
1 line
7.8 KiB
JSON
{"repo": "ama-cmfai/lambda", "files": {"README.md": {"717af885b4fdc8c0346149950ef57e3d710e4f45": {"t": 1785595228.4723744, "n": 7608, "h": "12c247b7729cc73e", "c": "<div align=\"center\">\n\n# LAMBDA\n### LArge Model-based Data Analysis Agent System\n[](https://lambda.com.ai)\n[](https://lambda.org.ai)\n[](https://lambda.com.ai/cases)\n[](https://www.polyu.edu.hk/ama/cmfai/lambda.html)\n[](https://www.tandfonline.com/doi/full/10.1080/01621459.2025.2510000)\n\n[](https://www.python.org/)\n[](https://fastapi.tiangolo.com/)\n[](https://react.dev/)\n[](https://www.typescriptlang.org/)\n[](https://www.sqlite.org/)\n[](https://platform.openai.com/docs/api-reference/chat)\n\n<img width=\"1280\" height=\"804\" alt=\"lambda_gif-ezgif com-optimize\" src=\"https://github.com/user-attachments/assets/a98a3258-8aef-4790-b25d-4521e9be966f\" />\n</div>\n\nLAMBDA is a data analysis agent that turns natural-language questions into\nreproducible analysis workflows. Upload a dataset, ask a question, and LAMBDA\ncan inspect the data, write and run code, create visualizations, summarize\nfindings, and generate reports or notebooks from the session.\n\nThe public web app is available at **https://lambda.com.ai**. This repository\ncontains the runnable LAMBDA codebase, including the React frontend, FastAPI\nbackend, model interface, file workspace, and analysis tools.\n\n## Features\n\n- Conversational data analysis with executable Python and shell tools.\n- Beautiful and intuitive UI for data analysis.\n- Autonomous dataset exploration for CSV, Excel, text, and other common files.\n- Persistent workspace per conversation, so variables and generated files stay\n available throughout the analysis.\n- Automatic chart, table, report, notebook, and artifact tracking in the Files\n panel.\n- Export to Jupyter Notebook, Markdown/report bundles, PDF reports, and slides.\n- English and Chinese UI support, including Chinese report generation when\n XeLaTeX and CJK fonts are installed.\n- Configurable OpenAI-style model endpoint and model list.\n- Local SQLite storage for conversations, uploads, and generated artifacts.\n\n## Quick Start\n\nRequirements:\n\n- Python 3.11 or newer\n- Node.js 20 or newer\n- npm\n- Optional for PDF/Chinese reports: TeX Live with XeLaTeX\n\nCreate your backend configuration and start both services:\n\n```bash\ncp backend/.env.example backend/.env\n# Edit backend/.env and set OPENAI_API_KEY, OPENAI_BASE_URL, and MODEL_LIST.\n./start.sh\n```\n\nOpen the app:\n\n```text\nhttp://localhost:3000\n```\n\nStop the app:\n\n```bash\n./stop.sh\n```\n\nIf the default ports are already in use:\n\n```bash\nBACKEND_PORT=8010 FRONTEND_PORT=3010 ./start.sh\n```\n\n## Model Configuration\n\nLAMBDA talks to models through an OpenAI-style chat completions interface. Set\nthe endpoint and the models you want to expose in `backend/.env`:\n\n```env\nOPENAI_API_KEY=your-api-key\nOPENAI_BASE_URL=https://api.openai.com/v1\nMODEL_LIST='[\"mimo-v2.5-pro\",\"deepseek-v4-pro\"]'\n```\n\n`OPENAI_BASE_URL` should be the base URL of an OpenAI-compatible API. LAMBDA\nwill call:\n\n```text\n{OPENAI_BASE_URL}/chat/completions\n```\n\n`MODEL_LIST` is a JSON array of model IDs. These IDs appear in the model picker\nand are sent to the provider unchanged. The first model in the list is used as\nthe default model unless `DEFAULT_MODEL` is also set.\n\n## How To Use\n\n1. Open `http://localhost:3000`.\n2. Choose a model from the picker.\n3. Upload one or more data files, or start with an example dataset.\n4. Ask a question, such as:\n\n```text\nAnalyze this dataset, identify the main patterns, create visualizations, and\nwrite a report with the most important findings.\n```\n\nFor a hands-off workflow, use Autonomous Exploration. LAMBDA will inspect the\ndataset, plan the analysis, run code, build charts, and produce a report.\n\n## Exports And Files\n\nEach conversation has its own workspace under:\n\n```text\nbackend/data/workspaces/<conversation_id>/\n```\n\nUploaded files, charts, reports, notebooks, and other generated artifacts are\nshown in the Files panel. Runtime data is stored under `backend/data/`, including:\n\n```text\nbackend/data/\n lambda_local.db\n uploads/\n workspaces/\n```\n\nThese files are intentionally ignored by git.\n\n## Manual Setup\n\nBackend:\n\n```bash\ncd backend\npython3 -m venv venv\nsource venv/bin/activate\npip install -r requirements.txt\ncp .env.example .env\nuvicorn main:app --host 0.0.0.0 --port 8000 --reload\n```\n\nFrontend:\n\n```bash\ncd frontend\nnpm install\nnpm run dev\n```\n\n## PDF And Chinese Report Support\n\nFor LaTeX/PDF reports, especially Chinese reports, install the optional system\ndependencies once:\n\n```bash\n./scripts/install-system-deps.sh\n```\n\nThis installs `pdflatex`, `xelatex`, Chinese LaTeX packages, and Noto CJK fonts\nfor Chinese charts and reports. You can also let `start.sh` install them when\nmissing:\n\n```bash\nLAMBDA_AUTO_INSTALL_SYSTEM_DEPS=1 ./start.sh\n```\n\nThis uses `sudo apt-get`, so it is opt-in.\n\n## Runtime Note\n\nLAMBDA executes analysis code on the machine where the backend is running. Use\nit with trusted users and trusted data, and do not expose the backend directly\nto untrusted traffic without adding sandboxing or other isolation.\n\n## Versions\n\nThe latest code is on `main` and tagged as `lambda-v2`.\n\nThe previous open-source version is preserved at:\n\n- Branch: `legacy-open-source`\n- Tag: `lambda-v1`\n\n## Acknowledgements\n\nThank the contributors and the communities for their support and feedback.\n\n---\n\n> If you find our work useful in your research, consider citing our paper by:\n\n```bibtex\n@article{sun2026lambda,\n title={Lambda: A large model based data agent},\n author={Sun, Maojun and Han, Ruijian and Jiang, Binyan and Qi, Houduo and Sun, Defeng and Yuan, Yancheng and Huang, Jian},\n journal={Journal of the American Statistical Association},\n volume={121},\n number={553},\n pages={1--13},\n year={2026},\n publisher={Taylor \\& Francis}\n}\n\n@article{sun2025survey,\n title={A survey on large language model-based agents for statistics and data science},\n author={Sun, Maojun and Han, Ruijian and Jiang, Binyan and Qi, Houduo and Sun, Defeng and Yuan, Yancheng and Huang, Jian},\n journal={The American Statistician},\n pages={1--14},\n year={2025},\n publisher={Taylor \\& Francis}\n}\n\n@article{sun2026rejoinder,\n title={Rejoinder to the Discussions on {LAMBDA}: A Large Model Based Data Agent},\n author={Sun, Maojun and Han, Ruijian and Jiang, Binyan and Qi, Houduo and Sun, Defeng and Yuan, Yancheng and Huang, Jian},\n journal={Journal of the American Statistical Association},\n volume={121},\n number={553},\n pages={36--43},\n year={2026},\n publisher={Taylor \\& Francis}\n}\n```\n\n## Star History\n\n[](https://www.star-history.com/#AMA-CMFAI/LAMBDA&Date)\n"}}}} |