``` ├── .env.example ├── .gitattributes ├── .github/ ├── ISSUE_TEMPLATE/ ├── BUG-REPORT.yml ├── FEATURE-REQUEST.yml ├── config.yml ├── .gitignore ├── CONTRIBUTING.md ├── Dockerfile ├── LICENSE ├── Makefile ├── README.md ├── README_zh.md ├── assets/ ├── cli.png ├── cooragent.png ├── create_agent.png ├── wechat_community.jpg ├── cli.py ├── docs/ ├── QA.md ├── QA_zh.md ├── business_support.md ├── business_support_zh.md ├── pre-commit ├── pyproject.toml ├── src/ ├── __init__.py ├── config/ ├── agents.py ├── env.py ├── crawler/ ├── __init__.py ├── article.py ├── crawler.py ├── jina_client.py ├── readability_extractor.py ├── interface/ ├── __init__.py ├── agent_types.py ├── mcp_types.py ├── llm.py ├── manager/ ├── __init__.py ├── agents.py ├── mcp/ ├── __init__.py ├── excel_agent.py ├── excel_mcp/ ├── __init__.py ├── __main__.py ├── calculations.py ├── cell_utils.py ├── chart.py ├── data.py ├── exceptions.py ├── formatting.py ├── pivot.py ├── server.py ├── sheet.py ├── validation.py ├── workbook.py ├── register.py ├── slack_agent.py ├── prompts/ ├── __init__.py ├── agent_factory.md ├── browser.md ├── coder.md ├── coordinator.md ├── file_manager.md ├── planner.md ├── publisher.md ├── reporter.md ├── researcher.md ├── template.py ├── service/ ├── __init__.py ├── app.py ├── session.py ``` ## /.env.example ```example path="/.env.example" # LLM Environment variables # Reasoning LLM (for complex reasoning tasks) # If you're using your local Ollama, replace the model name after the slash and base url then you're good to go. # For wider model support, read https://docs.litellm.ai/docs/providers. # REASONING_API_KEY= # REASONING_BASE_URL= REASONING_MODEL=qwen-max-latest # Non-reasoning LLM (for straightforward tasks) # BASIC_API_KEY= # BASIC_BASE_URL= BASIC_MODEL=qwen-max-latest # CODE_API_KEY= # CODE_BASE_URL= CODE_MODEL=deepseek-chat # VIDEO_MODEL= # Vision-language LLM (for tasks requiring visual understanding) # VL_API_KEY= # VL_BASE_URL= VL_MODEL=qwen2.5-vl-72b-instruct # Application Settings DEBUG=False APP_ENV=development # browser is default to False, for it's time consuming USE_BROWSER=False # Add other environment variables as needed # TAVILY_API_KEY= # JINA_API_KEY= # Optional, default is None # turn off for collecting anonymous usage information # ANONYMIZED_TELEMETRY= # SLACK_USER_TOKEN= #SILICONFLOW_API_KEY= ``` ## /.gitattributes ```gitattributes path="/.gitattributes" *.mp4 filter=lfs diff=lfs merge=lfs -text *.gif filter=lfs diff=lfs merge=lfs -text ``` ## /.github/ISSUE_TEMPLATE/BUG-REPORT.yml ```yml path="/.github/ISSUE_TEMPLATE/BUG-REPORT.yml" name: Bug Report description: File a bug report title: '[Bug]: ' labels: ['bug'] body: - type: markdown attributes: value: | Thanks for taking the time to fill out this bug report! Check out this [link](https://github.com/toeverything/AFFiNE/blob/canary/docs/issue-triaging.md) to learn how we manage issues and when your issue will be processed. - type: textarea id: what-happened attributes: label: What happened? description: Also tell us, what did you expect to happen? placeholder: Tell us what you see! validations: required: true - type: dropdown id: distribution attributes: label: Distribution version description: What distribution of AFFiNE are you using? options: - macOS x64 (Intel) - macOS ARM 64 (Apple Silicon) - Windows x64 - Linux - Web (https://app.affine.pro) - Beta Web (https://insider.affine.pro) - Canary Web (https://affine.fail) validations: required: true - type: input id: version attributes: label: App Version description: What version of AFFiNE are you using? placeholder: (You can find AFFiNE version in [About AFFiNE] setting panel) - type: dropdown id: browsers attributes: label: What browsers are you seeing the problem on if you're using web version? multiple: true options: - Chrome - Microsoft Edge - Firefox - Safari - Other - type: checkboxes id: selfhost attributes: label: Are you self-hosting? description: > If you are self-hosting, please check the box and provide information about your setup. options: - label: 'Yes' - type: input id: selfhost-version attributes: label: Self-hosting Version description: What version of AFFiNE are you selfhosting? - type: textarea id: logs attributes: label: Relevant log output description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. render: shell - type: textarea attributes: label: Anything else? description: | Links? References? Anything that will give us more context about the issue you are encountering! Tip: You can attach images here ``` ## /.github/ISSUE_TEMPLATE/FEATURE-REQUEST.yml ```yml path="/.github/ISSUE_TEMPLATE/FEATURE-REQUEST.yml" name: Feature Request description: Suggest a feature or improvement title: '[Feature Request]: ' labels: ['feat', 'story'] assignees: ['hwangdev97'] body: - type: markdown attributes: value: | Thanks for taking the time to fill out this feature suggestion! - type: textarea id: description attributes: label: Description description: What would you like to see added to AFFiNE? placeholder: Please explain in details the feature and improvements you'd like to see. validations: required: true - type: textarea attributes: label: Use case description: | How might this feature be used and who might use it. - type: textarea attributes: label: Anything else? description: | Links? References? Anything that will give us more context about the idea you have! Tip: You can attach images here - type: checkboxes attributes: label: Are you willing to submit a PR? description: > (Optional) We encourage you to submit a [Pull Request](https://github.com/toeverything/affine/pulls) (PR) to help improve AFFiNE for everyone, especially if you have a good understanding of how to implement a fix or feature. See the AFFiNE [Contributing Guide](https://github.com/toeverything/affine/blob/canary/CONTRIBUTING.md) to get started. options: - label: Yes I'd like to help by submitting a PR! ``` ## /.github/ISSUE_TEMPLATE/config.yml ```yml path="/.github/ISSUE_TEMPLATE/config.yml" blank_issues_enabled: true contact_links: - name: Something else? url: https://github.com/toeverything/AFFiNE/discussions about: Feel free to ask and answer questions over in GitHub Discussions - name: AFFiNE Community Support url: https://community.affine.pro about: AFFiNE Community - a place to ask, learn and engage with others ``` ## /.gitignore ```gitignore path="/.gitignore" # Python-generated files __pycache__/ *.py[oc] build/ dist/ wheels/ *.egg-info .coverage agent_history.gif # Virtual environments .venv # Environment variables .env .idea/ store .vscode/* .DS_Store ``` ## /CONTRIBUTING.md # Contributing to cooragent Thank you for your interest in contributing to cooragent! We welcome contributions of all kinds from the community. ## Ways to Contribute There are many ways you can contribute to cooragent: - **Code Contributions**: Add new features, fix bugs, or improve performance - **Documentation**: Improve README, add code comments, or create examples - **Bug Reports**: Submit detailed bug reports through issues - **Feature Requests**: Suggest new features or improvements - **Code Reviews**: Review pull requests from other contributors - **Community Support**: Help others in discussions and issues ## Development Setup 1. Fork the repository 2. Clone your fork: ```bash git clone https://github.com/your-username/cooragent.git cd cooragent ``` 3. Set up your development environment: ```bash python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate uv sync ``` 4. Configure pre-commit hooks: ```bash chmod +x pre-commit ln -s ../../pre-commit .git/hooks/pre-commit ``` ## Development Process 1. Create a new branch: ```bash git checkout -b feature/amazing-feature ``` 2. Make your changes following our coding standards: - Write clear, documented code - Follow PEP 8 style guidelines - Add tests for new features - Update documentation as needed 3. Run tests and checks: ```bash make test # Run tests make lint # Run linting make format # Format code make coverage # Check test coverage ``` 4. Commit your changes: ```bash git commit -m 'Add some amazing feature' ``` 5. Push to your fork: ```bash git push origin feature/amazing-feature ``` 6. Open a Pull Request ## Pull Request Guidelines - Fill in the pull request template completely - Include tests for new features - Update documentation as needed - Ensure all tests pass and there are no linting errors - Keep pull requests focused on a single feature or fix - Reference any related issues ## Code Style - Follow PEP 8 guidelines - Use type hints where possible - Write descriptive docstrings - Keep functions and methods focused and single-purpose - Comment complex logic ## Community Guidelines - Be respectful and inclusive - Follow our code of conduct - Help others learn and grow - Give constructive feedback - Stay focused on improving the project ## Need Help? If you need help with anything: - Check existing issues and discussions - Join our community channels - Ask questions in discussions We appreciate your contributions to making cooragent better! ## /Dockerfile ``` path="/Dockerfile" FROM python:3.12-slim as builder ENV REASONING_API_KEY=sk-*** ENV REASONING_BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1 ENV REASONING_MODEL=deepseek-r1 ENV BASIC_API_KEY=sk-*** ENV BASIC_BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1 ENV BASIC_MODEL=qwen-max-latest ENV CODE_API_KEY=sk-*** ENV CODE_BASE_URL=https://api.deepseek.com/v1 ENV CODE_MODEL=deepseek-chat ENV Generate_avatar_API_KEY=sk-*** ENV Generate_avatar_BASE_URL=https://dashscope.aliyuncs.com/api/v1/services/aigc/text2image/image-synthesis ENV Generate_avatar_MODEL=wanx2.0-t2i-turbo ENV VL_API_KEY=sk-*** ENV VL_BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1 ENV VL_MODEL=qwen2.5-vl-72b-instruct ENV APP_ENV=development ENV TAVILY_API_KEY=tvly-dev-*** ENV ANONYMIZED_TELEMETRY=false ENV SLACK_USER_TOKEN=*** # -------------- Internal Network Environment Configuration -------------- # Set fixed timezone (commonly used in internal networks) ENV TZ=Asia/Shanghai RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone # -------------- Build Phase -------------- # Install the internally customized uv tool (specific version + internal network source) RUN pip install --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple uv # -------------- Project Preparation -------------- WORKDIR /app COPY pyproject.toml . COPY . /app COPY .env /app/.env ENV http_proxy=** ENV https_proxy=** ENV NO_PROXY=** # -------------- Virtual Environment Setup -------------- # Create a virtual environment (specify internal Python 3.12) RUN uv python install 3.12 RUN uv venv --python 3.12 ENV UV_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple # Activate the environment and install dependencies (internal mirror source) ENV VIRTUAL_ENV=/app/.venv ENV PATH="$VIRTUAL_ENV/bin:$PATH" RUN uv sync EXPOSE 9000 # Startup command (internal network listening configuration) CMD ["uv", "run", "src/service/app.py","--port", "9000"] ``` ## /LICENSE ``` path="/LICENSE" MIT License Copyright (c) 2025 cooragent Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ``` ## /Makefile ``` path="/Makefile" .PHONY: lint format install-dev serve install-dev: pip install -e ".[dev]" format: black --preview . lint: black --check . serve: uv run server.py ``` ## /README.md # cooragent [](https://www.python.org/downloads/) [](https://opensource.org/licenses/MIT) [](./assets/wechat_community.jpg) [English](./README.md) | [简体中文](./README_zh.md) # What is Cooragent Cooragent is an AI agent collaboration community. In this community, you can create powerful agents with a single sentence and collaborate with other agents to complete complex tasks. Agents can be freely combined, creating infinite possibilities. At the same time, you can also publish your agents to the community and share them with others.
Feature | cooragent | open-manus | langmanus | OpenAI Assistant Operator |
---|---|---|---|---|
Implementation Principle | Collaboration between different Agents based on autonomous Agent creation to complete complex functions | Implementation of complex functions based on tool calls | Implementation of complex functions based on tool calls | Implementation of complex functions based on tool calls |
Supported LLMs | Diverse | Diverse | Diverse | OpenAI only |
MCP Support | ✅ | ❌ | ❌ | ✅ |
Agent Collaboration | ✅ | ❌ | ✅ | ✅ |
Multi-Agent Runtime Support | ✅ | ❌ | ❌ | ❌ |
Observability | ✅ | ✅ | ❌ | ❌ |
Local Deployment | ✅ | ✅ | ✅ | ❌ |
功能 | cooragent | open-manus | langmanus | OpenAI Assistant Operator |
---|---|---|---|---|
实现原理 | 基于 Agent 自主创建实现不同 Agent 之间的协作完成复杂功能 | 基于工具调用实现复杂功能 | 基于工具调用实现复杂功能 | 基于工具调用实现复杂功能 |
支持的 LLMs | 丰富多样 | 丰富多样 | 丰富多样 | 仅限 OpenAI |
MCP 支持 | ✅ | ❌ | ❌ | ✅ |
Agent 协作 | ✅ | ❌ | ✅ | ✅ |
多 Agent Runtime 支持 | ✅ | ❌ | ❌ | ❌ |
可观测性 | ✅ | ✅ | ❌ | ❌ |
本地部署 | ✅ | ✅ | ✅ | ❌ |