Home
Softono
b

bytedance

Professional software vendor delivering innovative solutions on the Softono platform. Specialized in both open-source and proprietary software development.

Total Products
5

Software by bytedance

g3proxy
Open Source

g3proxy

[![minimum rustc: 1.90](https://img.shields.io/badge/minimum%20rustc-1.90-green?logo=rust)](https://www.whatrustisit.com) [![License: Apache 2.0](https://img.shields.io/badge/license-Apache_2.0-blue.svg)](LICENSE) [![codecov](https://codecov.io/gh/bytedance/g3/graph/badge.svg?token=TSQCA4ALQM)](https://codecov.io/gh/bytedance/g3) [![docs](https://readthedocs.org/projects/g3-project/badge)](https://g3-project.readthedocs.io/) # G3 Project [δΈ­ζ–‡η‰ˆ README](README.zh_CN.md) | [ζ—₯本θͺž README](README.ja_JP.md) ## About This is the project we used to build enterprise-oriented generic proxy solutions, including but not limited to proxy / reverse proxy (WIP) / load balancer (TBD) / NAT traversal (WIP). ## Applications The G3 project consists of many applications, each of which has a separate subdirectory containing its own code, documentation, etc. In addition to the application directories, there are some public directories: - [doc](doc) Contains project-level documentation. - [sphinx](sphinx) is used to generate HTML reference documents for each application. - [scripts](scripts) Contains various auxiliary scripts, including coverage testing, packaging scripts, etc. ### g3proxy A generic forward proxy solution, but you can also use it as tcp streaming / transparent proxy / reverse proxy as we have basic support built in. #### Feature highlights - Async Rust: fast and reliable - Http1 / Socks5 forward proxy protocol, SNI Proxy and TCP TPROXY - Support easy-proxy and masque/http Well-Known URI - Proxy Chaining, with support for dynamic selection of upstream proxies - Plenty of egress route selection methods, with support for custom egress selection agent - TCP/TLS Stream Proxy, Basic HTTP Reverse Proxy - TLS over OpenSSL / BoringSSL / AWS-LC / AWS-LC-FIPS / Tongsuo, and even rustls - TLS MITM interception, decrypted traffic dump, HTTP1/HTTP2/IMAP/SMTP interception - ICAP adaptation for HTTP1/HTTP2/IMAP/SMTP, can integrate seamlessly with 3rd-party security products - Graceful reload - Customizable load balancing and failover strategies - User Auth, with a rich set of config options - Can set differential site config for each user - Rich ACL/Limit rules, at ingress / egress / user level - Rich monitoring metrics, at ingress / egress / user / user-site level - Support for a variety of observability tools [README](g3proxy/README.md) | [User Guide](g3proxy/UserGuide.en_US.md) | [Reference Doc](https://g3-project.readthedocs.io/projects/g3proxy/en/latest/) ### g3statsd A StatsD compatible stats aggregator. [README](g3statsd/README.md) | [Reference Doc](https://g3-project.readthedocs.io/projects/g3statsd/en/latest/) ### g3tiles A work in progress reverse proxy solution. [Reference Doc](https://g3-project.readthedocs.io/projects/g3tiles/en/latest/) ### g3bench A benchmark tool that supports: - HTTP: HTTP/1.1, HTTP/2, HTTP/3 - WebSocket - TLS Handshake - DNS: UDP, TCP, DNS over TLS, DNS over HTTP, DNS over QUIC, DNS over HTTP/3 - Thrift RPC - Cloudflare Keyless [README](g3bench/README.md) ### g3mkcert A tool to make root CA / intermediate CA / TLS server / TLS client / TLCP server / TLCP client certificates. [README](g3mkcert/README.md) ### g3fcgen Fake certificate generator for g3proxy. [README](g3fcgen/README.md) ### g3iploc IP location lookup service for g3proxy GeoIP support. [README](g3iploc/README.md) ### g3keymess A simple implementation of Cloudflare keyless server. [README](g3keymess/README.md) | [Reference Doc](https://g3-project.readthedocs.io/projects/g3keymess/en/latest/) ## Target Platform Linux is fully supported. The code also compiles on the following platforms: - macOS - Windows >= 10 - FreeBSD >= 14.3 - NetBSD >= 10.1 - OpenBSD >= 7.8 ## Dev-env Setup Guide Follow [Dev-Setup](doc/dev-setup.md). ## Standards Follow [Standards](doc/standards.md). ## Build, Package and Deploy Pre-Built packages can be found at [cloudsmith](https://cloudsmith.io/~g3-oqh/repos/). But it is still recommended to build packages yourself, see [Build and Package](doc/build_and_package.md) for more details. ### LTS Version See [Long-Term Support](doc/long-term_support.md). ## Contribution Please check [Contributing](CONTRIBUTING.md) for more details. ## Code of Conduct Please check [Code of Conduct](CODE_OF_CONDUCT.md) for more details. ## Security If you discover a potential security issue in this project, or think you may have discovered a security issue, we ask that you notify Bytedance Security via our [security center](https://security.bytedance.com/src) or [vulnerability reporting email](mailto:[email protected]). Please do **not** create a public GitHub issue. ## License This project is licensed under the [Apache-2.0 License](LICENSE). ## 404Starlink <img src="https://github.com/knownsec/404StarLink/raw/master/Images/logo.png" width="30%"> [g3proxy](g3proxy) has joined [404Starlink](https://github.com/knownsec/404StarLink)

Load Balancers & Proxy
877 Github Stars
deer-flow
Open Source

deer-flow

# 🦌 DeerFlow - 2.0 English | [δΈ­ζ–‡](./README_zh.md) | [ζ—₯本θͺž](./README_ja.md) | [FranΓ§ais](./README_fr.md) | [Русский](./README_ru.md) [![Python](https://img.shields.io/badge/Python-3.12%2B-3776AB?logo=python&logoColor=white)](./backend/pyproject.toml) [![Node.js](https://img.shields.io/badge/Node.js-22%2B-339933?logo=node.js&logoColor=white)](./Makefile) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE) <a href="https://trendshift.io/repositories/14699" target="_blank"><img src="https://trendshift.io/api/badge/repositories/14699" alt="bytedance%2Fdeer-flow | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a> > On February 28th, 2026, DeerFlow claimed the πŸ† #1 spot on GitHub Trending following the launch of version 2. Thanks a million to our incredible community β€” you made this happen! πŸ’ͺπŸ”₯ DeerFlow (**D**eep **E**xploration and **E**fficient **R**esearch **Flow**) is an open-source **super agent harness** that orchestrates **sub-agents**, **memory**, and **sandboxes** to do almost anything β€” powered by **extensible skills**. https://github.com/user-attachments/assets/a8bcadc4-e040-4cf2-8fda-dd768b999c18 > [!NOTE] > **DeerFlow 2.0 is a ground-up rewrite.** It shares no code with v1. If you're looking for the original Deep Research framework, it's maintained on the [`1.x` branch](https://github.com/bytedance/deer-flow/tree/main-1.x) β€” contributions there are still welcome. Active development has moved to 2.0. ## Official Website [<img width="2880" height="1600" alt="image" src="https://github.com/user-attachments/assets/a598c49f-3b2f-41ea-a052-05e21349188a" />](https://deerflow.tech) Learn more and see **real demos** on our [**official website**](https://deerflow.tech). ## Coding Plan from ByteDance Volcengine <img width="4808" height="2400" alt="θ‹±ζ–‡ζ–ΉθˆŸ" src="https://github.com/user-attachments/assets/2ecc7b9d-50be-4185-b1f7-5542d222fb2d" /> - We strongly recommend using Doubao-Seed-2.0-Code, DeepSeek v3.2 and Kimi 2.5 to run DeerFlow - [Learn more](https://www.byteplus.com/en/activity/codingplan?utm_campaign=deer_flow&utm_content=deer_flow&utm_medium=devrel&utm_source=OWO&utm_term=deer_flow) - [δΈ­ε›½ε€§ι™†εœ°εŒΊηš„εΌ€ε‘θ€…θ―·η‚Ήε‡»θΏ™ι‡Œ](https://www.volcengine.com/activity/codingplan?utm_campaign=deer_flow&utm_content=deer_flow&utm_medium=devrel&utm_source=OWO&utm_term=deer_flow) ## InfoQuest DeerFlow has newly integrated the intelligent search and crawling toolset independently developed by BytePlus--[InfoQuest (supports free online experience)](https://docs.byteplus.com/en/docs/InfoQuest/What_is_Info_Quest) <a href="https://docs.byteplus.com/en/docs/InfoQuest/What_is_Info_Quest" target="_blank"> <img src="https://sf16-sg.tiktokcdn.com/obj/eden-sg/hubseh7bsbps/20251208-160108.png" alt="InfoQuest_banner" /> </a> --- ## Table of Contents - [🦌 DeerFlow - 2.0](#-deerflow---20) - [Official Website](#official-website) - [Coding Plan from ByteDance Volcengine](#coding-plan-from-bytedance-volcengine) - [InfoQuest](#infoquest) - [Table of Contents](#table-of-contents) - [One-Line Agent Setup](#one-line-agent-setup) - [Quick Start](#quick-start) - [Configuration](#configuration) - [Running the Application](#running-the-application) - [Deployment Sizing](#deployment-sizing) - [Option 1: Docker (Recommended)](#option-1-docker-recommended) - [Option 2: Local Development](#option-2-local-development) - [Advanced](#advanced) - [Sandbox Mode](#sandbox-mode) - [MCP Server](#mcp-server) - [IM Channels](#im-channels) - [LangSmith Tracing](#langsmith-tracing) - [Langfuse Tracing](#langfuse-tracing) - [Using Both Providers](#using-both-providers) - [From Deep Research to Super Agent Harness](#from-deep-research-to-super-agent-harness) - [Core Features](#core-features) - [Skills \& Tools](#skills--tools) - [Claude Code Integration](#claude-code-integration) - [Sub-Agents](#sub-agents) - [Sandbox \& File System](#sandbox--file-system) - [Context Engineering](#context-engineering) - [Long-Term Memory](#long-term-memory) - [Recommended Models](#recommended-models) - [Embedded Python Client](#embedded-python-client) - [Documentation](#documentation) - [⚠️ Security Notice](#️-security-notice) - [Improper Deployment May Introduce Security Risks](#improper-deployment-may-introduce-security-risks) - [Security Recommendations](#security-recommendations) - [Contributing](#contributing) - [License](#license) - [Acknowledgments](#acknowledgments) - [Key Contributors](#key-contributors) - [Star History](#star-history) ## One-Line Agent Setup If you use Claude Code, Codex, Cursor, Windsurf, or another coding agent, you can hand it the setup instructions in one sentence: ```text Help me clone DeerFlow if needed, then bootstrap it for local development by following https://raw.githubusercontent.com/bytedance/deer-flow/main/Install.md ``` That prompt is intended for coding agents. It tells the agent to clone the repo if needed, choose Docker when available, and stop with the exact next command plus any missing config the user still needs to provide. ## Quick Start ### Configuration 1. **Clone the DeerFlow repository** ```bash git clone https://github.com/bytedance/deer-flow.git cd deer-flow ``` 2. **Run the setup wizard** From the project root directory (`deer-flow/`), run: ```bash make setup ``` This launches an interactive wizard that guides you through choosing an LLM provider, optional web search, and execution/safety preferences such as sandbox mode, bash access, and file-write tools. It generates a minimal `config.yaml` and writes your keys to `.env`. Takes about 2 minutes. The wizard also lets you configure an optional web search provider, or skip it for now. Run `make doctor` at any time to verify your setup and get actionable fix hints. > **Advanced / manual configuration**: If you prefer to edit `config.yaml` directly, run `make config` instead to copy the full template. See `config.example.yaml` for the complete reference including CLI-backed providers (Codex CLI, Claude Code OAuth), OpenRouter, Responses API, and more. <details> <summary>Manual model configuration examples</summary> ```yaml models: - name: gpt-4o display_name: GPT-4o use: langchain_openai:ChatOpenAI model: gpt-4o api_key: $OPENAI_API_KEY - name: openrouter-gemini-2.5-flash display_name: Gemini 2.5 Flash (OpenRouter) use: langchain_openai:ChatOpenAI model: google/gemini-2.5-flash-preview api_key: $OPENROUTER_API_KEY base_url: https://openrouter.ai/api/v1 - name: gpt-5-responses display_name: GPT-5 (Responses API) use: langchain_openai:ChatOpenAI model: gpt-5 api_key: $OPENAI_API_KEY use_responses_api: true output_version: responses/v1 - name: qwen3-32b-vllm display_name: Qwen3 32B (vLLM) use: deerflow.models.vllm_provider:VllmChatModel model: Qwen/Qwen3-32B api_key: $VLLM_API_KEY base_url: http://localhost:8000/v1 supports_thinking: true when_thinking_enabled: extra_body: chat_template_kwargs: enable_thinking: true ``` OpenRouter and similar OpenAI-compatible gateways should be configured with `langchain_openai:ChatOpenAI` plus `base_url`. If you prefer a provider-specific environment variable name, point `api_key` at that variable explicitly (for example `api_key: $OPENROUTER_API_KEY`). To route OpenAI models through `/v1/responses`, keep using `langchain_openai:ChatOpenAI` and set `use_responses_api: true` with `output_version: responses/v1`. For vLLM 0.19.0, use `deerflow.models.vllm_provider:VllmChatModel`. For Qwen-style reasoning models, DeerFlow toggles reasoning with `extra_body.chat_template_kwargs.enable_thinking` and preserves vLLM's non-standard `reasoning` field across multi-turn tool-call conversations. Legacy `thinking` configs are normalized automatically for backward compatibility. Reasoning models may also require the server to be started with `--reasoning-parser ...`. If your local vLLM deployment accepts any non-empty API key, you can still set `VLLM_API_KEY` to a placeholder value. CLI-backed provider examples: ```yaml models: - name: gpt-5.4 display_name: GPT-5.4 (Codex CLI) use: deerflow.models.openai_codex_provider:CodexChatModel model: gpt-5.4 supports_thinking: true supports_reasoning_effort: true - name: claude-sonnet-4.6 display_name: Claude Sonnet 4.6 (Claude Code OAuth) use: deerflow.models.claude_provider:ClaudeChatModel model: claude-sonnet-4-6 max_tokens: 4096 supports_thinking: true ``` - Codex CLI reads `~/.codex/auth.json` - Claude Code accepts `CLAUDE_CODE_OAUTH_TOKEN`, `ANTHROPIC_AUTH_TOKEN`, `CLAUDE_CODE_CREDENTIALS_PATH`, or `~/.claude/.credentials.json` - ACP agent entries are separate from model providers β€” if you configure `acp_agents.codex`, point it at a Codex ACP adapter such as `npx -y @zed-industries/codex-acp` - On macOS, export Claude Code auth explicitly if needed: ```bash eval "$(python3 scripts/export_claude_code_oauth.py --print-export)" ``` API keys can also be set manually in `.env` (recommended) or exported in your shell: ```bash OPENAI_API_KEY=your-openai-api-key TAVILY_API_KEY=your-tavily-api-key ``` </details> ### Running the Application #### Deployment Sizing Use the table below as a practical starting point when choosing how to run DeerFlow: | Deployment target | Starting point | Recommended | Notes | |---------|-----------|------------|-------| | Local evaluation / `make dev` | 4 vCPU, 8 GB RAM, 20 GB free SSD | 8 vCPU, 16 GB RAM | Good for one developer or one light session with hosted model APIs. `2 vCPU / 4 GB` is usually not enough. | | Docker development / `make docker-start` | 4 vCPU, 8 GB RAM, 25 GB free SSD | 8 vCPU, 16 GB RAM | Image builds, bind mounts, and sandbox containers need more headroom than pure local dev. | | Long-running server / `make up` | 8 vCPU, 16 GB RAM, 40 GB free SSD | 16 vCPU, 32 GB RAM | Preferred for shared use, multi-agent runs, report generation, or heavier sandbox workloads. | - These numbers cover DeerFlow itself. If you also host a local LLM, size that service separately. - Linux plus Docker is the recommended deployment target for a persistent server. macOS and Windows are best treated as development or evaluation environments. - If CPU or memory usage stays pinned, reduce concurrent runs first, then move to the next sizing tier. #### Option 1: Docker (Recommended) **Development** (hot-reload, source mounts): ```bash make docker-init # Pull sandbox image (only once or when image updates) make docker-start # Start services (auto-detects sandbox mode from config.yaml) ``` `make docker-start` starts `provisioner` only when `config.yaml` uses provisioner mode (`sandbox.use: deerflow.community.aio_sandbox:AioSandboxProvider` with `provisioner_url`). Docker builds use the upstream `uv` registry by default. If you need faster mirrors in restricted networks, export `UV_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple` and `NPM_REGISTRY=https://registry.npmmirror.com` before running `make docker-init` or `make docker-start`. Backend processes automatically pick up `config.yaml` changes on the next config access, so model metadata updates do not require a manual restart during development. > [!TIP] > On Linux, if Docker-based commands fail with `permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock`, add your user to the `docker` group and re-login before retrying. See [CONTRIBUTING.md](CONTRIBUTING.md#linux-docker-daemon-permission-denied) for the full fix. **Production** (builds images locally, mounts runtime config and data): ```bash make up # Build images and start all production services make down # Stop and remove containers ``` Access: http://localhost:2026 The unified nginx endpoint is same-origin by default and does not emit browser CORS headers. If you run a split-origin or port-forwarded browser client, set `GATEWAY_CORS_ORIGINS` to comma-separated exact origins such as `http://localhost:3000`; the Gateway then applies the CORS allowlist and matching CSRF origin checks. See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed Docker development guide. #### Option 2: Local Development If you prefer running services locally: Prerequisite: complete the "Configuration" steps above first (`make setup`). `make dev` requires a valid `config.yaml` in the project root. Set `DEER_FLOW_PROJECT_ROOT` to define that root explicitly, or `DEER_FLOW_CONFIG_PATH` to point at a specific config file. Runtime state defaults to `.deer-flow` under the project root and can be moved with `DEER_FLOW_HOME`; skills default to `skills/` under the project root and can be moved with `DEER_FLOW_SKILLS_PATH`. Run `make doctor` to verify your setup before starting. On Windows, run the local development flow from Git Bash. Native `cmd.exe` and PowerShell shells are not supported for the bash-based service scripts, and WSL is not guaranteed because some scripts rely on Git for Windows utilities such as `cygpath`. 1. **Check prerequisites**: ```bash make check # Verifies Node.js 22+, pnpm, uv, nginx ``` 2. **Install dependencies**: ```bash make install # Install backend + frontend dependencies + pre-commit hooks ``` 3. **(Optional) Pre-pull sandbox image**: ```bash # Recommended if using Docker/Container-based sandbox make setup-sandbox ``` 4. **(Optional) Load sample memory data for local review**: ```bash python scripts/load_memory_sample.py ``` This copies the sample fixture into the default local runtime memory file so reviewers can immediately test `Settings > Memory`. See [backend/docs/MEMORY_SETTINGS_REVIEW.md](backend/docs/MEMORY_SETTINGS_REVIEW.md) for the shortest review flow. 5. **Start services**: ```bash make dev ``` 6. **Access**: http://localhost:2026 #### Startup Modes DeerFlow runs the agent runtime inside the Gateway API. Development mode enables hot-reload; production mode uses a pre-built frontend. | | **Local Foreground** | **Local Daemon** | **Docker Dev** | **Docker Prod** | |---|---|---|---|---| | **Dev** | `./scripts/serve.sh --dev`<br/>`make dev` | `./scripts/serve.sh --dev --daemon`<br/>`make dev-daemon` | `./scripts/docker.sh start`<br/>`make docker-start` | β€” | | **Prod** | `./scripts/serve.sh --prod`<br/>`make start` | `./scripts/serve.sh --prod --daemon`<br/>`make start-daemon` | β€” | `./scripts/deploy.sh`<br/>`make up` | | Action | Local | Docker Dev | Docker Prod | |---|---|---|---| | **Stop** | `./scripts/serve.sh --stop`<br/>`make stop` | `./scripts/docker.sh stop`<br/>`make docker-stop` | `./scripts/deploy.sh down`<br/>`make down` | | **Restart** | `./scripts/serve.sh --restart [flags]` | `./scripts/docker.sh restart` | β€” | Gateway owns `/api/langgraph/*` and translates those public LangGraph-compatible paths to its native `/api/*` routers behind nginx. #### Docker Production Deployment `deploy.sh` supports building and starting separately: ```bash # One-step (build + start) deploy.sh # Two-step (build once, start later) deploy.sh build # build all images deploy.sh start # start pre-built images # Stop deploy.sh down ``` ### Advanced #### Sandbox Mode DeerFlow supports multiple sandbox execution modes: - **Local Execution** (runs sandbox code directly on the host machine) - **Docker Execution** (runs sandbox code in isolated Docker containers) - **Docker Execution with Kubernetes** (runs sandbox code in Kubernetes pods via provisioner service) For Docker development, service startup follows `config.yaml` sandbox mode. In Local/Docker modes, `provisioner` is not started. See the [Sandbox Configuration Guide](backend/docs/CONFIGURATION.md#sandbox) to configure your preferred mode. #### MCP Server DeerFlow supports configurable MCP servers and skills to extend its capabilities. For HTTP/SSE MCP servers, OAuth token flows are supported (`client_credentials`, `refresh_token`). See the [MCP Server Guide](backend/docs/MCP_SERVER.md) for detailed instructions. #### IM Channels DeerFlow supports receiving tasks from messaging apps. Channels auto-start when configured β€” no public IP required for any of them. | Channel | Transport | Difficulty | |---------|-----------|------------| | Telegram | Bot API (long-polling) | Easy | | Slack | Socket Mode | Moderate | | Feishu / Lark | WebSocket | Moderate | | WeChat | Tencent iLink (long-polling) | Moderate | | WeCom | WebSocket | Moderate | | DingTalk | Stream Push (WebSocket) | Moderate | **Configuration in `config.yaml`:** ```yaml channels: # LangGraph-compatible Gateway API base URL (default: http://localhost:8001/api) langgraph_url: http://localhost:8001/api # Gateway API URL (default: http://localhost:8001) gateway_url: http://localhost:8001 # Optional: global session defaults for all mobile channels session: assistant_id: lead_agent # or a custom agent name; custom agents are routed via lead_agent + agent_name config: recursion_limit: 100 context: thinking_enabled: true is_plan_mode: false subagent_enabled: false feishu: enabled: true app_id: $FEISHU_APP_ID app_secret: $FEISHU_APP_SECRET # domain: https://open.feishu.cn # China (default) # domain: https://open.larksuite.com # International wecom: enabled: true bot_id: $WECOM_BOT_ID bot_secret: $WECOM_BOT_SECRET slack: enabled: true bot_token: $SLACK_BOT_TOKEN # xoxb-... app_token: $SLACK_APP_TOKEN # xapp-... (Socket Mode) allowed_users: [] # empty = allow all telegram: enabled: true bot_token: $TELEGRAM_BOT_TOKEN allowed_users: [] # empty = allow all wechat: enabled: false bot_token: $WECHAT_BOT_TOKEN ilink_bot_id: $WECHAT_ILINK_BOT_ID qrcode_login_enabled: true # optional: allow first-time QR bootstrap when bot_token is absent allowed_users: [] # empty = allow all polling_timeout: 35 state_dir: ./.deer-flow/wechat/state max_inbound_image_bytes: 20971520 max_outbound_image_bytes: 20971520 max_inbound_file_bytes: 52428800 max_outbound_file_bytes: 52428800 # Optional: per-channel / per-user session settings session: assistant_id: mobile-agent # custom agent names are also supported here context: thinking_enabled: false users: "123456789": assistant_id: vip-agent config: recursion_limit: 150 context: thinking_enabled: true subagent_enabled: true dingtalk: enabled: true client_id: $DINGTALK_CLIENT_ID # Client ID of your DingTalk application client_secret: $DINGTALK_CLIENT_SECRET # Client Secret of your DingTalk application allowed_users: [] # empty = allow all card_template_id: "" # Optional: AI Card template ID for streaming typewriter effect ``` Notes: - `assistant_id: lead_agent` calls the default LangGraph assistant directly. - If `assistant_id` is set to a custom agent name, DeerFlow still routes through `lead_agent` and injects that value as `agent_name`, so the custom agent's SOUL/config takes effect for IM channels. - IM channel workers call Gateway's LangGraph-compatible API internally and automatically attach process-local internal auth plus the CSRF cookie/header pair required for thread and run creation. Set the corresponding API keys in your `.env` file: ```bash # Telegram TELEGRAM_BOT_TOKEN=123456789:ABCdefGHIjklMNOpqrSTUvwxYZ # Slack SLACK_BOT_TOKEN=xoxb-... SLACK_APP_TOKEN=xapp-... # Feishu / Lark FEISHU_APP_ID=cli_xxxx FEISHU_APP_SECRET=your_app_secret # WeChat iLink WECHAT_BOT_TOKEN=your_ilink_bot_token WECHAT_ILINK_BOT_ID=your_ilink_bot_id # WeCom WECOM_BOT_ID=your_bot_id WECOM_BOT_SECRET=your_bot_secret # DingTalk DINGTALK_CLIENT_ID=your_client_id DINGTALK_CLIENT_SECRET=your_client_secret ``` **Telegram Setup** 1. Chat with [@BotFather](https://t.me/BotFather), send `/newbot`, and copy the HTTP API token. 2. Set `TELEGRAM_BOT_TOKEN` in `.env` and enable the channel in `config.yaml`. **Slack Setup** 1. Create a Slack App at [api.slack.com/apps](https://api.slack.com/apps) β†’ Create New App β†’ From scratch. 2. Under **OAuth & Permissions**, add Bot Token Scopes: `app_mentions:read`, `chat:write`, `im:history`, `im:read`, `im:write`, `files:write`. 3. Enable **Socket Mode** β†’ generate an App-Level Token (`xapp-…`) with `connections:write` scope. 4. Under **Event Subscriptions**, subscribe to bot events: `app_mention`, `message.im`. 5. Set `SLACK_BOT_TOKEN` and `SLACK_APP_TOKEN` in `.env` and enable the channel in `config.yaml`. **Feishu / Lark Setup** 1. Create an app on [Feishu Open Platform](https://open.feishu.cn/) β†’ enable **Bot** capability. 2. Add permissions: `im:message`, `im:message.p2p_msg:readonly`, `im:resource`. 3. Under **Events**, subscribe to `im.message.receive_v1` and select **Long Connection** mode. 4. Copy the App ID and App Secret. Set `FEISHU_APP_ID` and `FEISHU_APP_SECRET` in `.env` and enable the channel in `config.yaml`. **WeChat Setup** 1. Enable the `wechat` channel in `config.yaml`. 2. Either set `WECHAT_BOT_TOKEN` in `.env`, or set `qrcode_login_enabled: true` for first-time QR bootstrap. 3. When `bot_token` is absent and QR bootstrap is enabled, watch backend logs for the QR content returned by iLink and complete the binding flow. 4. After the QR flow succeeds, DeerFlow persists the acquired token under `state_dir` for later restarts. 5. For Docker Compose deployments, keep `state_dir` on a persistent volume so the `get_updates_buf` cursor and saved auth state survive restarts. **WeCom Setup** 1. Create a bot on the WeCom AI Bot platform and obtain the `bot_id` and `bot_secret`. 2. Enable `channels.wecom` in `config.yaml` and fill in `bot_id` / `bot_secret`. 3. Set `WECOM_BOT_ID` and `WECOM_BOT_SECRET` in `.env`. 4. Make sure backend dependencies include `wecom-aibot-python-sdk`. The channel uses a WebSocket long connection and does not require a public callback URL. 5. The current integration supports inbound text, image, and file messages. Final images/files generated by the agent are also sent back to the WeCom conversation. **DingTalk Setup** 1. Create a DingTalk application in the [DingTalk Developer Console](https://open.dingtalk.com/) and enable **Robot** capability. 2. Set the message receiving mode to **Stream Mode** in the robot configuration page. 3. Copy the `Client ID` and `Client Secret`, set `DINGTALK_CLIENT_ID` and `DINGTALK_CLIENT_SECRET` in `.env`, and enable the channel in `config.yaml`. 4. *(Optional)* To enable streaming AI Card replies (typewriter effect), create an **AI Card** template on the [DingTalk Card Platform](https://open.dingtalk.com/document/dingstart/typewriter-effect-streaming-ai-card), then set `card_template_id` in `config.yaml` to the template ID. You also need to apply for the `Card.Streaming.Write` and `Card.Instance.Write` permissions. When DeerFlow runs in Docker Compose, IM channels execute inside the `gateway` container. In that case, do not point `channels.langgraph_url` or `channels.gateway_url` at `localhost`; use container service names such as `http://gateway:8001/api` and `http://gateway:8001`, or set `DEER_FLOW_CHANNELS_LANGGRAPH_URL` and `DEER_FLOW_CHANNELS_GATEWAY_URL`. **Commands** Once a channel is connected, you can interact with DeerFlow directly from the chat: | Command | Description | |---------|-------------| | `/new` | Start a new conversation | | `/status` | Show current thread info | | `/models` | List available models | | `/memory` | View memory | | `/help` | Show help | > Messages without a command prefix are treated as regular chat β€” DeerFlow creates a thread and responds conversationally. #### LangSmith Tracing DeerFlow has built-in [LangSmith](https://smith.langchain.com) integration for observability. When enabled, all LLM calls, agent runs, and tool executions are traced and visible in the LangSmith dashboard. Add the following to your `.env` file: ```bash LANGSMITH_TRACING=true LANGSMITH_ENDPOINT=https://api.smith.langchain.com LANGSMITH_API_KEY=lsv2_pt_xxxxxxxxxxxxxxxx LANGSMITH_PROJECT=xxx ``` #### Langfuse Tracing DeerFlow also supports [Langfuse](https://langfuse.com) observability for LangChain-compatible runs. Add the following to your `.env` file: ```bash LANGFUSE_TRACING=true LANGFUSE_PUBLIC_KEY=pk-lf-xxxxxxxxxxxxxxxx LANGFUSE_SECRET_KEY=sk-lf-xxxxxxxxxxxxxxxx LANGFUSE_BASE_URL=https://cloud.langfuse.com ``` If you are using a self-hosted Langfuse instance, set `LANGFUSE_BASE_URL` to your deployment URL. **Trace correlation fields.** Every agent run is annotated with Langfuse's reserved trace attributes so the Sessions and Users pages light up automatically: - `session_id` = LangGraph `thread_id` β€” groups every trace of the same conversation - `user_id` = effective user from `get_effective_user_id()` (falls back to `default` in no-auth mode) - `trace_name` = assistant id (defaults to `lead-agent`) - `tags` = `[env:<DEER_FLOW_ENV>, model:<model_name>]` (omitted when not set) These are injected into `RunnableConfig.metadata` at the graph invocation root for both the gateway path (`runtime/runs/worker.py::run_agent`) and the embedded path (`client.py::DeerFlowClient.stream`), so any LangChain-compatible callback can read them. Set `DEER_FLOW_ENV` (or `ENVIRONMENT`) to tag traces by deployment environment. #### Using Both Providers If both LangSmith and Langfuse are enabled, DeerFlow attaches both tracing callbacks and reports the same model activity to both systems. If a provider is explicitly enabled but missing required credentials, or if its callback fails to initialize, DeerFlow fails fast when tracing is initialized during model creation and the error message names the provider that caused the failure. For Docker deployments, tracing is disabled by default. Set `LANGSMITH_TRACING=true` and `LANGSMITH_API_KEY` in your `.env` to enable it. ## From Deep Research to Super Agent Harness DeerFlow started as a Deep Research framework β€” and the community ran with it. Since launch, developers have pushed it far beyond research: building data pipelines, generating slide decks, spinning up dashboards, automating content workflows. Things we never anticipated. That told us something important: DeerFlow wasn't just a research tool. It was a **harness** β€” a runtime that gives agents the infrastructure to actually get work done. So we rebuilt it from scratch. DeerFlow 2.0 is no longer a framework you wire together. It's a super agent harness β€” batteries included, fully extensible. Built on LangGraph and LangChain, it ships with everything an agent needs out of the box: a filesystem, memory, skills, sandbox-aware execution, and the ability to plan and spawn sub-agents for complex, multi-step tasks. Use it as-is. Or tear it apart and make it yours. ## Core Features ### Skills & Tools Skills are what make DeerFlow do *almost anything*. A standard Agent Skill is a structured capability module β€” a Markdown file that defines a workflow, best practices, and references to supporting resources. DeerFlow ships with built-in skills for research, report generation, slide creation, web pages, image and video generation, and more. But the real power is extensibility: add your own skills, replace the built-in ones, or combine them into compound workflows. Skills are loaded progressively β€” only when the task needs them, not all at once. This keeps the context window lean and makes DeerFlow work well even with token-sensitive models. Users can explicitly activate an enabled skill for a single turn by starting the request with `/skill-name`, for example `/data-analysis analyze uploads/foo.csv`. DeerFlow loads that skill's `SKILL.md` as hidden current-turn context while leaving the base prompt limited to skill metadata. Slash activation respects disabled skills, custom-agent skill whitelists, and existing channel commands such as `/new` and `/help`. When you install `.skill` archives through the Gateway, DeerFlow accepts standard optional frontmatter metadata such as `version`, `author`, and `compatibility` instead of rejecting otherwise valid external skills. Tools follow the same philosophy. DeerFlow comes with a core toolset β€” web search, web fetch, file operations, bash execution β€” and supports custom tools via MCP servers and Python functions. Swap anything. Add anything. Gateway-generated follow-up suggestions now normalize both plain-string model output and block/list-style rich content before parsing the JSON array response, so provider-specific content wrappers do not silently drop suggestions. ``` # Paths inside the sandbox container /mnt/skills/public β”œβ”€β”€ research/SKILL.md β”œβ”€β”€ report-generation/SKILL.md β”œβ”€β”€ slide-creation/SKILL.md β”œβ”€β”€ web-page/SKILL.md └── image-generation/SKILL.md /mnt/skills/custom └── your-custom-skill/SKILL.md ← yours ``` #### Claude Code Integration The `claude-to-deerflow` skill lets you interact with a running DeerFlow instance directly from [Claude Code](https://docs.anthropic.com/en/docs/claude-code). Send research tasks, check status, manage threads β€” all without leaving the terminal. **Install the skill**: ```bash npx skills add https://github.com/bytedance/deer-flow --skill claude-to-deerflow ``` Then make sure DeerFlow is running (default at `http://localhost:2026`) and use the `/claude-to-deerflow` command in Claude Code. **What you can do**: - Send messages to DeerFlow and get streaming responses - Choose execution modes: flash (fast), standard, pro (planning), ultra (sub-agents) - Check DeerFlow health, list models/skills/agents - Manage threads and conversation history - Upload files for analysis **Environment variables** (optional, for custom endpoints): ```bash DEERFLOW_URL=http://localhost:2026 # Unified proxy base URL DEERFLOW_GATEWAY_URL=http://localhost:2026 # Gateway API DEERFLOW_LANGGRAPH_URL=http://localhost:2026/api/langgraph # LangGraph API ``` See [`skills/public/claude-to-deerflow/SKILL.md`](skills/public/claude-to-deerflow/SKILL.md) for the full API reference. ### Sub-Agents Complex tasks rarely fit in a single pass. DeerFlow decomposes them. The lead agent can spawn sub-agents on the fly β€” each with its own scoped context, tools, and termination conditions. Sub-agents run in parallel when possible, report back structured results, and the lead agent synthesizes everything into a coherent output. When token usage tracking is enabled, completed sub-agent usage is attributed back to the dispatching step. This is how DeerFlow handles tasks that take minutes to hours: a research task might fan out into a dozen sub-agents, each exploring a different angle, then converge into a single report β€” or a website β€” or a slide deck with generated visuals. One harness, many hands. ### Sandbox & File System DeerFlow doesn't just *talk* about doing things. It has its own computer. Each task gets its own execution environment with a full filesystem view β€” skills, workspace, uploads, outputs. The agent reads, writes, and edits files. It can view images and, when configured safely, execute shell commands. With `AioSandboxProvider`, shell execution runs inside isolated containers. With `LocalSandboxProvider`, file tools still map to per-thread directories on the host, but host `bash` is disabled by default because it is not a secure isolation boundary. Re-enable host bash only for fully trusted local workflows. This is the difference between a chatbot with tool access and an agent with an actual execution environment. ``` # Paths inside the sandbox container /mnt/user-data/ β”œβ”€β”€ uploads/ ← your files β”œβ”€β”€ workspace/ ← agents' working directory └── outputs/ ← final deliverables ``` ### Context Engineering **Isolated Sub-Agent Context**: Each sub-agent runs in its own isolated context. This means that the sub-agent will not be able to see the context of the main agent or other sub-agents. This is important to ensure that the sub-agent is able to focus on the task at hand and not be distracted by the context of the main agent or other sub-agents. **Summarization**: Within a session, DeerFlow manages context aggressively β€” summarizing completed sub-tasks, offloading intermediate results to the filesystem, compressing what's no longer immediately relevant. This lets it stay sharp across long, multi-step tasks without blowing the context window. **Strict Tool-Call Recovery**: When a provider or middleware interrupts a tool-call loop, DeerFlow now strips provider-level raw tool-call metadata on forced-stop assistant messages and injects placeholder tool results for dangling calls before the next model invocation. This keeps OpenAI-compatible reasoning models that strictly validate `tool_call_id` sequences from failing with malformed history errors. ### Long-Term Memory Most agents forget everything the moment a conversation ends. DeerFlow remembers. Across sessions, DeerFlow builds a persistent memory of your profile, preferences, and accumulated knowledge. The more you use it, the better it knows you β€” your writing style, your technical stack, your recurring workflows. Memory is stored locally and stays under your control. Memory updates now skip duplicate fact entries at apply time, so repeated preferences and context do not accumulate endlessly across sessions. ## Recommended Models DeerFlow is model-agnostic β€” it works with any LLM that implements the OpenAI-compatible API. That said, it performs best with models that support: - **Long context windows** (100k+ tokens) for deep research and multi-step tasks - **Reasoning capabilities** for adaptive planning and complex decomposition - **Multimodal inputs** for image understanding and video comprehension - **Strong tool-use** for reliable function calling and structured outputs ## Embedded Python Client DeerFlow can be used as an embedded Python library without running the full HTTP services. The `DeerFlowClient` provides direct in-process access to all agent and Gateway capabilities, returning the same response schemas as the HTTP Gateway API. The HTTP Gateway also exposes `DELETE /api/threads/{thread_id}` to remove DeerFlow-managed local thread data after the LangGraph thread itself has been deleted: ```python from deerflow.client import DeerFlowClient client = DeerFlowClient() # Chat response = client.chat("Analyze this paper for me", thread_id="my-thread") # Streaming (LangGraph SSE protocol: values, messages-tuple, end) for event in client.stream("hello"): if event.type == "messages-tuple" and event.data.get("type") == "ai": print(event.data["content"]) # Configuration & management β€” returns Gateway-aligned dicts models = client.list_models() # {"models": [...]} skills = client.list_skills() # {"skills": [...]} client.update_skill("web-search", enabled=True) client.upload_files("thread-1", ["./report.pdf"]) # {"success": True, "files": [...]} ``` All dict-returning methods are validated against Gateway Pydantic response models in CI (`TestGatewayConformance`), ensuring the embedded client stays in sync with the HTTP API schemas. See `backend/packages/harness/deerflow/client.py` for full API documentation. ## Documentation - [Contributing Guide](CONTRIBUTING.md) - Development environment setup and workflow - [Configuration Guide](backend/docs/CONFIGURATION.md) - Setup and configuration instructions - [Architecture Overview](backend/CLAUDE.md) - Technical architecture details - [Backend Architecture](backend/README.md) - Backend architecture and API reference ## ⚠️ Security Notice ### Improper Deployment May Introduce Security Risks DeerFlow has key high-privilege capabilities including **system command execution, resource operations, and business logic invocation**, and is designed by default to be **deployed in a local trusted environment (accessible only via the 127.0.0.1 loopback interface)**. If you deploy the agent in untrusted environments β€” such as LAN networks, public cloud servers, or other multi-endpoint accessible environments β€” without strict security measures, it may introduce security risks, including: - **Unauthorized illegal invocation**: Agent functionality could be discovered by unauthorized third parties or malicious internet scanners, triggering bulk unauthorized requests that execute high-risk operations such as system commands and file read/write, potentially causing serious security consequences. - **Compliance and legal risks**: If the agent is illegally invoked to conduct cyberattacks, data theft, or other illegal activities, it may result in legal liability and compliance risks. ### Security Recommendations **Note: We strongly recommend deploying DeerFlow in a local trusted network environment.** If you need cross-device or cross-network deployment, you must implement strict security measures, such as: - **IP allowlist**: Use `iptables`, or deploy hardware firewalls / switches with Access Control Lists (ACL), to **configure IP allowlist rules** and deny access from all other IP addresses. - **Authentication gateway**: Configure a reverse proxy (e.g., nginx) and **enable strong pre-authentication**, blocking any unauthenticated access. - **Network isolation**: Where possible, place the agent and trusted devices in the **same dedicated VLAN**, isolated from other network devices. - **Stay updated**: Continue to follow DeerFlow's security feature updates. ## Contributing We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, workflow, and guidelines. Regression coverage includes Docker sandbox mode detection and provisioner kubeconfig-path handling tests in `backend/tests/`. Backend blocking-IO diagnostics are available from the repository root with `make detect-blocking-io`: it statically scans backend business code for blocking IO that may run on the backend event loop, prints a concise summary, and writes complete JSON findings to `.deer-flow/blocking-io-findings.json`. The JSON includes compact review records with `priority`, `location`, `blocking_call`, `event_loop_exposure`, `reason`, and `code`. Gateway artifact serving now forces active web content types (`text/html`, `application/xhtml+xml`, `image/svg+xml`) to download as attachments instead of inline rendering, reducing XSS risk for generated artifacts. ## License This project is open source and available under the [MIT License](./LICENSE). ## Acknowledgments DeerFlow is built upon the incredible work of the open-source community. We are deeply grateful to all the projects and contributors whose efforts have made DeerFlow possible. Truly, we stand on the shoulders of giants. We would like to extend our sincere appreciation to the following projects for their invaluable contributions: - **[LangChain](https://github.com/langchain-ai/langchain)**: Their exceptional framework powers our LLM interactions and chains, enabling seamless integration and functionality. - **[LangGraph](https://github.com/langchain-ai/langgraph)**: Their innovative approach to multi-agent orchestration has been instrumental in enabling DeerFlow's sophisticated workflows. These projects exemplify the transformative power of open-source collaboration, and we are proud to build upon their foundations. ### Key Contributors A heartfelt thank you goes out to the core authors of `DeerFlow`, whose vision, passion, and dedication have brought this project to life: - **[Daniel Walnut](https://github.com/hetaoBackend/)** - **[Henry Li](https://github.com/magiccube/)** Your unwavering commitment and expertise have been the driving force behind DeerFlow's success. We are honored to have you at the helm of this journey. ## Star History [![Star History Chart](https://api.star-history.com/svg?repos=bytedance/deer-flow&type=Date)](https://star-history.com/#bytedance/deer-flow&Date)

AI Agents
70.8K Github Stars
trae-agent
Open Source

trae-agent

# Trae Agent [![arXiv:2507.23370](https://img.shields.io/badge/TechReport-arXiv%3A2507.23370-b31a1b)](https://arxiv.org/abs/2507.23370) [![Python 3.12+](https://img.shields.io/badge/python-3.12+-blue.svg)](https://www.python.org/downloads/) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Pre-commit](https://github.com/bytedance/trae-agent/actions/workflows/pre-commit.yml/badge.svg)](https://github.com/bytedance/trae-agent/actions/workflows/pre-commit.yml) [![Unit Tests](https://github.com/bytedance/trae-agent/actions/workflows/unit-test.yml/badge.svg)](https://github.com/bytedance/trae-agent/actions/workflows/unit-test.yml) [![Discord](https://img.shields.io/discord/1320998163615846420?label=Join%20Discord&color=7289DA)](https://discord.gg/VwaQ4ZBHvC) **Trae Agent** is an LLM-based agent for general purpose software engineering tasks. It provides a powerful CLI interface that can understand natural language instructions and execute complex software engineering workflows using various tools and LLM providers. For technical details please refer to [our technical report](https://arxiv.org/abs/2507.23370). **Project Status:** The project is still being actively developed. Please refer to [docs/roadmap.md](docs/roadmap.md) and [CONTRIBUTING](CONTRIBUTING.md) if you are willing to help us improve Trae Agent. **Difference with Other CLI Agents:** Trae Agent offers a transparent, modular architecture that researchers and developers can easily modify, extend, and analyze, making it an ideal platform for **studying AI agent architectures, conducting ablation studies, and developing novel agent capabilities**. This **_research-friendly design_** enables the academic and open-source communities to contribute to and build upon the foundational agent framework, fostering innovation in the rapidly evolving field of AI agents. ## ✨ Features - 🌊 **Lakeview**: Provides short and concise summarisation for agent steps - πŸ€– **Multi-LLM Support**: Works with OpenAI, Anthropic, Doubao, Azure, OpenRouter, Ollama and Google Gemini APIs - πŸ› οΈ **Rich Tool Ecosystem**: File editing, bash execution, sequential thinking, and more - 🎯 **Interactive Mode**: Conversational interface for iterative development - πŸ“Š **Trajectory Recording**: Detailed logging of all agent actions for debugging and analysis - βš™οΈ **Flexible Configuration**: YAML-based configuration with environment variable support - πŸš€ **Easy Installation**: Simple pip-based installation ## πŸš€ Installation ### Requirements - UV (https://docs.astral.sh/uv/) - API key for your chosen provider (OpenAI, Anthropic, Google Gemini, OpenRouter, etc.) ### Setup ```bash git clone https://github.com/bytedance/trae-agent.git cd trae-agent uv sync --all-extras source .venv/bin/activate ``` ## βš™οΈ Configuration ### YAML Configuration (Recommended) 1. Copy the example configuration file: ```bash cp trae_config.yaml.example trae_config.yaml ``` 2. Edit `trae_config.yaml` with your API credentials and preferences: ```yaml agents: trae_agent: enable_lakeview: true model: trae_agent_model # the model configuration name for Trae Agent max_steps: 200 # max number of agent steps tools: # tools used with Trae Agent - bash - str_replace_based_edit_tool - sequentialthinking - task_done model_providers: # model providers configuration anthropic: api_key: your_anthropic_api_key provider: anthropic openai: api_key: your_openai_api_key provider: openai models: trae_agent_model: model_provider: anthropic model: claude-sonnet-4-20250514 max_tokens: 4096 temperature: 0.5 ``` **Note:** The `trae_config.yaml` file is ignored by git to protect your API keys. ### Using Base URL In some cases, we need to use a custom URL for the api. Just add the `base_url` field after `provider`, take the following config as an example: ``` openai: api_key: your_openrouter_api_key provider: openai base_url: https://openrouter.ai/api/v1 ``` **Note:** For field formatting, use spaces only. Tabs (\t) are not allowed. ### Environment Variables (Alternative) You can also configure API keys using environment variables and store them in the .env file: ```bash export OPENAI_API_KEY="your-openai-api-key" export OPENAI_BASE_URL="your-openai-base-url" export ANTHROPIC_API_KEY="your-anthropic-api-key" export ANTHROPIC_BASE_URL="your-anthropic-base-url" export GOOGLE_API_KEY="your-google-api-key" export GOOGLE_BASE_URL="your-google-base-url" export OPENROUTER_API_KEY="your-openrouter-api-key" export OPENROUTER_BASE_URL="https://openrouter.ai/api/v1" export DOUBAO_API_KEY="your-doubao-api-key" export DOUBAO_BASE_URL="https://ark.cn-beijing.volces.com/api/v3/" ``` ### MCP Services (Optional) To enable Model Context Protocol (MCP) services, add an `mcp_servers` section to your configuration: ```yaml mcp_servers: playwright: command: npx args: - "@playwright/[email protected]" ``` **Configuration Priority:** Command-line arguments > Configuration file > Environment variables > Default values **Legacy JSON Configuration:** If using the older JSON format, see [docs/legacy_config.md](docs/legacy_config.md). We recommend migrating to YAML. ## πŸ“– Usage ### Basic Commands ```bash # Simple task execution trae-cli run "Create a hello world Python script" # Check configuration trae-cli show-config # Interactive mode trae-cli interactive ``` ### Provider-Specific Examples ```bash # OpenAI trae-cli run "Fix the bug in main.py" --provider openai --model gpt-4o # Anthropic trae-cli run "Add unit tests" --provider anthropic --model claude-sonnet-4-20250514 # Google Gemini trae-cli run "Optimize this algorithm" --provider google --model gemini-2.5-flash # OpenRouter (access to multiple providers) trae-cli run "Review this code" --provider openrouter --model "anthropic/claude-3-5-sonnet" trae-cli run "Generate documentation" --provider openrouter --model "openai/gpt-4o" # Doubao trae-cli run "Refactor the database module" --provider doubao --model doubao-seed-1.6 # Ollama (local models) trae-cli run "Comment this code" --provider ollama --model qwen3 ``` ### Advanced Options ```bash # Custom working directory trae-cli run "Add tests for utils module" --working-dir /path/to/project # Save execution trajectory trae-cli run "Debug authentication" --trajectory-file debug_session.json # Force patch generation trae-cli run "Update API endpoints" --must-patch # Interactive mode with custom settings trae-cli interactive --provider openai --model gpt-4o --max-steps 30 ``` ## Docker Mode Commands ### Preparation **Important**: You need to make sure Docker is configured in your environment. ### Usage ```bash # Specify a Docker image to run the task in a new container trae-cli run "Add tests for utils module" --docker-image python:3.11 # Specify a Docker image to run the task in a new container and mount the directory trae-cli run "write a script to print helloworld" --docker-image python:3.12 --working-dir test_workdir/ # Attach to an existing Docker container by ID (`--working-dir` is invalid with `--docker-container-id`) trae-cli run "Update API endpoints" --docker-container-id 91998a56056c # Specify an absolute path to a Dockerfile to build an environment trae-cli run "Debug authentication" --dockerfile-path test_workspace/Dockerfile # Specify a path to a local Docker image file (tar archive) to load trae-cli run "Fix the bug in main.py" --docker-image-file test_workspace/trae_agent_custom.tar # Remove the Docker container after finishing the task (keep default) trae-cli run "Add tests for utils module" --docker-image python:3.11 --docker-keep false ``` ### Interactive Mode Commands In interactive mode, you can use: - Type any task description to execute it - `status` - Show agent information - `help` - Show available commands - `clear` - Clear the screen - `exit` or `quit` - End the session ## πŸ› οΈ Advanced Features ### Available Tools Trae Agent provides a comprehensive toolkit for software engineering tasks including file editing, bash execution, structured thinking, and task completion. For detailed information about all available tools and their capabilities, see [docs/tools.md](docs/tools.md). ### Trajectory Recording Trae Agent automatically records detailed execution trajectories for debugging and analysis: ```bash # Auto-generated trajectory file trae-cli run "Debug the authentication module" # Saves to: trajectories/trajectory_YYYYMMDD_HHMMSS.json # Custom trajectory file trae-cli run "Optimize database queries" --trajectory-file optimization_debug.json ``` Trajectory files contain LLM interactions, agent steps, tool usage, and execution metadata. For more details, see [docs/TRAJECTORY_RECORDING.md](docs/TRAJECTORY_RECORDING.md). ## πŸ”§ Development ### Contributing For contribution guidelines, please refer to [CONTRIBUTING.md](CONTRIBUTING.md). ### Troubleshooting **Import Errors:** ```bash PYTHONPATH=. trae-cli run "your task" ``` **API Key Issues:** ```bash # Verify API keys echo $OPENAI_API_KEY trae-cli show-config ``` **Command Not Found:** ```bash uv run trae-cli run "your task" ``` **Permission Errors:** ```bash chmod +x /path/to/your/project ``` ## πŸ“„ License This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. ## ✍️ Citation ```bibtex @article{traeresearchteam2025traeagent, title={Trae Agent: An LLM-based Agent for Software Engineering with Test-time Scaling}, author={Trae Research Team and Pengfei Gao and Zhao Tian and Xiangxin Meng and Xinchen Wang and Ruida Hu and Yuanan Xiao and Yizhou Liu and Zhao Zhang and Junjie Chen and Cuiyun Gao and Yun Lin and Yingfei Xiong and Chao Peng and Xia Liu}, year={2025}, eprint={2507.23370}, archivePrefix={arXiv}, primaryClass={cs.SE}, url={https://arxiv.org/abs/2507.23370}, } ``` ## πŸ™ Acknowledgments We thank Anthropic for building the [anthropic-quickstart](https://github.com/anthropics/anthropic-quickstarts) project that served as a valuable reference for the tool ecosystem.

Developer Tools AI Agents
11.6K Github Stars
Sa2VA
Open Source

Sa2VA

# Pixel LLMs: Pixel-Level Grounded Understanding for Multimodal LLMs **Pixel LLMs** is a family of projects that bring pixel-level, dense grounded understanding to multimodal LLMs. It is anchored by **Sa2VA** β€” a unified model that marries SAM-2 with LLaVA for dense grounded understanding of images and videos β€” together with a growing set of research projects built on top of it. ![Teaser](assets/images/teaser.jpg) ## Projects ### 🧠 [Sa2VA](./projects/sa2va/README.md) β€” Marrying SAM2 with LLaVA *Haobo Yuan, Xiangtai Li, Tao Zhang, Yueyi Sun, Zilong Huang, Shilin Xu, Shunping Ji, Yunhai Tong, Lu Qi, Jiashi Feng, Ming-Hsuan Yang* The core unified model: SAM-2 + MLLM for referring segmentation, grounded conversation, visual prompting, and image/video chat. Supports InternVL2.5/3 and Qwen2.5-VL/Qwen3-VL backbones. πŸ“‚ [`projects/sa2va`](./projects/sa2va/README.md) Β· [πŸ“œ arXiv](https://arxiv.org/abs/2501.04001) Β· [🏠 Page](https://lxtgh.github.io/project/sa2va) Β· [πŸ€— Models](https://huggingface.co/collections/ByteDance/sa2va-model-zoo-677e3084d71b5f108d00e093) ### πŸ” [VRT](./projects/vrt_sa2va/README.md) β€” Visual Reasoning Tracer *Haobo Yuan, Yueyi Sun, Yanwei Li, Tao Zhang, Xueqing Deng, Henghui Ding, Lu Qi, Anran Wang, Xiangtai Li, Ming-Hsuan Yang* Object-level grounded reasoning built on Sa2VA. Ships **VRT-Bench** (evaluation) and **VRT-80k** (training data). πŸ“‚ [`projects/vrt_sa2va`](./projects/vrt_sa2va/README.md) Β· [πŸ“œ arXiv](https://arxiv.org/pdf/2512.05091) Β· [🏠 Page](https://harboryuan.github.io/visual-reasoning-tracer/) Β· [πŸ€— Data](https://huggingface.co/datasets/HarborYuan/VRT-Eval) ### 🧩 [SAMTok](./projects/samtok/README.md) β€” Representing Any Mask with Two Words (CVPR 2026) *Yikang Zhou, Tao Zhang, Dengxian Gong, Yuanzheng Wu, Ye Tian, Haochen Wang, Haobo Yuan, Jiacong Wang, Lu Qi, Hao Fei, Anran Wang, Zhuochen Wang, Yujing Wang, Cheng Chen, Shunping Ji, Xiangtai Li* A unified mask-token interface that lets any MLLM generate and understand masks. πŸ“‚ [`projects/samtok`](./projects/samtok/README.md) Β· [πŸ“œ arXiv](https://arxiv.org/abs/2601.16093) Β· [🏠 Page](https://zhouyiks.github.io/projects/SAMTok/) Β· [πŸ€— Models](https://huggingface.co/collections/zhouyik/samtok) ### Extensions - **[SaSaSa2VA](./projects/sasasa2va/README.md)** β€” a segmentation-augmented extension of Sa2VA that won **1st place** in the ICCV 2025 LSVOS Challenge RVOS Track πŸ…. - **[Pixel-SAIL](./projects/pixel_sail/README.md)** β€” single-transformer pixel-level grounding. ## Environment We manage dependencies with [`uv`](https://docs.astral.sh/uv/). Install it once: ```bash curl -LsSf https://astral.sh/uv/install.sh | sh ``` The environment is defined under [`projects/sa2va`](./projects/sa2va) (`pyproject.toml` + `uv.lock`) and shared across the projects. The quickest way to set it up β€” with the virtualenv placed in `/tmp` and symlinked back into the project β€” is the helper script at the repo root: ```bash bash setup_env.sh # projects/sa2va, --extra=latest # bash setup_env.sh sa2va legacy # InternVL2.5 or earlier ``` Or do it manually: ```bash cd projects/sa2va uv sync --extra=latest # or --extra=legacy ``` Then run training / evaluation from the repository root with the environment activated (`source projects/sa2va/.venv/bin/activate`). See each project's README for project-specific steps. For tokens / API keys (HuggingFace, OpenRouter), copy the template and fill it in β€” `setup_env.sh` loads it automatically: ```bash cp .env.example .env # then edit .env ``` Why `uv`? It treats the environment as code: dependencies are declared in `pyproject.toml` and every transitive package is version-locked in `uv.lock`. The result is a single source of truth that is fully reproducible across machines, trivial to maintain, and recreated exactly with one `uv sync` β€” no manual `pip install` drift. ## Citation If you find this repository useful, please consider citing the relevant papers: ```bibtex @article{sa2va, title={Sa2VA: Marrying SAM2 with LLaVA for Dense Grounded Understanding of Images and Videos}, author={Yuan, Haobo and Li, Xiangtai and Zhang, Tao and Sun, Yueyi and Huang, Zilong and Xu, Shilin and Ji, Shunping and Tong, Yunhai and Qi, Lu and Feng, Jiashi and Yang, Ming-Hsuan}, journal={arXiv pre-print}, year={2025} } @article{yuan2025vrt, title={Visual Reasoning Tracer: Object-Level Grounded Reasoning Benchmark}, author={Yuan, Haobo and Sun, Yueyi and Li, Yanwei and Zhang, Tao and Deng, Xueqing and Ding, Henghui and Qi, Lu and Wang, Anran and Li, Xiangtai and Yang, Ming-Hsuan}, journal={arXiv pre-print}, year={2025} } @inproceedings{zhou2026samtok, title={SAMTok: Representing Any Mask with Two Words}, author={Zhou, Yikang and Zhang, Tao and Gong, Dengxian and Wu, Yuanzheng and Tian, Ye and Wang, Haochen and Yuan, Haobo and Wang, Jiacong and Qi, Lu and Fei, Hao and Wang, Anran and Wang, Zhuochen and Wang, Yujing and Chen, Cheng and Ji, Shunping and Li, Xiangtai}, booktitle={CVPR}, address={Denver, CO, USA}, year={2026} } ```

LLM Tools & Chat UIs ML Frameworks
1.6K Github Stars
flowgram.ai
Open Source

flowgram.ai

![Image](https://github.com/user-attachments/assets/4f9dfa0e-e600-4d4e-9e73-c919184f7573) <div align="center"> [![License](https://img.shields.io/github/license/bytedance/flowgram.ai)](https://github.com/bytedance/flowgram.ai/blob/main/LICENSE) [![@flowgram.ai/editor](https://img.shields.io/npm/dm/%40flowgram.ai%2Fcore)](https://www.npmjs.com/package/@flowgram.ai/editor) [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/bytedance/flowgram.ai) [![juejin](https://img.shields.io/badge/juejin-FFFFFF?logo=juejin&logoColor=%23007FFF)](https://juejin.cn/column/7479814468601315362) [![](https://trendshift.io/api/badge/repositories/13877)](https://trendshift.io/repositories/13877) </div> # FlowGram|Workflow development framework [English](README.md) | [δΈ­ζ–‡](README_ZH.md) | [EspaΓ±ol](README_ES.md) | [Русский](README_RU.md) | [PortuguΓͺs](README_PT.md) | [Deutsch](README_DE.md) | [ζ—₯本θͺž](README_JA.md) FlowGram is a composable, visual, easy-to-integrate, and extensible workflow development framework & toolkit. Our goal is to help developers build AI workflow platforms **faster** and **simpler**. FlowGram comes with a suite of built-in tools for workflow development: flow canvas, node configuration form, variable scope chain, and ready-to-use materials (LLM, Condition, Code Editor etc). It’s not a ready-made workflow platform; it’s the framework and toolkit to build yours. Learn more at [FlowGram.AI 🌐](https://flowgram.ai) ## 🎬 Demo <https://github.com/user-attachments/assets/fee87890-ceec-4c07-b659-08afc4dedc26> Open in [CodeSandbox 🌐](https://codesandbox.io/p/github/louisyoungx/flowgram-demo/main) or [StackBlitz 🌐](https://stackblitz.com/~/github.com/louisyoungx/flowgram-demo) In this demo, we iterate through a list of cities, fetch real-time weather via HTTP, parse temperatures with a Code node, generate outfit suggestions with an LLM, gate by a Condition, aggregate results across the loop, and finally use an Advisor LLM to pick the most comfortable city before sending the result to the End node. ## πŸš€ Quick Start 1. Create a new FlowGram project: ```sh npx @flowgram.ai/create-app@latest ``` > We recommend choosing the `Free Layout Demo ⭐️` template. 2. Start the project: ```sh cd demo-free-layout npm install npm start ``` 3. Open [http://localhost:3000](http://localhost:3000) in your browser. ## ✨ Features | Feature | Description | Demo | | -------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | | [Free Layout Canvas](https://flowgram.ai/examples/free-layout/free-feature-overview.html) | Free layout canvas where nodes can be placed anywhere and connected using free-form lines. | ![Free Layout Demo](./apps/docs/src/public/free-layout/free-layout-demo.gif) | | [Fixed Layout Canvas](https://flowgram.ai/examples/fixed-layout/fixed-feature-overview.html) | Fixed layout canvas where nodes can be dragged to specified positions, with support for compound nodes like branches and loops. | ![Fixed Layout Demo](./apps/docs/src/public/fixed-layout/fixed-layout-demo.gif) | | [Form](https://flowgram.ai/examples/node-form/basic.html) | The form engine manages the CRUD operations of node data and provides rendering, validation, side effects, linkage, and error-capturing capabilities, simplifying the development of node configurations. | ![Form](https://github.com/user-attachments/assets/13e9b4cd-e993-4d21-901c-fb6cf106de78) | | [Variable](https://flowgram.ai/guide/variable/basic.html) | The variable engine supports scope constraints, variable structure inspection, and type inference, making it easy to manage data flow within the workflow. | ![Variable](https://github.com/user-attachments/assets/442006db-25e3-4fb5-972c-7a0545638ff5) | ## πŸ“– Documentation You can find the FlowGram documentation [on the website](https://flowgram.ai). The documentation is divided into several sections: - [Quick Start](https://flowgram.ai/guide/getting-started/introduction.html) - [Canvas](https://flowgram.ai/guide/free-layout/load.html) - [Form](https://flowgram.ai/guide/form/form.html) - [Variable](https://flowgram.ai/guide/variable/basic.html) - [Material](https://flowgram.ai/materials/introduction.html) - [Runtime](https://flowgram.ai/guide/runtime/introduction.html) - [Advanced Guides](https://flowgram.ai/guide/advanced/zoom-scroll.html) - [API Reference](https://flowgram.ai/api/index.html) - [Where to get Support](https://flowgram.ai/guide/contact-us.html) - [Contributing Guide](https://flowgram.ai/guide/contributing.html) ## πŸ™Œ Contributors [![FlowGram.AI Contributors](https://contrib.rocks/image?repo=bytedance/flowgram.ai)](https://github.com/bytedance/flowgram.ai/graphs/contributors) ## 🌍 Adoption - [Coze Studio](https://github.com/coze-dev/coze-studio) is an all-in-one AI agent development tool. Providing the latest large models and tools, various development modes and frameworks, Coze Studio offers the most convenient AI agent development environment, from development to deployment. - [NNDeploy](https://github.com/NNDeploy/nndeploy) is a workflow-based multi-platform ai deployment tool. - [Certimate](https://github.com/certimate-go/certimate) is an open-source SSL certificate management tool that helps you automatically apply for and deploy SSL certificates with a visual workflow. It is one of the ACME client options listed in the official documentation of Let's Encrypt. ## πŸ“¬ Contact us - Issues: [Issues](https://github.com/bytedance/flowgram.ai/issues) - Lark: Scan the QR code below with [Register Feishu](https://www.feishu.cn/en/) to join our FlowGram user group. <img src="./apps/docs/src/public/lark-group.png" width="200"/>

Workflow Automation Low-Code & No-Code Dev
8.1K Github Stars