| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Code samples for building and deploying AI agents on BytePlus AgentKit — ByteDance's international cloud platform for running agent workloads (the global counterpart of Volcengine).
BytePlus is the international brand of Volcengine. The same underlying AgentKit platform ships under both names with different API endpoints, model gateways, regions, and SDK packages. This repo targets the BytePlus (international) side.
These samples are adapted from the official bytedance/agentkit-samples repository and reworked so they run end-to-end on BytePlus rather than Volcengine. The originals were written for the in-China (Volcengine) stack and were mostly in Chinese. Every sample here has been:
Python 3.10+
uv — used for virtualenvs and dependency sync across all samples
A BytePlus account with access to ModelArk, TOS, and AgentKit
The AgentKit CLI (agentkit / ak):
pip install 'agentkit-sdk-python>=0.5.3'Configure your BytePlus deploy credentials once (the CLI stores them globally; the runtime itself uses an IAM role, not your AK/SK):
agentkit config --global --set byteplus.access_key=<your_byteplus_ak>
agentkit config --global --set byteplus.secret_key=<your_byteplus_sk>Each folder is an independent, self-contained agent project. Pick one, configure it, run it locally, then deploy.
| Folder | What it demonstrates | Framework |
|---|---|---|
| multi_agents/ | Multi-agent orchestration patterns — a customer-service agent composed of SequentialAgent, ParallelAgent, and LoopAgent sub-agents. | VeADK |
| sandbox_tool_sample/ | Using VeADK's built-in run_code sandbox tool — a Python coding agent that executes code in an isolated environment. | VeADK |
| migrate-from-adk/ | Migrating a Google ADK sample (image scoring) to VeADK + AgentKit with minimal changes. See its README for the diff walkthrough. | VeADK |
| langchain_agent_deploy_sample/ | Deploying a LangChain agent (not VeADK) onto AgentKit using AgentkitSimpleApp. Shows AgentKit is framework-agnostic. | LangChain |
| use-cases/ad_video_gen_seq/ | A sequential 7-agent pipeline that turns a product brief into a finished e-commerce marketing video (market → storyboard → image → image eval → video → video eval → release). Uses Seedream (image) + Seedance (video). | VeADK |
| use-cases/codex_sandbox_agent/ | One-shot code factory: a dispatcher agent drives the codex runtime inside an AgentKit CodeEnv sandbox (write -> test -> repair loop), runs locally or deployed to AgentKit Runtime with TOS presigned-link delivery of the finished project. | VeADK |
| use-cases/gateway_shopizer/ | A legacy Shopizer (Java) e-commerce app behind an AgentKit MCP toolset + Model Gateway, so agents can query and operate the existing API. | VeADK |
| use-cases/rag_with_vikingdb/ | RAG support agent backed by a VikingDB knowledge base, with long-term memory (VikingMem) and an optional MCP toolset. | VeADK |
| use-cases/simple_image_video_gen/ | Minimal agent that generates images and turns them into a video — the smallest possible multimedia starting point. | VeADK |
| use-cases/tiktok_ref_video_gen/ | "Director" agent that downloads a TikTok reference video, analyzes the product, and generates a new product video matching the reference style. | VeADK |
| use-cases/video_gen/ | YAML-driven (AgentBuilder) story-to-video generation with MCP-based video stitching. | VeADK |
Framework note: VeADK (Volcano Engine Agent Development Kit) is a Google-ADK-compatible agent framework. The BytePlus runtime accepts VeADK agents directly. LangChain and other frameworks are supported through the AgentkitSimpleApp entrypoint.
Every sample follows the same layout, so once you've run one the rest are familiar:
Most samples read the same core env vars. Set them in .env (local) or as runtime envs (cloud):
| Variable | Purpose |
|---|---|
| MODEL_AGENT_API_KEY | ModelArk API key for the reasoning/agent model |
| MODEL_AGENT_API_BASE | ModelArk gateway, e.g. https://ark.ap-southeast.bytepluses.com/api/v3/ |
| MODEL_AGENT_NAME | ModelArk model ID, e.g. deepseek-v3-2-251201 |
| MODEL_IMAGE_API_KEY / MODEL_VIDEO_API_KEY | Keys for the image (Seedream) and video (Seedance) models, when used |
| TOS_ENDPOINT / DATABASE_TOS_BUCKET | BytePlus TOS endpoint and bucket for uploads |
| BYTEPLUS_ACCESS_KEY / BYTEPLUS_SECRET_KEY | BytePlus account credentials (local dev / Viking SDK) |
| BYTEPLUS_REGION | BytePlus region, e.g. ap-southeast-1 |
Each sample's README lists its exact variable set.
Pick a sample — sandbox_tool_sample is the simplest — then:
cd sandbox_tool_sample
# 1. Create a virtualenv and install deps
uv venv --python 3.12
source .venv/bin/activate
uv sync # or: uv pip install -r requirements.txt
# 2. Configure secrets
cp config.yaml.example config.yaml # edit model id, api key, etc. (if the sample ships one)
# and/or create a .env with your ModelArk keys + BytePlus credentials
# 3. Run locally
uv run agent.py # serves on http://0.0.0.0:8000Test the running agent with the AgentKit CLI:
agentkit invoke '{"prompt": "Write a one-line Monte Carlo estimate of pi."}'The agentkit CLI (v0.5.3+) is fully YAML-driven: the .agentkit/agentkit.yaml file is the source of truth for a deployment — region, runtime sizing, environment variables, container registry, TOS, and optional frontend/auth/IM blocks. agentkit deploy reads everything from it; no flags are required.
From inside the sample folder:
# Scaffold the deploy manifest (run once)
agentkit deploy --provider byteplus --region ap-southeast-1 --name <lowercase-app-name>
# Edit .agentkit/agentkit.yaml:
# - set repo_name to a lowercase CR name
# - fill in the envs: block with ${VAR} references resolved from your .env
# (MODEL_AGENT_API_KEY, MODEL_IMAGE_API_KEY, etc.)
# Deploy
agentkit deployKey points specific to BytePlus:
The scaffolded agentkit.yaml is heavily commented and covers runtime, envs:, infrastructure, and optional frontend/auth/IM blocks — keep it as a reference once generated (it is gitignored by default because it references secrets via ${VAR}).
.
├── multi_agents/ # multi-agent orchestration (seq/parallel/loop)
├── sandbox_tool_sample/ # run_code sandbox tool
├── migrate-from-adk/ # Google ADK → VeADK migration (image scoring)
├── langchain_agent_deploy_sample/ # LangChain agent on AgentKit
├── use-cases/
│ ├── ad_video_gen_seq/ # sequential marketing-video pipeline
│ ├── rag_with_vikingdb/ # RAG + long-term memory + MCP
│ ├── simple_image_video_gen/ # minimal image→video agent
│ ├── tiktok_ref_video_gen/ # reference-style product video director
│ └── video_gen/ # YAML-driven story-to-video
└── .gitignore # ignores .env, config.yaml, .agentkit/, .tmp/, etc.
If you are porting another sample from bytedance/agentkit-samples to BytePlus, the changes typically required are:
Each sample retains its original Apache 2.0 license header. See the LICENSE headers in individual files. This repository is provided as-is for reference and is intended to be shared with colleagues and customers.
| Back | FazBrowse Home | New Git URL |