{"repo": "bytedance/agentkit-samples", "files": {"skills/byted-bytehouse-ai-query/scripts/text2sql.py": {"2d1e93eefae99c608ceb85fad10b236915c84ba4": {"t": 1785674283.0853732, "n": 6846, "h": "7e657300b9705f9d", "c": "#!/usr/bin/env python3\n# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\"\"\"\nByteHouse Text2SQL API 客户端\n用于调用 ByteHouse 的 text2sql 接口,将自然语言转换为 SQL 查询,并判断 SQL 是否为 DQL\n\n配置方式:设置以下环境变量\n- BYTEHOUSE_HOST: ByteHouse 主机地址,同时也作为 API URL 的主机部分\n- BYTEHOUSE_PASSWORD: 密码 (同时也用作API的 Bearer token)\n\n或通过 --config 参数传入自定义配置:\n- reasoningModel: 自定义模型ID\n- reasoningAPIKey: 自定义 API Key\n- url: 自定义 API URL\n\"\"\"\n\nimport os\nimport requests\nimport json\nimport re\nimport sys\nimport argparse\n\n# 从环境变量读取默认配置\nBYTEHOUSE_HOST = os.environ.get('BYTEHOUSE_HOST', '')\nBYTEHOUSE_PASSWORD = os.environ.get('BYTEHOUSE_PASSWORD', '')\n\n\ndef build_text2sql_url(host: str) -> str:\n \"\"\"构建 Text2SQL API URL\"\"\"\n if not host:\n print(\"Error: BYTEHOUSE_HOST environment variable is required\", file=sys.stderr)\n sys.exit(1)\n \n # 处理 host - 可能是 host:port 格式\n if host.startswith('http'):\n base_url = host.rstrip('/')\n else:\n base_url = f\"https://{host}\"\n \n return f\"{base_url}/matrix/v1/conversation\"\n\n\ndef call_text2sql(\n natural_language: str, \n tables: list, \n system_hints: str = \"TEXT2SQL\",\n config: dict = None\n) -> str:\n \"\"\"\n 调用 ByteHouse Text2SQL 接口,将自然语言转换为 SQL\n \n Args:\n natural_language: 自然语言描述的查询需求\n tables: 要查询的表名列表,如 [\"bytehouse.query_history\"]\n system_hints: 系统提示词,默认为 \"TEXT2SQL\"\n config: 可选的配置 dict,支持:\n - reasoningModel: 自定义模型ID\n - reasoningAPIKey: 自定义 API Key\n - url: 自定义 API URL\n \n Returns:\n 转换后的 SQL 语句\n \"\"\"\n # 决定使用哪个配置:用户提供的 config > 环境变量\n if config:\n # 使用用户提供的自定义配置\n base_url = config.get('url', '')\n auth_token = config.get('reasoningAPIKey', '')\n reasoning_model = config.get('reasoningModel', '')\n \n if not base_url:\n print(\"Error: config.url is required when using custom config\", file=sys.stderr)\n sys.exit(1)\n \n # 用户提供的 URL 可能已经包含完整路径,直接使用\n # 如果 URL 已经包含任何 path(如 /api/v3),则不再追加\n if '/' in base_url.split('://')[-1]:\n url = base_url.rstrip('/')\n else:\n url = f\"{base_url.rstrip('/')}/matrix/v1/conversation\"\n else:\n # 使用环境变量中的默认配置\n if not BYTEHOUSE_HOST:\n print(\"Error: Please set BYTEHOUSE_HOST environment variable or provide --config\", file=sys.stderr)\n sys.exit(1)\n \n url = build_text2sql_url(BYTEHOUSE_HOST)\n auth_token = BYTEHOUSE_PASSWORD if BYTEHOUSE_PASSWORD else \"\"\n reasoning_model = \"\"\n \n headers = {\n \"Content-Type\": \"application/json\",\n }\n \n # 添加认证\n if auth_token:\n headers[\"Authorization\"] = f\"Bearer {auth_token}\"\n \n # 构建请求 payload\n payload = {\n \"systemHints\": system_hints,\n \"input\": natural_language,\n \"knowledgeBaseIDsString\": [\"*\"],\n \"tables\": tables\n }\n \n # 如果用户指定了 reasoningModel,添加到 payload\n if reasoning_model:\n payload[\"config\"] = {\n \"reasoningModel\": reasoning_model\n }\n \n # 使用流式请求\n response = requests.post(url, headers=headers, json=payload, stream=True, timeout=30)\n if response.status_code != 200:\n print(response.text)\n response.raise_for_status()\n \n # 收集所有内容片段\n full_content = \"\"\n \n for line in response.iter_lines():\n if line:\n line = line.decode('utf-8')\n if line.startswith('data: '):\n data_str = line[6:] # 去掉 'data: ' 前缀\n try:\n data = json.loads(data_str)\n event_type = data.get('event_type')\n \n if event_type == 'DELTA':\n event_data = json.loads(data.get('event_data', '{}'))\n message = event_data.get('message', {})\n content = message.get('content', '')\n full_content += content\n elif event_type == 'DONE':\n break\n except json.JSONDecodeError:\n continue\n \n # 清理和提取 SQL\n sql = extract_sql(full_content)\n return sql\n\n\ndef extract_sql(content: str) -> str:\n \"\"\"\n 从内容中提取 SQL 语句\n 移除 markdown 代码块标记,清理空白字符\n \"\"\"\n if not content:\n return \"\"\n \n # 移除 markdown 代码块标记\n sql = content.strip()\n sql = re.sub(r'^```\\w*\\n', '', sql)\n sql = re.sub(r'\\n```$', '', sql)\n \n # 规范化空白字符\n sql = re.sub(r'\\s+', ' ', sql)\n sql = sql.strip()\n \n return sql\n\ndef main():\n \"\"\"命令行入口\"\"\"\n parser = argparse.ArgumentParser(\n description='ByteHouse Text2SQL - 将自然语言转换为 SQL 查询',\n formatter_class=argparse.RawDescriptionHelpFormatter,\n epilog='''\n示例:\n python3 text2sql.py \"get count of queries\" \"bytehouse.query_history\"\n python3 text2sql.py \"查看最近10条记录\" \"bytehouse.query_history\" --config '{\"reasoningModel\": \"ep-xxx\", \"reasoningAPIKey\": \"xxx\", \"url\": \"https://xxx\"}'\n\n环境变量:\n BYTEHOUSE_HOST - ByteHouse 主机 (如 tenant-xxx-cn-beijing-public.bytehouse.volces.com)\n BYTEHOUSE_PASSWORD - 密码 (作为 Bearer token)\n\n自定义 Config (通过 --config 参数):\n reasoningModel - 自定义模型ID\n reasoningAPIKey - 自定义 API Key\n url - 自定义 API URL\n'''\n )\n \n parser.add_argument('query', help='自然语言查询')\n parser.add_argument('tables', nargs='+', help='要查询的表名列表')\n parser.add_argument('--config', type=str, help='JSON 格式的配置,包含 reasoningModel, reasoningAPIKey, url')\n parser.add_argument('--system-hints', type=str, default='TEXT2SQL', help='系统提示词 (默认: TEXT2SQL)')\n \n args = parser.parse_args()\n \n # 解析 config 参数\n config = None\n if args.config:\n try:\n config = json.loads(args.config)\n except json.JSONDecodeError as e:\n print(f\"Error: Invalid JSON in --config: {e}\", file=sys.stderr)\n sys.exit(1)\n \n # 检查必要配置\n if not config and not BYTEHOUSE_HOST:\n print(\"Error: Please set BYTEHOUSE_HOST environment variable or provide --config\", file=sys.stderr)\n sys.exit(1)\n \n try:\n sql = call_text2sql(args.query, args.tables, args.system_hints, config)\n print(sql)\n except Exception as e:\n print(f\"Error: {e}\", file=sys.stderr)\n sys.exit(1)\n\n\nif __name__ == \"__main__\":\n main()"}, "792a9c9f3f0a7671a200751237aa7e112ac519dc": {"t": 1785846864.4316106, "n": 6846, "h": "7e657300b9705f9d", "c": "#!/usr/bin/env python3\n# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\"\"\"\nByteHouse Text2SQL API 客户端\n用于调用 ByteHouse 的 text2sql 接口,将自然语言转换为 SQL 查询,并判断 SQL 是否为 DQL\n\n配置方式:设置以下环境变量\n- BYTEHOUSE_HOST: ByteHouse 主机地址,同时也作为 API URL 的主机部分\n- BYTEHOUSE_PASSWORD: 密码 (同时也用作API的 Bearer token)\n\n或通过 --config 参数传入自定义配置:\n- reasoningModel: 自定义模型ID\n- reasoningAPIKey: 自定义 API Key\n- url: 自定义 API URL\n\"\"\"\n\nimport os\nimport requests\nimport json\nimport re\nimport sys\nimport argparse\n\n# 从环境变量读取默认配置\nBYTEHOUSE_HOST = os.environ.get('BYTEHOUSE_HOST', '')\nBYTEHOUSE_PASSWORD = os.environ.get('BYTEHOUSE_PASSWORD', '')\n\n\ndef build_text2sql_url(host: str) -> str:\n \"\"\"构建 Text2SQL API URL\"\"\"\n if not host:\n print(\"Error: BYTEHOUSE_HOST environment variable is required\", file=sys.stderr)\n sys.exit(1)\n \n # 处理 host - 可能是 host:port 格式\n if host.startswith('http'):\n base_url = host.rstrip('/')\n else:\n base_url = f\"https://{host}\"\n \n return f\"{base_url}/matrix/v1/conversation\"\n\n\ndef call_text2sql(\n natural_language: str, \n tables: list, \n system_hints: str = \"TEXT2SQL\",\n config: dict = None\n) -> str:\n \"\"\"\n 调用 ByteHouse Text2SQL 接口,将自然语言转换为 SQL\n \n Args:\n natural_language: 自然语言描述的查询需求\n tables: 要查询的表名列表,如 [\"bytehouse.query_history\"]\n system_hints: 系统提示词,默认为 \"TEXT2SQL\"\n config: 可选的配置 dict,支持:\n - reasoningModel: 自定义模型ID\n - reasoningAPIKey: 自定义 API Key\n - url: 自定义 API URL\n \n Returns:\n 转换后的 SQL 语句\n \"\"\"\n # 决定使用哪个配置:用户提供的 config > 环境变量\n if config:\n # 使用用户提供的自定义配置\n base_url = config.get('url', '')\n auth_token = config.get('reasoningAPIKey', '')\n reasoning_model = config.get('reasoningModel', '')\n \n if not base_url:\n print(\"Error: config.url is required when using custom config\", file=sys.stderr)\n sys.exit(1)\n \n # 用户提供的 URL 可能已经包含完整路径,直接使用\n # 如果 URL 已经包含任何 path(如 /api/v3),则不再追加\n if '/' in base_url.split('://')[-1]:\n url = base_url.rstrip('/')\n else:\n url = f\"{base_url.rstrip('/')}/matrix/v1/conversation\"\n else:\n # 使用环境变量中的默认配置\n if not BYTEHOUSE_HOST:\n print(\"Error: Please set BYTEHOUSE_HOST environment variable or provide --config\", file=sys.stderr)\n sys.exit(1)\n \n url = build_text2sql_url(BYTEHOUSE_HOST)\n auth_token = BYTEHOUSE_PASSWORD if BYTEHOUSE_PASSWORD else \"\"\n reasoning_model = \"\"\n \n headers = {\n \"Content-Type\": \"application/json\",\n }\n \n # 添加认证\n if auth_token:\n headers[\"Authorization\"] = f\"Bearer {auth_token}\"\n \n # 构建请求 payload\n payload = {\n \"systemHints\": system_hints,\n \"input\": natural_language,\n \"knowledgeBaseIDsString\": [\"*\"],\n \"tables\": tables\n }\n \n # 如果用户指定了 reasoningModel,添加到 payload\n if reasoning_model:\n payload[\"config\"] = {\n \"reasoningModel\": reasoning_model\n }\n \n # 使用流式请求\n response = requests.post(url, headers=headers, json=payload, stream=True, timeout=30)\n if response.status_code != 200:\n print(response.text)\n response.raise_for_status()\n \n # 收集所有内容片段\n full_content = \"\"\n \n for line in response.iter_lines():\n if line:\n line = line.decode('utf-8')\n if line.startswith('data: '):\n data_str = line[6:] # 去掉 'data: ' 前缀\n try:\n data = json.loads(data_str)\n event_type = data.get('event_type')\n \n if event_type == 'DELTA':\n event_data = json.loads(data.get('event_data', '{}'))\n message = event_data.get('message', {})\n content = message.get('content', '')\n full_content += content\n elif event_type == 'DONE':\n break\n except json.JSONDecodeError:\n continue\n \n # 清理和提取 SQL\n sql = extract_sql(full_content)\n return sql\n\n\ndef extract_sql(content: str) -> str:\n \"\"\"\n 从内容中提取 SQL 语句\n 移除 markdown 代码块标记,清理空白字符\n \"\"\"\n if not content:\n return \"\"\n \n # 移除 markdown 代码块标记\n sql = content.strip()\n sql = re.sub(r'^```\\w*\\n', '', sql)\n sql = re.sub(r'\\n```$', '', sql)\n \n # 规范化空白字符\n sql = re.sub(r'\\s+', ' ', sql)\n sql = sql.strip()\n \n return sql\n\ndef main():\n \"\"\"命令行入口\"\"\"\n parser = argparse.ArgumentParser(\n description='ByteHouse Text2SQL - 将自然语言转换为 SQL 查询',\n formatter_class=argparse.RawDescriptionHelpFormatter,\n epilog='''\n示例:\n python3 text2sql.py \"get count of queries\" \"bytehouse.query_history\"\n python3 text2sql.py \"查看最近10条记录\" \"bytehouse.query_history\" --config '{\"reasoningModel\": \"ep-xxx\", \"reasoningAPIKey\": \"xxx\", \"url\": \"https://xxx\"}'\n\n环境变量:\n BYTEHOUSE_HOST - ByteHouse 主机 (如 tenant-xxx-cn-beijing-public.bytehouse.volces.com)\n BYTEHOUSE_PASSWORD - 密码 (作为 Bearer token)\n\n自定义 Config (通过 --config 参数):\n reasoningModel - 自定义模型ID\n reasoningAPIKey - 自定义 API Key\n url - 自定义 API URL\n'''\n )\n \n parser.add_argument('query', help='自然语言查询')\n parser.add_argument('tables', nargs='+', help='要查询的表名列表')\n parser.add_argument('--config', type=str, help='JSON 格式的配置,包含 reasoningModel, reasoningAPIKey, url')\n parser.add_argument('--system-hints', type=str, default='TEXT2SQL', help='系统提示词 (默认: TEXT2SQL)')\n \n args = parser.parse_args()\n \n # 解析 config 参数\n config = None\n if args.config:\n try:\n config = json.loads(args.config)\n except json.JSONDecodeError as e:\n print(f\"Error: Invalid JSON in --config: {e}\", file=sys.stderr)\n sys.exit(1)\n \n # 检查必要配置\n if not config and not BYTEHOUSE_HOST:\n print(\"Error: Please set BYTEHOUSE_HOST environment variable or provide --config\", file=sys.stderr)\n sys.exit(1)\n \n try:\n sql = call_text2sql(args.query, args.tables, args.system_hints, config)\n print(sql)\n except Exception as e:\n print(f\"Error: {e}\", file=sys.stderr)\n sys.exit(1)\n\n\nif __name__ == \"__main__\":\n main()"}}, "python/01-tutorials/01-agentkit-runtime/hello_world/README_en.md": {"26631497ac61f846d3c4ccb26f2fd1b58a157546": {"t": 1785747247.5813787, "n": 8461, "h": "b405b3a056a0a87b", "c": "# Hello World - The Simplest Chat Agent\n\nThis is an entry-level conversational agent built based on BytePlus VeADK and AgentKit, demonstrating how to create a basic AI Agent with short-term memory.\n\n## Overview\n\nThis example is the \"Hello World\" of AgentKit, showcasing the most basic Agent building process.\n\n## Core Features\n\n- Create a simple conversational Agent\n- Use local short-term memory to maintain conversation context\n- Implement information memory in multi-turn conversations\n- Support local debugging and cloud deployment\n\n## Agent Capability\n\n```text\nUser Message\n ↓\nAgentKit Runtime\n ↓\nHello World Agent\n ├── VeADK Agent (Conversation Engine)\n ├── ShortTermMemory (Session Memory)\n └── BytePlus ModelArk (LLM)\n```\n\n### Core Components\n\n| Component | Description |\n| - | - |\n| **Agent Service** | [agent.py](https://github.com/bytedance/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/agent.py) - Main application, defines the Agent and memory components |\n| **Test Client** | [client.py](https://github.com/bytedance/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/client.py) - SSE streaming call client |\n| **Project Configuration** | [pyproject.toml](https://github.com/bytedance/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/pyproject.toml) - Dependency management (uv tool) |\n| **AgentKit Configuration** | agentkit.yaml - Cloud deployment configuration file |\n| **Short-Term Memory** | Use local backend to store session context |\n\n### Code Features\n\n**Agent Definition** ([agent.py](https://github.com/bytedance/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/agent.py#L11-L18)):\n\n```python\nagent = Agent()\nshort_term_memory = ShortTermMemory(backend=\"local\")\n\nrunner = Runner(\n agent=agent,\n short_term_memory=short_term_memory,\n app_name=app_name,\n user_id=user_id\n)\n```\n\n**Multi-turn Conversation Test** ([agent.py](https://github.com/bytedance/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/agent.py#L21-L26)):\n\n```python\nasync def main():\n response1 = await runner.run(messages=\"My name is VeADK\", session_id=session_id)\n response2 = await runner.run(messages=\"Do you remember my name?\", session_id=session_id)\n```\n\n## Directory Structure Description\n\n```bash\nhello_world/\n├── agent.py # Agent application entry point\n├── client.py # Test client (SSE streaming call)\n├── requirements.txt # Python dependency list (required for agentkit deployment)\n├── pyproject.toml # Project configuration (uv dependency management)\n├── agentkit.yaml # AgentKit deployment configuration (auto-generated after running agentkit config)\n├── Dockerfile # Docker image build file (auto-generated after running agentkit config)\n└── README.md # Project documentation\n```\n\n## Local Execution\n\n### Prerequisites\n\n**1. Activate BytePlus ModelArk Service:**\n\n- Visit the [BytePlus ModelArk Console](https://console.byteplus.com/ark/region:ark+ap-southeast-1/overview)\n- Activate the model service\n\n**2. Obtain BytePlus Access Credentials:**\n\n- Refer to the [User Guide](https://docs.byteplus.com/en/docs/data-intelligence/reference-openapi-ak-sk-authentication) to get AK/SK\n\n### Dependency Installation\n\n#### 1. Install uv Package Manager\n\n```bash\n# macOS / Linux (official installation script)\ncurl -LsSf https://astral.sh/uv/install.sh | sh\n\n# Or use Homebrew (macOS)\nbrew install uv\n```\n\n#### 2. Initialize Project Dependencies\n\n```bash\n# Enter the project directory\ncd python/01-tutorials/01-agentkit-runtime/hello_world\n```\n\nUse the `uv` tool to install the project dependencies:\n\n```bash\n# If you don't have a `uv` virtual environment, you can create one first\nuv venv --python 3.12\n\n# Use `pyproject.toml` to manage dependencies\nuv sync --index-url https://pypi.tuna.tsinghua.edu.cn/simple\n\n# Activate the virtual environment\nsource .venv/bin/activate\n```\n\n### Environment Preparation\n\n```bash\n# BytePlus ModelArk model name\nexport MODEL_AGENT_NAME=deepseek-v4-pro-260425\n\n# BytePlus Access Credentials (required)\nexport BYTEPLUS_ACCESS_KEY=\nexport BYTEPLUS_SECRET_KEY=\n```\n\n### Debugging Methods\n\n#### Method 1: Use VeADK Web Debugging Interface\n\n```bash\n# Go to the parent directory\ncd python/01-tutorials/01-agentkit-runtime\n\n# Start the VeADK Web interface\nveadk web --port 8080\n\n# Access in your browser: http://127.0.0.1:8080\n```\n\nThe web interface provides a graphical conversation testing environment, supporting real-time viewing of message flows and debugging information.\n\n#### Method 2: Command Line Testing\n\n```bash\ncd python/01-tutorials/01-agentkit-runtime/hello_world\n\n# Start the Agent service\nuv run agent.py\n# The service will listen on http://0.0.0.0:8000\n\n# Open a new terminal and run the test client\n# You need to edit client.py and change the base_url and api_key on lines 14 and 15 to the runtime_endpoint and runtime_apikey fields generated in agentkit.yaml\nuv run client.py\n```\n\n**Execution Effect**:\n\n```bash\n[create session] Response from server: {\"session_id\": \"agentkit_session\"}\n[run agent] Event from server:\ndata: {\"event\":\"on_agent_start\",...}\ndata: {\"event\":\"on_llm_chunk\",\"data\":{\"content\":\"Hello VeADK! Nice to meet you.\"}}\ndata: {\"event\":\"on_llm_chunk\",\"data\":{\"content\":\"Of course I remember, your name is VeADK.\"}}\n```\n\n## AgentKit Deployment\n\n### Prerequisites\n\n**Important Note**: Before running this example, please visit the [AgentKit Console Authorization Page](https://console.byteplus.com/agentkit/auth) to authorize all dependent services to ensure the case can be executed normally.\n\n**1. Activate BytePlus ModelArk Service:**\n\n- Visit the [BytePlus ModelArk Console](https://console.byteplus.com/ark/region:ark+ap-southeast-1/overview)\n- Activate the model service\n\n**2. Obtain BytePlus Access Credentials:**\n\n- Refer to the [User Guide](https://docs.byteplus.com/en/docs/data-intelligence/reference-openapi-ak-sk-authentication) to get AK/SK\n\n### AgentKit Cloud Deployment\n\n```bash\ncd python/01-tutorials/01-agentkit-runtime/hello_world\n\n# Configure deployment parameters\nagentkit config\n\n# Start the cloud service\nagentkit launch\n\n# Test the deployed Agent\nagentkit invoke 'who r u'\n\n# Or use client.py to connect to the cloud service\n# You need to edit client.py and change the base_url and api_key on lines 14 and 15 to the runtime_endpoint and runtime_apikey fields generated in agentkit.yaml\nuv run client.py\n```\n\n## Example Prompts\n\n### Basic Conversation Test\n\n**Test Short-Term Memory**:\n\n```text\nUser: My name is VeADK\nAgent: Hello VeADK! Nice to meet you.\n\nUser: Do you remember my name?\nAgent: Of course I remember, your name is VeADK.\n```\n\n### More Test Scenarios\n\n**Test Information Memory**:\n\n```text\nUser: I am 25 years old and I like programming\nAgent: Got it! You are 25 years old and you like programming, that's a great hobby.\n\nUser: How old am I? What are my hobbies?\nAgent: You are 25 years old and you like programming.\n```\n\n**Test Context Association**:\n\n```text\nUser: I live in Beijing and work at an internet company\nAgent: Understood, you work in Beijing at an internet company.\n\nUser: Do you know my basic information?\nAgent: Yes, your name is VeADK, you are 25 years old, you like programming, and you work at an internet company in Beijing.\n```\n\n## Effect Display\n\n## Technical Points\n\n### Short-Term Memory\n\n- **Storage Method**: Local memory (`backend=\"local\"`)\n- **Scope**: All conversations within a single session_id\n- **Lifecycle**: Cleared after process restart\n- **Applicable Scenarios**: Development and debugging, single-machine deployment\n\n### Multi-turn Conversation\n\n- Associate the same conversation through `session_id`\n- Automatically load historical messages with each call\n- The Agent understands the user's intent based on the context\n\n### AgentKit Integration\n\n```python\nfrom agentkit.apps import AgentkitAgentServerApp\n\nagent_server_app = AgentkitAgentServerApp(\n agent=agent,\n short_term_memory=short_term_memory,\n)\n```\n\n## FAQ\n\nNone.\n\n## References\n\n- [VeADK Official Documentation](https://volcengine.github.io/veadk-python/)\n- [AgentKit Development Guide](https://volcengine.github.io/agentkit-sdk-python/)\n- [BytePlus ModelArk Service](https://console.byteplus.com/ark/region:ark+ap-southeast-1/overview)\n\n## Code License\n\nThis project follows the Apache 2.0 License\n"}, "29a4bdaf83442e1a67d182a904093aa4b4ef9f37": {"t": 1785771740.5165703, "n": 8461, "h": "b405b3a056a0a87b", "c": "# Hello World - The Simplest Chat Agent\n\nThis is an entry-level conversational agent built based on BytePlus VeADK and AgentKit, demonstrating how to create a basic AI Agent with short-term memory.\n\n## Overview\n\nThis example is the \"Hello World\" of AgentKit, showcasing the most basic Agent building process.\n\n## Core Features\n\n- Create a simple conversational Agent\n- Use local short-term memory to maintain conversation context\n- Implement information memory in multi-turn conversations\n- Support local debugging and cloud deployment\n\n## Agent Capability\n\n```text\nUser Message\n ↓\nAgentKit Runtime\n ↓\nHello World Agent\n ├── VeADK Agent (Conversation Engine)\n ├── ShortTermMemory (Session Memory)\n └── BytePlus ModelArk (LLM)\n```\n\n### Core Components\n\n| Component | Description |\n| - | - |\n| **Agent Service** | [agent.py](https://github.com/bytedance/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/agent.py) - Main application, defines the Agent and memory components |\n| **Test Client** | [client.py](https://github.com/bytedance/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/client.py) - SSE streaming call client |\n| **Project Configuration** | [pyproject.toml](https://github.com/bytedance/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/pyproject.toml) - Dependency management (uv tool) |\n| **AgentKit Configuration** | agentkit.yaml - Cloud deployment configuration file |\n| **Short-Term Memory** | Use local backend to store session context |\n\n### Code Features\n\n**Agent Definition** ([agent.py](https://github.com/bytedance/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/agent.py#L11-L18)):\n\n```python\nagent = Agent()\nshort_term_memory = ShortTermMemory(backend=\"local\")\n\nrunner = Runner(\n agent=agent,\n short_term_memory=short_term_memory,\n app_name=app_name,\n user_id=user_id\n)\n```\n\n**Multi-turn Conversation Test** ([agent.py](https://github.com/bytedance/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/agent.py#L21-L26)):\n\n```python\nasync def main():\n response1 = await runner.run(messages=\"My name is VeADK\", session_id=session_id)\n response2 = await runner.run(messages=\"Do you remember my name?\", session_id=session_id)\n```\n\n## Directory Structure Description\n\n```bash\nhello_world/\n├── agent.py # Agent application entry point\n├── client.py # Test client (SSE streaming call)\n├── requirements.txt # Python dependency list (required for agentkit deployment)\n├── pyproject.toml # Project configuration (uv dependency management)\n├── agentkit.yaml # AgentKit deployment configuration (auto-generated after running agentkit config)\n├── Dockerfile # Docker image build file (auto-generated after running agentkit config)\n└── README.md # Project documentation\n```\n\n## Local Execution\n\n### Prerequisites\n\n**1. Activate BytePlus ModelArk Service:**\n\n- Visit the [BytePlus ModelArk Console](https://console.byteplus.com/ark/region:ark+ap-southeast-1/overview)\n- Activate the model service\n\n**2. Obtain BytePlus Access Credentials:**\n\n- Refer to the [User Guide](https://docs.byteplus.com/en/docs/data-intelligence/reference-openapi-ak-sk-authentication) to get AK/SK\n\n### Dependency Installation\n\n#### 1. Install uv Package Manager\n\n```bash\n# macOS / Linux (official installation script)\ncurl -LsSf https://astral.sh/uv/install.sh | sh\n\n# Or use Homebrew (macOS)\nbrew install uv\n```\n\n#### 2. Initialize Project Dependencies\n\n```bash\n# Enter the project directory\ncd python/01-tutorials/01-agentkit-runtime/hello_world\n```\n\nUse the `uv` tool to install the project dependencies:\n\n```bash\n# If you don't have a `uv` virtual environment, you can create one first\nuv venv --python 3.12\n\n# Use `pyproject.toml` to manage dependencies\nuv sync --index-url https://pypi.tuna.tsinghua.edu.cn/simple\n\n# Activate the virtual environment\nsource .venv/bin/activate\n```\n\n### Environment Preparation\n\n```bash\n# BytePlus ModelArk model name\nexport MODEL_AGENT_NAME=deepseek-v4-pro-260425\n\n# BytePlus Access Credentials (required)\nexport BYTEPLUS_ACCESS_KEY=\nexport BYTEPLUS_SECRET_KEY=\n```\n\n### Debugging Methods\n\n#### Method 1: Use VeADK Web Debugging Interface\n\n```bash\n# Go to the parent directory\ncd python/01-tutorials/01-agentkit-runtime\n\n# Start the VeADK Web interface\nveadk web --port 8080\n\n# Access in your browser: http://127.0.0.1:8080\n```\n\nThe web interface provides a graphical conversation testing environment, supporting real-time viewing of message flows and debugging information.\n\n#### Method 2: Command Line Testing\n\n```bash\ncd python/01-tutorials/01-agentkit-runtime/hello_world\n\n# Start the Agent service\nuv run agent.py\n# The service will listen on http://0.0.0.0:8000\n\n# Open a new terminal and run the test client\n# You need to edit client.py and change the base_url and api_key on lines 14 and 15 to the runtime_endpoint and runtime_apikey fields generated in agentkit.yaml\nuv run client.py\n```\n\n**Execution Effect**:\n\n```bash\n[create session] Response from server: {\"session_id\": \"agentkit_session\"}\n[run agent] Event from server:\ndata: {\"event\":\"on_agent_start\",...}\ndata: {\"event\":\"on_llm_chunk\",\"data\":{\"content\":\"Hello VeADK! Nice to meet you.\"}}\ndata: {\"event\":\"on_llm_chunk\",\"data\":{\"content\":\"Of course I remember, your name is VeADK.\"}}\n```\n\n## AgentKit Deployment\n\n### Prerequisites\n\n**Important Note**: Before running this example, please visit the [AgentKit Console Authorization Page](https://console.byteplus.com/agentkit/auth) to authorize all dependent services to ensure the case can be executed normally.\n\n**1. Activate BytePlus ModelArk Service:**\n\n- Visit the [BytePlus ModelArk Console](https://console.byteplus.com/ark/region:ark+ap-southeast-1/overview)\n- Activate the model service\n\n**2. Obtain BytePlus Access Credentials:**\n\n- Refer to the [User Guide](https://docs.byteplus.com/en/docs/data-intelligence/reference-openapi-ak-sk-authentication) to get AK/SK\n\n### AgentKit Cloud Deployment\n\n```bash\ncd python/01-tutorials/01-agentkit-runtime/hello_world\n\n# Configure deployment parameters\nagentkit config\n\n# Start the cloud service\nagentkit launch\n\n# Test the deployed Agent\nagentkit invoke 'who r u'\n\n# Or use client.py to connect to the cloud service\n# You need to edit client.py and change the base_url and api_key on lines 14 and 15 to the runtime_endpoint and runtime_apikey fields generated in agentkit.yaml\nuv run client.py\n```\n\n## Example Prompts\n\n### Basic Conversation Test\n\n**Test Short-Term Memory**:\n\n```text\nUser: My name is VeADK\nAgent: Hello VeADK! Nice to meet you.\n\nUser: Do you remember my name?\nAgent: Of course I remember, your name is VeADK.\n```\n\n### More Test Scenarios\n\n**Test Information Memory**:\n\n```text\nUser: I am 25 years old and I like programming\nAgent: Got it! You are 25 years old and you like programming, that's a great hobby.\n\nUser: How old am I? What are my hobbies?\nAgent: You are 25 years old and you like programming.\n```\n\n**Test Context Association**:\n\n```text\nUser: I live in Beijing and work at an internet company\nAgent: Understood, you work in Beijing at an internet company.\n\nUser: Do you know my basic information?\nAgent: Yes, your name is VeADK, you are 25 years old, you like programming, and you work at an internet company in Beijing.\n```\n\n## Effect Display\n\n## Technical Points\n\n### Short-Term Memory\n\n- **Storage Method**: Local memory (`backend=\"local\"`)\n- **Scope**: All conversations within a single session_id\n- **Lifecycle**: Cleared after process restart\n- **Applicable Scenarios**: Development and debugging, single-machine deployment\n\n### Multi-turn Conversation\n\n- Associate the same conversation through `session_id`\n- Automatically load historical messages with each call\n- The Agent understands the user's intent based on the context\n\n### AgentKit Integration\n\n```python\nfrom agentkit.apps import AgentkitAgentServerApp\n\nagent_server_app = AgentkitAgentServerApp(\n agent=agent,\n short_term_memory=short_term_memory,\n)\n```\n\n## FAQ\n\nNone.\n\n## References\n\n- [VeADK Official Documentation](https://volcengine.github.io/veadk-python/)\n- [AgentKit Development Guide](https://volcengine.github.io/agentkit-sdk-python/)\n- [BytePlus ModelArk Service](https://console.byteplus.com/ark/region:ark+ap-southeast-1/overview)\n\n## Code License\n\nThis project follows the Apache 2.0 License\n"}, "3b63382c5bd9f728736261719bae3b58c59d1434": {"t": 1785771741.8071795, "n": 8474, "h": "b0f767c6356105e0", "c": "# Hello World - The Simplest Chat Agent\n\nThis is an entry-level conversational agent built based on BytePlus VeADK and AgentKit, demonstrating how to create a basic AI Agent with short-term memory.\n\n## Overview\n\nThis example is the \"Hello World\" of AgentKit, showcasing the most basic Agent building process.\n\n## Core Features\n\n- Create a simple conversational Agent\n- Use local short-term memory to maintain conversation context\n- Implement information memory in multi-turn conversations\n- Support local debugging and cloud deployment\n\n## Agent Capability\n\n```text\nUser Message\n ↓\nAgentKit Runtime\n ↓\nHello World Agent\n ├── VeADK Agent (Conversation Engine)\n ├── ShortTermMemory (Session Memory)\n └── BytePlus Model Ark (LLM)\n```\n\n### Core Components\n\n| Component | Description |\n| - | - |\n| **Agent Service** | [agent.py](https://github.com/bytedance/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/agent.py) - Main application, defines the Agent and memory components |\n| **Test Client** | [client.py](https://github.com/bytedance/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/client.py) - SSE streaming call client |\n| **Project Configuration** | [pyproject.toml](https://github.com/bytedance/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/pyproject.toml) - Dependency management (uv tool) |\n| **AgentKit Configuration** | agentkit.yaml - Cloud deployment configuration file |\n| **Short-Term Memory** | Use local backend to store session context |\n\n### Code Features\n\n**Agent Definition** ([agent.py](https://github.com/bytedance/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/agent.py#L11-L18)):\n\n```python\nagent = Agent()\nshort_term_memory = ShortTermMemory(backend=\"local\")\n\nrunner = Runner(\n agent=agent,\n short_term_memory=short_term_memory,\n app_name=app_name,\n user_id=user_id\n)\n```\n\n**Multi-turn Conversation Test** ([agent.py](https://github.com/bytedance/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/agent.py#L21-L26)):\n\n```python\nasync def main():\n response1 = await runner.run(messages=\"My name is VeADK\", session_id=session_id)\n response2 = await runner.run(messages=\"Do you remember my name?\", session_id=session_id)\n```\n\n## Directory Structure Description\n\n```bash\nhello_world/\n├── agent.py # Agent application entry point\n├── client.py # Test client (SSE streaming call)\n├── requirements.txt # Python dependency list (required for agentkit deployment)\n├── pyproject.toml # Project configuration (uv dependency management)\n├── agentkit.yaml # AgentKit deployment configuration (auto-generated after running agentkit config)\n├── Dockerfile # Docker image build file (auto-generated after running agentkit config)\n└── README.md # Project documentation\n```\n\n## Local Execution\n\n### Prerequisites\n\n**1. Activate BytePlus Model Ark Service:**\n\n- Visit the [BytePlus Model Ark Console](https://console.byteplus.com/ark/region:ark+ap-southeast-1/overview)\n- Activate the model service\n\n**2. Obtain BytePlus Access Credentials:**\n\n- Refer to the [User Guide](https://docs.byteplus.com/en/docs/data-intelligence/reference-openapi-ak-sk-authentication) to get AK/SK\n\n### Dependency Installation\n\n#### 1. Install uv Package Manager\n\n```bash\n# macOS / Linux (official installation script)\ncurl -LsSf https://astral.sh/uv/install.sh | sh\n\n# Or use Homebrew (macOS)\nbrew install uv\n```\n\n#### 2. Initialize Project Dependencies\n\n```bash\n# Enter the project directory\ncd python/01-tutorials/01-agentkit-runtime/hello_world\n```\n\nUse the `uv` tool to install the project dependencies:\n\n```bash\n# If you don't have a `uv` virtual environment, you can create one first\nuv venv --python 3.12\n\n# Use `pyproject.toml` to manage dependencies\nuv sync --index-url https://pypi.tuna.tsinghua.edu.cn/simple\n\n# Activate the virtual environment\nsource .venv/bin/activate\n```\n\n### Environment Preparation\n\n```bash\n# BytePlus Model Ark Model Name\nexport MODEL_AGENT_NAME=deepseek-v4-pro-260425\n\n# BytePlus Access Credentials (required)\nexport BYTEPLUS_ACCESS_KEY=\nexport BYTEPLUS_SECRET_KEY=\n```\n\n### Debugging Methods\n\n#### Method 1: Use VeADK Web Debugging Interface\n\n```bash\n# Go to the parent directory\ncd python/01-tutorials/01-agentkit-runtime\n\n# Start the VeADK Web interface\nveadk web --port 8080\n\n# Access in your browser: http://127.0.0.1:8080\n```\n\nThe web interface provides a graphical conversation testing environment, supporting real-time viewing of message flows and debugging information.\n\n#### Method 2: Command Line Testing\n\n```bash\ncd python/01-tutorials/01-agentkit-runtime/hello_world\n\n# Start the Agent service\nuv run agent.py\n# The service will listen on http://0.0.0.0:8000\n\n# Open a new terminal and run the test client\n# You need to edit client.py and change the base_url and api_key on lines 14 and 15 to the runtime_endpoint and runtime_apikey fields generated in agentkit.yaml\nuv run client.py\n```\n\n**Execution Effect**:\n\n```bash\n[create session] Response from server: {\"session_id\": \"agentkit_session\"}\n[run agent] Event from server:\ndata: {\"event\":\"on_agent_start\",...}\ndata: {\"event\":\"on_llm_chunk\",\"data\":{\"content\":\"Hello VeADK! Nice to meet you.\"}}\ndata: {\"event\":\"on_llm_chunk\",\"data\":{\"content\":\"Of course I remember, your name is VeADK.\"}}\n```\n\n## AgentKit Deployment\n\n### Prerequisites\n\n**Important Note**: Before running this example, please visit the [AgentKit Console Authorization Page](https://console.byteplus.com/agentkit/auth) to authorize all dependent services to ensure the case can be executed normally.\n\n**1. Activate BytePlus Model Ark Service:**\n\n- Visit the [BytePlus Model Ark Console](https://console.byteplus.com/ark/region:ark+ap-southeast-1/overview)\n- Activate the model service\n\n**2. Obtain BytePlus Access Credentials:**\n\n- Refer to the [User Guide](https://docs.byteplus.com/en/docs/data-intelligence/reference-openapi-ak-sk-authentication) to get AK/SK\n\n### AgentKit Cloud Deployment\n\n```bash\ncd python/01-tutorials/01-agentkit-runtime/hello_world\n\n# Configure deployment parameters\nagentkit config\n\n# Start the cloud service\nagentkit launch\n\n# Test the deployed Agent\nagentkit invoke 'who r u'\n\n# Or use client.py to connect to the cloud service\n# You need to edit client.py and change the base_url and api_key on lines 14 and 15 to the runtime_endpoint and runtime_apikey fields generated in agentkit.yaml\nuv run client.py\n```\n\n## Example Prompts\n\n### Basic Conversation Test\n\n**Test Short-Term Memory**:\n\n```text\nUser: My name is VeADK\nAgent: Hello VeADK! Nice to meet you.\n\nUser: Do you remember my name?\nAgent: Of course I remember, your name is VeADK.\n```\n\n### More Test Scenarios\n\n**Test Information Memory**:\n\n```text\nUser: I am 25 years old and I like programming\nAgent: Got it! You are 25 years old and you like programming, that's a great hobby.\n\nUser: How old am I? What are my hobbies?\nAgent: You are 25 years old and you like programming.\n```\n\n**Test Context Association**:\n\n```text\nUser: I live in Beijing and work at an internet company\nAgent: Understood, you work in Beijing at an internet company.\n\nUser: Do you know my basic information?\nAgent: Yes, your name is VeADK, you are 25 years old, you like programming, and you work at an internet company in Beijing.\n```\n\n## Effect Display\n\n## Technical Points\n\n### Short-Term Memory\n\n- **Storage Method**: Local memory (`backend=\"local\"`)\n- **Scope**: All conversations within a single session_id\n- **Lifecycle**: Cleared after process restart\n- **Applicable Scenarios**: Development and debugging, single-machine deployment\n\n### Multi-turn Conversation\n\n- Associate the same conversation through `session_id`\n- Automatically load historical messages with each call\n- The Agent understands the user's intent based on the context\n\n### AgentKit Integration\n\n```python\nfrom agentkit.apps import AgentkitAgentServerApp\n\nagent_server_app = AgentkitAgentServerApp(\n agent=agent,\n short_term_memory=short_term_memory,\n)\n```\n\n## FAQ\n\nNone.\n\n## References\n\n- [VeADK Official Documentation](https://volcengine.github.io/veadk-python/)\n- [AgentKit Development Guide](https://volcengine.github.io/agentkit-sdk-python/)\n- [BytePlus Model Ark Model Service](https://console.byteplus.com/ark/region:ark+ap-southeast-1/overview)\n\n## Code License\n\nThis project follows the Apache 2.0 License\n"}, "f4257aa233d48e6b02b890d04bb4ecd014d08c40": {"t": 1785771743.0830653, "n": 8461, "h": "b405b3a056a0a87b", "c": "# Hello World - The Simplest Chat Agent\n\nThis is an entry-level conversational agent built based on BytePlus VeADK and AgentKit, demonstrating how to create a basic AI Agent with short-term memory.\n\n## Overview\n\nThis example is the \"Hello World\" of AgentKit, showcasing the most basic Agent building process.\n\n## Core Features\n\n- Create a simple conversational Agent\n- Use local short-term memory to maintain conversation context\n- Implement information memory in multi-turn conversations\n- Support local debugging and cloud deployment\n\n## Agent Capability\n\n```text\nUser Message\n ↓\nAgentKit Runtime\n ↓\nHello World Agent\n ├── VeADK Agent (Conversation Engine)\n ├── ShortTermMemory (Session Memory)\n └── BytePlus ModelArk (LLM)\n```\n\n### Core Components\n\n| Component | Description |\n| - | - |\n| **Agent Service** | [agent.py](https://github.com/bytedance/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/agent.py) - Main application, defines the Agent and memory components |\n| **Test Client** | [client.py](https://github.com/bytedance/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/client.py) - SSE streaming call client |\n| **Project Configuration** | [pyproject.toml](https://github.com/bytedance/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/pyproject.toml) - Dependency management (uv tool) |\n| **AgentKit Configuration** | agentkit.yaml - Cloud deployment configuration file |\n| **Short-Term Memory** | Use local backend to store session context |\n\n### Code Features\n\n**Agent Definition** ([agent.py](https://github.com/bytedance/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/agent.py#L11-L18)):\n\n```python\nagent = Agent()\nshort_term_memory = ShortTermMemory(backend=\"local\")\n\nrunner = Runner(\n agent=agent,\n short_term_memory=short_term_memory,\n app_name=app_name,\n user_id=user_id\n)\n```\n\n**Multi-turn Conversation Test** ([agent.py](https://github.com/bytedance/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/agent.py#L21-L26)):\n\n```python\nasync def main():\n response1 = await runner.run(messages=\"My name is VeADK\", session_id=session_id)\n response2 = await runner.run(messages=\"Do you remember my name?\", session_id=session_id)\n```\n\n## Directory Structure Description\n\n```bash\nhello_world/\n├── agent.py # Agent application entry point\n├── client.py # Test client (SSE streaming call)\n├── requirements.txt # Python dependency list (required for agentkit deployment)\n├── pyproject.toml # Project configuration (uv dependency management)\n├── agentkit.yaml # AgentKit deployment configuration (auto-generated after running agentkit config)\n├── Dockerfile # Docker image build file (auto-generated after running agentkit config)\n└── README.md # Project documentation\n```\n\n## Local Execution\n\n### Prerequisites\n\n**1. Activate BytePlus ModelArk Service:**\n\n- Visit the [BytePlus ModelArk Console](https://console.byteplus.com/ark/region:ark+ap-southeast-1/overview)\n- Activate the model service\n\n**2. Obtain BytePlus Access Credentials:**\n\n- Refer to the [User Guide](https://docs.byteplus.com/en/docs/data-intelligence/reference-openapi-ak-sk-authentication) to get AK/SK\n\n### Dependency Installation\n\n#### 1. Install uv Package Manager\n\n```bash\n# macOS / Linux (official installation script)\ncurl -LsSf https://astral.sh/uv/install.sh | sh\n\n# Or use Homebrew (macOS)\nbrew install uv\n```\n\n#### 2. Initialize Project Dependencies\n\n```bash\n# Enter the project directory\ncd python/01-tutorials/01-agentkit-runtime/hello_world\n```\n\nUse the `uv` tool to install the project dependencies:\n\n```bash\n# If you don't have a `uv` virtual environment, you can create one first\nuv venv --python 3.12\n\n# Use `pyproject.toml` to manage dependencies\nuv sync --index-url https://pypi.tuna.tsinghua.edu.cn/simple\n\n# Activate the virtual environment\nsource .venv/bin/activate\n```\n\n### Environment Preparation\n\n```bash\n# BytePlus ModelArk model name\nexport MODEL_AGENT_NAME=deepseek-v4-pro-260425\n\n# BytePlus Access Credentials (required)\nexport BYTEPLUS_ACCESS_KEY=\nexport BYTEPLUS_SECRET_KEY=\n```\n\n### Debugging Methods\n\n#### Method 1: Use VeADK Web Debugging Interface\n\n```bash\n# Go to the parent directory\ncd python/01-tutorials/01-agentkit-runtime\n\n# Start the VeADK Web interface\nveadk web --port 8080\n\n# Access in your browser: http://127.0.0.1:8080\n```\n\nThe web interface provides a graphical conversation testing environment, supporting real-time viewing of message flows and debugging information.\n\n#### Method 2: Command Line Testing\n\n```bash\ncd python/01-tutorials/01-agentkit-runtime/hello_world\n\n# Start the Agent service\nuv run agent.py\n# The service will listen on http://0.0.0.0:8000\n\n# Open a new terminal and run the test client\n# You need to edit client.py and change the base_url and api_key on lines 14 and 15 to the runtime_endpoint and runtime_apikey fields generated in agentkit.yaml\nuv run client.py\n```\n\n**Execution Effect**:\n\n```bash\n[create session] Response from server: {\"session_id\": \"agentkit_session\"}\n[run agent] Event from server:\ndata: {\"event\":\"on_agent_start\",...}\ndata: {\"event\":\"on_llm_chunk\",\"data\":{\"content\":\"Hello VeADK! Nice to meet you.\"}}\ndata: {\"event\":\"on_llm_chunk\",\"data\":{\"content\":\"Of course I remember, your name is VeADK.\"}}\n```\n\n## AgentKit Deployment\n\n### Prerequisites\n\n**Important Note**: Before running this example, please visit the [AgentKit Console Authorization Page](https://console.byteplus.com/agentkit/auth) to authorize all dependent services to ensure the case can be executed normally.\n\n**1. Activate BytePlus ModelArk Service:**\n\n- Visit the [BytePlus ModelArk Console](https://console.byteplus.com/ark/region:ark+ap-southeast-1/overview)\n- Activate the model service\n\n**2. Obtain BytePlus Access Credentials:**\n\n- Refer to the [User Guide](https://docs.byteplus.com/en/docs/data-intelligence/reference-openapi-ak-sk-authentication) to get AK/SK\n\n### AgentKit Cloud Deployment\n\n```bash\ncd python/01-tutorials/01-agentkit-runtime/hello_world\n\n# Configure deployment parameters\nagentkit config\n\n# Start the cloud service\nagentkit launch\n\n# Test the deployed Agent\nagentkit invoke 'who r u'\n\n# Or use client.py to connect to the cloud service\n# You need to edit client.py and change the base_url and api_key on lines 14 and 15 to the runtime_endpoint and runtime_apikey fields generated in agentkit.yaml\nuv run client.py\n```\n\n## Example Prompts\n\n### Basic Conversation Test\n\n**Test Short-Term Memory**:\n\n```text\nUser: My name is VeADK\nAgent: Hello VeADK! Nice to meet you.\n\nUser: Do you remember my name?\nAgent: Of course I remember, your name is VeADK.\n```\n\n### More Test Scenarios\n\n**Test Information Memory**:\n\n```text\nUser: I am 25 years old and I like programming\nAgent: Got it! You are 25 years old and you like programming, that's a great hobby.\n\nUser: How old am I? What are my hobbies?\nAgent: You are 25 years old and you like programming.\n```\n\n**Test Context Association**:\n\n```text\nUser: I live in Beijing and work at an internet company\nAgent: Understood, you work in Beijing at an internet company.\n\nUser: Do you know my basic information?\nAgent: Yes, your name is VeADK, you are 25 years old, you like programming, and you work at an internet company in Beijing.\n```\n\n## Effect Display\n\n## Technical Points\n\n### Short-Term Memory\n\n- **Storage Method**: Local memory (`backend=\"local\"`)\n- **Scope**: All conversations within a single session_id\n- **Lifecycle**: Cleared after process restart\n- **Applicable Scenarios**: Development and debugging, single-machine deployment\n\n### Multi-turn Conversation\n\n- Associate the same conversation through `session_id`\n- Automatically load historical messages with each call\n- The Agent understands the user's intent based on the context\n\n### AgentKit Integration\n\n```python\nfrom agentkit.apps import AgentkitAgentServerApp\n\nagent_server_app = AgentkitAgentServerApp(\n agent=agent,\n short_term_memory=short_term_memory,\n)\n```\n\n## FAQ\n\nNone.\n\n## References\n\n- [VeADK Official Documentation](https://volcengine.github.io/veadk-python/)\n- [AgentKit Development Guide](https://volcengine.github.io/agentkit-sdk-python/)\n- [BytePlus ModelArk Service](https://console.byteplus.com/ark/region:ark+ap-southeast-1/overview)\n\n## Code License\n\nThis project follows the Apache 2.0 License\n"}, "d434f13a58443589a06ff3f03eff2d71df8595fc": {"t": 1785771744.2518356, "n": 8474, "h": "b0f767c6356105e0", "c": "# Hello World - The Simplest Chat Agent\n\nThis is an entry-level conversational agent built based on BytePlus VeADK and AgentKit, demonstrating how to create a basic AI Agent with short-term memory.\n\n## Overview\n\nThis example is the \"Hello World\" of AgentKit, showcasing the most basic Agent building process.\n\n## Core Features\n\n- Create a simple conversational Agent\n- Use local short-term memory to maintain conversation context\n- Implement information memory in multi-turn conversations\n- Support local debugging and cloud deployment\n\n## Agent Capability\n\n```text\nUser Message\n ↓\nAgentKit Runtime\n ↓\nHello World Agent\n ├── VeADK Agent (Conversation Engine)\n ├── ShortTermMemory (Session Memory)\n └── BytePlus Model Ark (LLM)\n```\n\n### Core Components\n\n| Component | Description |\n| - | - |\n| **Agent Service** | [agent.py](https://github.com/bytedance/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/agent.py) - Main application, defines the Agent and memory components |\n| **Test Client** | [client.py](https://github.com/bytedance/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/client.py) - SSE streaming call client |\n| **Project Configuration** | [pyproject.toml](https://github.com/bytedance/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/pyproject.toml) - Dependency management (uv tool) |\n| **AgentKit Configuration** | agentkit.yaml - Cloud deployment configuration file |\n| **Short-Term Memory** | Use local backend to store session context |\n\n### Code Features\n\n**Agent Definition** ([agent.py](https://github.com/bytedance/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/agent.py#L11-L18)):\n\n```python\nagent = Agent()\nshort_term_memory = ShortTermMemory(backend=\"local\")\n\nrunner = Runner(\n agent=agent,\n short_term_memory=short_term_memory,\n app_name=app_name,\n user_id=user_id\n)\n```\n\n**Multi-turn Conversation Test** ([agent.py](https://github.com/bytedance/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/agent.py#L21-L26)):\n\n```python\nasync def main():\n response1 = await runner.run(messages=\"My name is VeADK\", session_id=session_id)\n response2 = await runner.run(messages=\"Do you remember my name?\", session_id=session_id)\n```\n\n## Directory Structure Description\n\n```bash\nhello_world/\n├── agent.py # Agent application entry point\n├── client.py # Test client (SSE streaming call)\n├── requirements.txt # Python dependency list (required for agentkit deployment)\n├── pyproject.toml # Project configuration (uv dependency management)\n├── agentkit.yaml # AgentKit deployment configuration (auto-generated after running agentkit config)\n├── Dockerfile # Docker image build file (auto-generated after running agentkit config)\n└── README.md # Project documentation\n```\n\n## Local Execution\n\n### Prerequisites\n\n**1. Activate BytePlus Model Ark Service:**\n\n- Visit the [BytePlus Model Ark Console](https://console.byteplus.com/ark/region:ark+ap-southeast-1/overview)\n- Activate the model service\n\n**2. Obtain BytePlus Access Credentials:**\n\n- Refer to the [User Guide](https://docs.byteplus.com/en/docs/data-intelligence/reference-openapi-ak-sk-authentication) to get AK/SK\n\n### Dependency Installation\n\n#### 1. Install uv Package Manager\n\n```bash\n# macOS / Linux (official installation script)\ncurl -LsSf https://astral.sh/uv/install.sh | sh\n\n# Or use Homebrew (macOS)\nbrew install uv\n```\n\n#### 2. Initialize Project Dependencies\n\n```bash\n# Enter the project directory\ncd python/01-tutorials/01-agentkit-runtime/hello_world\n```\n\nUse the `uv` tool to install the project dependencies:\n\n```bash\n# If you don't have a `uv` virtual environment, you can create one first\nuv venv --python 3.12\n\n# Use `pyproject.toml` to manage dependencies\nuv sync --index-url https://pypi.tuna.tsinghua.edu.cn/simple\n\n# Activate the virtual environment\nsource .venv/bin/activate\n```\n\n### Environment Preparation\n\n```bash\n# BytePlus Model Ark Model Name\nexport MODEL_AGENT_NAME=deepseek-v4-pro-260425\n\n# BytePlus Access Credentials (required)\nexport BYTEPLUS_ACCESS_KEY=\nexport BYTEPLUS_SECRET_KEY=\n```\n\n### Debugging Methods\n\n#### Method 1: Use VeADK Web Debugging Interface\n\n```bash\n# Go to the parent directory\ncd python/01-tutorials/01-agentkit-runtime\n\n# Start the VeADK Web interface\nveadk web --port 8080\n\n# Access in your browser: http://127.0.0.1:8080\n```\n\nThe web interface provides a graphical conversation testing environment, supporting real-time viewing of message flows and debugging information.\n\n#### Method 2: Command Line Testing\n\n```bash\ncd python/01-tutorials/01-agentkit-runtime/hello_world\n\n# Start the Agent service\nuv run agent.py\n# The service will listen on http://0.0.0.0:8000\n\n# Open a new terminal and run the test client\n# You need to edit client.py and change the base_url and api_key on lines 14 and 15 to the runtime_endpoint and runtime_apikey fields generated in agentkit.yaml\nuv run client.py\n```\n\n**Execution Effect**:\n\n```bash\n[create session] Response from server: {\"session_id\": \"agentkit_session\"}\n[run agent] Event from server:\ndata: {\"event\":\"on_agent_start\",...}\ndata: {\"event\":\"on_llm_chunk\",\"data\":{\"content\":\"Hello VeADK! Nice to meet you.\"}}\ndata: {\"event\":\"on_llm_chunk\",\"data\":{\"content\":\"Of course I remember, your name is VeADK.\"}}\n```\n\n## AgentKit Deployment\n\n### Prerequisites\n\n**Important Note**: Before running this example, please visit the [AgentKit Console Authorization Page](https://console.byteplus.com/agentkit/auth) to authorize all dependent services to ensure the case can be executed normally.\n\n**1. Activate BytePlus Model Ark Service:**\n\n- Visit the [BytePlus Model Ark Console](https://console.byteplus.com/ark/region:ark+ap-southeast-1/overview)\n- Activate the model service\n\n**2. Obtain BytePlus Access Credentials:**\n\n- Refer to the [User Guide](https://docs.byteplus.com/en/docs/data-intelligence/reference-openapi-ak-sk-authentication) to get AK/SK\n\n### AgentKit Cloud Deployment\n\n```bash\ncd python/01-tutorials/01-agentkit-runtime/hello_world\n\n# Configure deployment parameters\nagentkit config\n\n# Start the cloud service\nagentkit launch\n\n# Test the deployed Agent\nagentkit invoke 'who r u'\n\n# Or use client.py to connect to the cloud service\n# You need to edit client.py and change the base_url and api_key on lines 14 and 15 to the runtime_endpoint and runtime_apikey fields generated in agentkit.yaml\nuv run client.py\n```\n\n## Example Prompts\n\n### Basic Conversation Test\n\n**Test Short-Term Memory**:\n\n```text\nUser: My name is VeADK\nAgent: Hello VeADK! Nice to meet you.\n\nUser: Do you remember my name?\nAgent: Of course I remember, your name is VeADK.\n```\n\n### More Test Scenarios\n\n**Test Information Memory**:\n\n```text\nUser: I am 25 years old and I like programming\nAgent: Got it! You are 25 years old and you like programming, that's a great hobby.\n\nUser: How old am I? What are my hobbies?\nAgent: You are 25 years old and you like programming.\n```\n\n**Test Context Association**:\n\n```text\nUser: I live in Beijing and work at an internet company\nAgent: Understood, you work in Beijing at an internet company.\n\nUser: Do you know my basic information?\nAgent: Yes, your name is VeADK, you are 25 years old, you like programming, and you work at an internet company in Beijing.\n```\n\n## Effect Display\n\n## Technical Points\n\n### Short-Term Memory\n\n- **Storage Method**: Local memory (`backend=\"local\"`)\n- **Scope**: All conversations within a single session_id\n- **Lifecycle**: Cleared after process restart\n- **Applicable Scenarios**: Development and debugging, single-machine deployment\n\n### Multi-turn Conversation\n\n- Associate the same conversation through `session_id`\n- Automatically load historical messages with each call\n- The Agent understands the user's intent based on the context\n\n### AgentKit Integration\n\n```python\nfrom agentkit.apps import AgentkitAgentServerApp\n\nagent_server_app = AgentkitAgentServerApp(\n agent=agent,\n short_term_memory=short_term_memory,\n)\n```\n\n## FAQ\n\nNone.\n\n## References\n\n- [VeADK Official Documentation](https://volcengine.github.io/veadk-python/)\n- [AgentKit Development Guide](https://volcengine.github.io/agentkit-sdk-python/)\n- [BytePlus Model Ark Model Service](https://console.byteplus.com/ark/region:ark+ap-southeast-1/overview)\n\n## Code License\n\nThis project follows the Apache 2.0 License\n"}, "f673b9f789671c68379d0bd1ae0bd3f65f94502b": {"t": 1785771745.5486007, "n": 8461, "h": "b405b3a056a0a87b", "c": "# Hello World - The Simplest Chat Agent\n\nThis is an entry-level conversational agent built based on BytePlus VeADK and AgentKit, demonstrating how to create a basic AI Agent with short-term memory.\n\n## Overview\n\nThis example is the \"Hello World\" of AgentKit, showcasing the most basic Agent building process.\n\n## Core Features\n\n- Create a simple conversational Agent\n- Use local short-term memory to maintain conversation context\n- Implement information memory in multi-turn conversations\n- Support local debugging and cloud deployment\n\n## Agent Capability\n\n```text\nUser Message\n ↓\nAgentKit Runtime\n ↓\nHello World Agent\n ├── VeADK Agent (Conversation Engine)\n ├── ShortTermMemory (Session Memory)\n └── BytePlus ModelArk (LLM)\n```\n\n### Core Components\n\n| Component | Description |\n| - | - |\n| **Agent Service** | [agent.py](https://github.com/bytedance/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/agent.py) - Main application, defines the Agent and memory components |\n| **Test Client** | [client.py](https://github.com/bytedance/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/client.py) - SSE streaming call client |\n| **Project Configuration** | [pyproject.toml](https://github.com/bytedance/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/pyproject.toml) - Dependency management (uv tool) |\n| **AgentKit Configuration** | agentkit.yaml - Cloud deployment configuration file |\n| **Short-Term Memory** | Use local backend to store session context |\n\n### Code Features\n\n**Agent Definition** ([agent.py](https://github.com/bytedance/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/agent.py#L11-L18)):\n\n```python\nagent = Agent()\nshort_term_memory = ShortTermMemory(backend=\"local\")\n\nrunner = Runner(\n agent=agent,\n short_term_memory=short_term_memory,\n app_name=app_name,\n user_id=user_id\n)\n```\n\n**Multi-turn Conversation Test** ([agent.py](https://github.com/bytedance/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/agent.py#L21-L26)):\n\n```python\nasync def main():\n response1 = await runner.run(messages=\"My name is VeADK\", session_id=session_id)\n response2 = await runner.run(messages=\"Do you remember my name?\", session_id=session_id)\n```\n\n## Directory Structure Description\n\n```bash\nhello_world/\n├── agent.py # Agent application entry point\n├── client.py # Test client (SSE streaming call)\n├── requirements.txt # Python dependency list (required for agentkit deployment)\n├── pyproject.toml # Project configuration (uv dependency management)\n├── agentkit.yaml # AgentKit deployment configuration (auto-generated after running agentkit config)\n├── Dockerfile # Docker image build file (auto-generated after running agentkit config)\n└── README.md # Project documentation\n```\n\n## Local Execution\n\n### Prerequisites\n\n**1. Activate BytePlus ModelArk Service:**\n\n- Visit the [BytePlus ModelArk Console](https://console.byteplus.com/ark/region:ark+ap-southeast-1/overview)\n- Activate the model service\n\n**2. Obtain BytePlus Access Credentials:**\n\n- Refer to the [User Guide](https://docs.byteplus.com/en/docs/data-intelligence/reference-openapi-ak-sk-authentication) to get AK/SK\n\n### Dependency Installation\n\n#### 1. Install uv Package Manager\n\n```bash\n# macOS / Linux (official installation script)\ncurl -LsSf https://astral.sh/uv/install.sh | sh\n\n# Or use Homebrew (macOS)\nbrew install uv\n```\n\n#### 2. Initialize Project Dependencies\n\n```bash\n# Enter the project directory\ncd python/01-tutorials/01-agentkit-runtime/hello_world\n```\n\nUse the `uv` tool to install the project dependencies:\n\n```bash\n# If you don't have a `uv` virtual environment, you can create one first\nuv venv --python 3.12\n\n# Use `pyproject.toml` to manage dependencies\nuv sync --index-url https://pypi.tuna.tsinghua.edu.cn/simple\n\n# Activate the virtual environment\nsource .venv/bin/activate\n```\n\n### Environment Preparation\n\n```bash\n# BytePlus ModelArk model name\nexport MODEL_AGENT_NAME=deepseek-v4-pro-260425\n\n# BytePlus Access Credentials (required)\nexport BYTEPLUS_ACCESS_KEY=\nexport BYTEPLUS_SECRET_KEY=\n```\n\n### Debugging Methods\n\n#### Method 1: Use VeADK Web Debugging Interface\n\n```bash\n# Go to the parent directory\ncd python/01-tutorials/01-agentkit-runtime\n\n# Start the VeADK Web interface\nveadk web --port 8080\n\n# Access in your browser: http://127.0.0.1:8080\n```\n\nThe web interface provides a graphical conversation testing environment, supporting real-time viewing of message flows and debugging information.\n\n#### Method 2: Command Line Testing\n\n```bash\ncd python/01-tutorials/01-agentkit-runtime/hello_world\n\n# Start the Agent service\nuv run agent.py\n# The service will listen on http://0.0.0.0:8000\n\n# Open a new terminal and run the test client\n# You need to edit client.py and change the base_url and api_key on lines 14 and 15 to the runtime_endpoint and runtime_apikey fields generated in agentkit.yaml\nuv run client.py\n```\n\n**Execution Effect**:\n\n```bash\n[create session] Response from server: {\"session_id\": \"agentkit_session\"}\n[run agent] Event from server:\ndata: {\"event\":\"on_agent_start\",...}\ndata: {\"event\":\"on_llm_chunk\",\"data\":{\"content\":\"Hello VeADK! Nice to meet you.\"}}\ndata: {\"event\":\"on_llm_chunk\",\"data\":{\"content\":\"Of course I remember, your name is VeADK.\"}}\n```\n\n## AgentKit Deployment\n\n### Prerequisites\n\n**Important Note**: Before running this example, please visit the [AgentKit Console Authorization Page](https://console.byteplus.com/agentkit/auth) to authorize all dependent services to ensure the case can be executed normally.\n\n**1. Activate BytePlus ModelArk Service:**\n\n- Visit the [BytePlus ModelArk Console](https://console.byteplus.com/ark/region:ark+ap-southeast-1/overview)\n- Activate the model service\n\n**2. Obtain BytePlus Access Credentials:**\n\n- Refer to the [User Guide](https://docs.byteplus.com/en/docs/data-intelligence/reference-openapi-ak-sk-authentication) to get AK/SK\n\n### AgentKit Cloud Deployment\n\n```bash\ncd python/01-tutorials/01-agentkit-runtime/hello_world\n\n# Configure deployment parameters\nagentkit config\n\n# Start the cloud service\nagentkit launch\n\n# Test the deployed Agent\nagentkit invoke 'who r u'\n\n# Or use client.py to connect to the cloud service\n# You need to edit client.py and change the base_url and api_key on lines 14 and 15 to the runtime_endpoint and runtime_apikey fields generated in agentkit.yaml\nuv run client.py\n```\n\n## Example Prompts\n\n### Basic Conversation Test\n\n**Test Short-Term Memory**:\n\n```text\nUser: My name is VeADK\nAgent: Hello VeADK! Nice to meet you.\n\nUser: Do you remember my name?\nAgent: Of course I remember, your name is VeADK.\n```\n\n### More Test Scenarios\n\n**Test Information Memory**:\n\n```text\nUser: I am 25 years old and I like programming\nAgent: Got it! You are 25 years old and you like programming, that's a great hobby.\n\nUser: How old am I? What are my hobbies?\nAgent: You are 25 years old and you like programming.\n```\n\n**Test Context Association**:\n\n```text\nUser: I live in Beijing and work at an internet company\nAgent: Understood, you work in Beijing at an internet company.\n\nUser: Do you know my basic information?\nAgent: Yes, your name is VeADK, you are 25 years old, you like programming, and you work at an internet company in Beijing.\n```\n\n## Effect Display\n\n## Technical Points\n\n### Short-Term Memory\n\n- **Storage Method**: Local memory (`backend=\"local\"`)\n- **Scope**: All conversations within a single session_id\n- **Lifecycle**: Cleared after process restart\n- **Applicable Scenarios**: Development and debugging, single-machine deployment\n\n### Multi-turn Conversation\n\n- Associate the same conversation through `session_id`\n- Automatically load historical messages with each call\n- The Agent understands the user's intent based on the context\n\n### AgentKit Integration\n\n```python\nfrom agentkit.apps import AgentkitAgentServerApp\n\nagent_server_app = AgentkitAgentServerApp(\n agent=agent,\n short_term_memory=short_term_memory,\n)\n```\n\n## FAQ\n\nNone.\n\n## References\n\n- [VeADK Official Documentation](https://volcengine.github.io/veadk-python/)\n- [AgentKit Development Guide](https://volcengine.github.io/agentkit-sdk-python/)\n- [BytePlus ModelArk Service](https://console.byteplus.com/ark/region:ark+ap-southeast-1/overview)\n\n## Code License\n\nThis project follows the Apache 2.0 License\n"}, "f24bb0524ed0cee0368a19a38341db371274516c": {"t": 1785771747.3752365, "n": 8474, "h": "b0f767c6356105e0", "c": "# Hello World - The Simplest Chat Agent\n\nThis is an entry-level conversational agent built based on BytePlus VeADK and AgentKit, demonstrating how to create a basic AI Agent with short-term memory.\n\n## Overview\n\nThis example is the \"Hello World\" of AgentKit, showcasing the most basic Agent building process.\n\n## Core Features\n\n- Create a simple conversational Agent\n- Use local short-term memory to maintain conversation context\n- Implement information memory in multi-turn conversations\n- Support local debugging and cloud deployment\n\n## Agent Capability\n\n```text\nUser Message\n ↓\nAgentKit Runtime\n ↓\nHello World Agent\n ├── VeADK Agent (Conversation Engine)\n ├── ShortTermMemory (Session Memory)\n └── BytePlus Model Ark (LLM)\n```\n\n### Core Components\n\n| Component | Description |\n| - | - |\n| **Agent Service** | [agent.py](https://github.com/bytedance/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/agent.py) - Main application, defines the Agent and memory components |\n| **Test Client** | [client.py](https://github.com/bytedance/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/client.py) - SSE streaming call client |\n| **Project Configuration** | [pyproject.toml](https://github.com/bytedance/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/pyproject.toml) - Dependency management (uv tool) |\n| **AgentKit Configuration** | agentkit.yaml - Cloud deployment configuration file |\n| **Short-Term Memory** | Use local backend to store session context |\n\n### Code Features\n\n**Agent Definition** ([agent.py](https://github.com/bytedance/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/agent.py#L11-L18)):\n\n```python\nagent = Agent()\nshort_term_memory = ShortTermMemory(backend=\"local\")\n\nrunner = Runner(\n agent=agent,\n short_term_memory=short_term_memory,\n app_name=app_name,\n user_id=user_id\n)\n```\n\n**Multi-turn Conversation Test** ([agent.py](https://github.com/bytedance/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/agent.py#L21-L26)):\n\n```python\nasync def main():\n response1 = await runner.run(messages=\"My name is VeADK\", session_id=session_id)\n response2 = await runner.run(messages=\"Do you remember my name?\", session_id=session_id)\n```\n\n## Directory Structure Description\n\n```bash\nhello_world/\n├── agent.py # Agent application entry point\n├── client.py # Test client (SSE streaming call)\n├── requirements.txt # Python dependency list (required for agentkit deployment)\n├── pyproject.toml # Project configuration (uv dependency management)\n├── agentkit.yaml # AgentKit deployment configuration (auto-generated after running agentkit config)\n├── Dockerfile # Docker image build file (auto-generated after running agentkit config)\n└── README.md # Project documentation\n```\n\n## Local Execution\n\n### Prerequisites\n\n**1. Activate BytePlus Model Ark Service:**\n\n- Visit the [BytePlus Model Ark Console](https://console.byteplus.com/ark/region:ark+ap-southeast-1/overview)\n- Activate the model service\n\n**2. Obtain BytePlus Access Credentials:**\n\n- Refer to the [User Guide](https://docs.byteplus.com/en/docs/data-intelligence/reference-openapi-ak-sk-authentication) to get AK/SK\n\n### Dependency Installation\n\n#### 1. Install uv Package Manager\n\n```bash\n# macOS / Linux (official installation script)\ncurl -LsSf https://astral.sh/uv/install.sh | sh\n\n# Or use Homebrew (macOS)\nbrew install uv\n```\n\n#### 2. Initialize Project Dependencies\n\n```bash\n# Enter the project directory\ncd python/01-tutorials/01-agentkit-runtime/hello_world\n```\n\nUse the `uv` tool to install the project dependencies:\n\n```bash\n# If you don't have a `uv` virtual environment, you can create one first\nuv venv --python 3.12\n\n# Use `pyproject.toml` to manage dependencies\nuv sync --index-url https://pypi.tuna.tsinghua.edu.cn/simple\n\n# Activate the virtual environment\nsource .venv/bin/activate\n```\n\n### Environment Preparation\n\n```bash\n# BytePlus Model Ark Model Name\nexport MODEL_AGENT_NAME=deepseek-v4-pro-260425\n\n# BytePlus Access Credentials (required)\nexport BYTEPLUS_ACCESS_KEY=\nexport BYTEPLUS_SECRET_KEY=\n```\n\n### Debugging Methods\n\n#### Method 1: Use VeADK Web Debugging Interface\n\n```bash\n# Go to the parent directory\ncd python/01-tutorials/01-agentkit-runtime\n\n# Start the VeADK Web interface\nveadk web --port 8080\n\n# Access in your browser: http://127.0.0.1:8080\n```\n\nThe web interface provides a graphical conversation testing environment, supporting real-time viewing of message flows and debugging information.\n\n#### Method 2: Command Line Testing\n\n```bash\ncd python/01-tutorials/01-agentkit-runtime/hello_world\n\n# Start the Agent service\nuv run agent.py\n# The service will listen on http://0.0.0.0:8000\n\n# Open a new terminal and run the test client\n# You need to edit client.py and change the base_url and api_key on lines 14 and 15 to the runtime_endpoint and runtime_apikey fields generated in agentkit.yaml\nuv run client.py\n```\n\n**Execution Effect**:\n\n```bash\n[create session] Response from server: {\"session_id\": \"agentkit_session\"}\n[run agent] Event from server:\ndata: {\"event\":\"on_agent_start\",...}\ndata: {\"event\":\"on_llm_chunk\",\"data\":{\"content\":\"Hello VeADK! Nice to meet you.\"}}\ndata: {\"event\":\"on_llm_chunk\",\"data\":{\"content\":\"Of course I remember, your name is VeADK.\"}}\n```\n\n## AgentKit Deployment\n\n### Prerequisites\n\n**Important Note**: Before running this example, please visit the [AgentKit Console Authorization Page](https://console.byteplus.com/agentkit/auth) to authorize all dependent services to ensure the case can be executed normally.\n\n**1. Activate BytePlus Model Ark Service:**\n\n- Visit the [BytePlus Model Ark Console](https://console.byteplus.com/ark/region:ark+ap-southeast-1/overview)\n- Activate the model service\n\n**2. Obtain BytePlus Access Credentials:**\n\n- Refer to the [User Guide](https://docs.byteplus.com/en/docs/data-intelligence/reference-openapi-ak-sk-authentication) to get AK/SK\n\n### AgentKit Cloud Deployment\n\n```bash\ncd python/01-tutorials/01-agentkit-runtime/hello_world\n\n# Configure deployment parameters\nagentkit config\n\n# Start the cloud service\nagentkit launch\n\n# Test the deployed Agent\nagentkit invoke 'who r u'\n\n# Or use client.py to connect to the cloud service\n# You need to edit client.py and change the base_url and api_key on lines 14 and 15 to the runtime_endpoint and runtime_apikey fields generated in agentkit.yaml\nuv run client.py\n```\n\n## Example Prompts\n\n### Basic Conversation Test\n\n**Test Short-Term Memory**:\n\n```text\nUser: My name is VeADK\nAgent: Hello VeADK! Nice to meet you.\n\nUser: Do you remember my name?\nAgent: Of course I remember, your name is VeADK.\n```\n\n### More Test Scenarios\n\n**Test Information Memory**:\n\n```text\nUser: I am 25 years old and I like programming\nAgent: Got it! You are 25 years old and you like programming, that's a great hobby.\n\nUser: How old am I? What are my hobbies?\nAgent: You are 25 years old and you like programming.\n```\n\n**Test Context Association**:\n\n```text\nUser: I live in Beijing and work at an internet company\nAgent: Understood, you work in Beijing at an internet company.\n\nUser: Do you know my basic information?\nAgent: Yes, your name is VeADK, you are 25 years old, you like programming, and you work at an internet company in Beijing.\n```\n\n## Effect Display\n\n## Technical Points\n\n### Short-Term Memory\n\n- **Storage Method**: Local memory (`backend=\"local\"`)\n- **Scope**: All conversations within a single session_id\n- **Lifecycle**: Cleared after process restart\n- **Applicable Scenarios**: Development and debugging, single-machine deployment\n\n### Multi-turn Conversation\n\n- Associate the same conversation through `session_id`\n- Automatically load historical messages with each call\n- The Agent understands the user's intent based on the context\n\n### AgentKit Integration\n\n```python\nfrom agentkit.apps import AgentkitAgentServerApp\n\nagent_server_app = AgentkitAgentServerApp(\n agent=agent,\n short_term_memory=short_term_memory,\n)\n```\n\n## FAQ\n\nNone.\n\n## References\n\n- [VeADK Official Documentation](https://volcengine.github.io/veadk-python/)\n- [AgentKit Development Guide](https://volcengine.github.io/agentkit-sdk-python/)\n- [BytePlus Model Ark Model Service](https://console.byteplus.com/ark/region:ark+ap-southeast-1/overview)\n\n## Code License\n\nThis project follows the Apache 2.0 License\n"}, "233dce2624c086583b9f7ca32dfb86f6bcbfe9d9": {"t": 1785771748.7385635, "n": 8472, "h": "2de50d4175015223", "c": "# Hello World - The Simplest Chat Agent\n\nThis is an entry-level conversational agent built based on BytePlus VeADK and AgentKit, demonstrating how to create a basic AI Agent with short-term memory.\n\n## Overview\n\nThis example is the \"Hello World\" of AgentKit, showcasing the most basic Agent building process.\n\n## Core Features\n\n- Create a simple conversational Agent\n- Use local short-term memory to maintain conversation context\n- Implement information memory in multi-turn conversations\n- Support local debugging and cloud deployment\n\n## Agent Capability\n\n```text\nUser Message\n ↓\nAgentKit Runtime\n ↓\nHello World Agent\n ├── VeADK Agent (Conversation Engine)\n ├── ShortTermMemory (Session Memory)\n └── BytePlus Model Ark (LLM)\n```\n\n### Core Components\n\n| Component | Description |\n| - | - |\n| **Agent Service** | [agent.py](https://github.com/bytedance/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/agent.py) - Main application, defines the Agent and memory components |\n| **Test Client** | [client.py](https://github.com/bytedance/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/client.py) - SSE streaming call client |\n| **Project Configuration** | [pyproject.toml](https://github.com/bytedance/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/pyproject.toml) - Dependency management (uv tool) |\n| **AgentKit Configuration** | agentkit.yaml - Cloud deployment configuration file |\n| **Short-Term Memory** | Use local backend to store session context |\n\n### Code Features\n\n**Agent Definition** ([agent.py](https://github.com/bytedance/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/agent.py#L11-L18)):\n\n```python\nagent = Agent()\nshort_term_memory = ShortTermMemory(backend=\"local\")\n\nrunner = Runner(\n agent=agent,\n short_term_memory=short_term_memory,\n app_name=app_name,\n user_id=user_id\n)\n```\n\n**Multi-turn Conversation Test** ([agent.py](https://github.com/bytedance/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/agent.py#L21-L26)):\n\n```python\nasync def main():\n response1 = await runner.run(messages=\"My name is VeADK\", session_id=session_id)\n response2 = await runner.run(messages=\"Do you remember my name?\", session_id=session_id)\n```\n\n## Directory Structure Description\n\n```bash\nhello_world/\n├── agent.py # Agent application entry point\n├── client.py # Test client (SSE streaming call)\n├── requirements.txt # Python dependency list (required for agentkit deployment)\n├── pyproject.toml # Project configuration (uv dependency management)\n├── agentkit.yaml # AgentKit deployment configuration (auto-generated after running agentkit config)\n├── Dockerfile # Docker image build file (auto-generated after running agentkit config)\n└── README.md # Project documentation\n```\n\n## Local Execution\n\n### Prerequisites\n\n**1. Activate BytePlus Model Ark Service:**\n\n- Visit the [BytePlus Model Ark Console](https://console.byteplus.com/ark/region:ark+ap-southeast-1/overview)\n- Activate the model service\n\n**2. Obtain BytePlus Access Credentials:**\n\n- Refer to the [User Guide](https://docs.byteplus.com/en/docs/data-intelligence/reference-openapi-ak-sk-authentication) to get AK/SK\n\n### Dependency Installation\n\n#### 1. Install uv Package Manager\n\n```bash\n# macOS / Linux (official installation script)\ncurl -LsSf https://astral.sh/uv/install.sh | sh\n\n# Or use Homebrew (macOS)\nbrew install uv\n```\n\n#### 2. Initialize Project Dependencies\n\n```bash\n# Enter the project directory\ncd python/01-tutorials/01-agentkit-runtime/hello_world\n```\n\nUse the `uv` tool to install the project dependencies:\n\n```bash\n# If you don't have a `uv` virtual environment, you can create one first\nuv venv --python 3.12\n\n# Use `pyproject.toml` to manage dependencies\nuv sync --index-url https://pypi.tuna.tsinghua.edu.cn/simple\n\n# Activate the virtual environment\nsource .venv/bin/activate\n```\n\n### Environment Preparation\n\n```bash\n# BytePlus Model Ark Model Name\nexport MODEL_AGENT_NAME=deepseek-v3-2-251201\n\n# BytePlus Access Credentials (required)\nexport BYTEPLUS_ACCESS_KEY=\nexport BYTEPLUS_SECRET_KEY=\n```\n\n### Debugging Methods\n\n#### Method 1: Use VeADK Web Debugging Interface\n\n```bash\n# Go to the parent directory\ncd python/01-tutorials/01-agentkit-runtime\n\n# Start the VeADK Web interface\nveadk web --port 8080\n\n# Access in your browser: http://127.0.0.1:8080\n```\n\nThe web interface provides a graphical conversation testing environment, supporting real-time viewing of message flows and debugging information.\n\n#### Method 2: Command Line Testing\n\n```bash\ncd python/01-tutorials/01-agentkit-runtime/hello_world\n\n# Start the Agent service\nuv run agent.py\n# The service will listen on http://0.0.0.0:8000\n\n# Open a new terminal and run the test client\n# You need to edit client.py and change the base_url and api_key on lines 14 and 15 to the runtime_endpoint and runtime_apikey fields generated in agentkit.yaml\nuv run client.py\n```\n\n**Execution Effect**:\n\n```bash\n[create session] Response from server: {\"session_id\": \"agentkit_session\"}\n[run agent] Event from server:\ndata: {\"event\":\"on_agent_start\",...}\ndata: {\"event\":\"on_llm_chunk\",\"data\":{\"content\":\"Hello VeADK! Nice to meet you.\"}}\ndata: {\"event\":\"on_llm_chunk\",\"data\":{\"content\":\"Of course I remember, your name is VeADK.\"}}\n```\n\n## AgentKit Deployment\n\n### Prerequisites\n\n**Important Note**: Before running this example, please visit the [AgentKit Console Authorization Page](https://console.byteplus.com/agentkit/auth) to authorize all dependent services to ensure the case can be executed normally.\n\n**1. Activate BytePlus Model Ark Service:**\n\n- Visit the [BytePlus Model Ark Console](https://console.byteplus.com/ark/region:ark+ap-southeast-1/overview)\n- Activate the model service\n\n**2. Obtain BytePlus Access Credentials:**\n\n- Refer to the [User Guide](https://docs.byteplus.com/en/docs/data-intelligence/reference-openapi-ak-sk-authentication) to get AK/SK\n\n### AgentKit Cloud Deployment\n\n```bash\ncd python/01-tutorials/01-agentkit-runtime/hello_world\n\n# Configure deployment parameters\nagentkit config\n\n# Start the cloud service\nagentkit launch\n\n# Test the deployed Agent\nagentkit invoke 'who r u'\n\n# Or use client.py to connect to the cloud service\n# You need to edit client.py and change the base_url and api_key on lines 14 and 15 to the runtime_endpoint and runtime_apikey fields generated in agentkit.yaml\nuv run client.py\n```\n\n## Example Prompts\n\n### Basic Conversation Test\n\n**Test Short-Term Memory**:\n\n```text\nUser: My name is VeADK\nAgent: Hello VeADK! Nice to meet you.\n\nUser: Do you remember my name?\nAgent: Of course I remember, your name is VeADK.\n```\n\n### More Test Scenarios\n\n**Test Information Memory**:\n\n```text\nUser: I am 25 years old and I like programming\nAgent: Got it! You are 25 years old and you like programming, that's a great hobby.\n\nUser: How old am I? What are my hobbies?\nAgent: You are 25 years old and you like programming.\n```\n\n**Test Context Association**:\n\n```text\nUser: I live in Beijing and work at an internet company\nAgent: Understood, you work in Beijing at an internet company.\n\nUser: Do you know my basic information?\nAgent: Yes, your name is VeADK, you are 25 years old, you like programming, and you work at an internet company in Beijing.\n```\n\n## Effect Display\n\n## Technical Points\n\n### Short-Term Memory\n\n- **Storage Method**: Local memory (`backend=\"local\"`)\n- **Scope**: All conversations within a single session_id\n- **Lifecycle**: Cleared after process restart\n- **Applicable Scenarios**: Development and debugging, single-machine deployment\n\n### Multi-turn Conversation\n\n- Associate the same conversation through `session_id`\n- Automatically load historical messages with each call\n- The Agent understands the user's intent based on the context\n\n### AgentKit Integration\n\n```python\nfrom agentkit.apps import AgentkitAgentServerApp\n\nagent_server_app = AgentkitAgentServerApp(\n agent=agent,\n short_term_memory=short_term_memory,\n)\n```\n\n## FAQ\n\nNone.\n\n## References\n\n- [VeADK Official Documentation](https://volcengine.github.io/veadk-python/)\n- [AgentKit Development Guide](https://volcengine.github.io/agentkit-sdk-python/)\n- [BytePlus Model Ark Model Service](https://console.byteplus.com/ark/region:ark+ap-southeast-1/overview)\n\n## Code License\n\nThis project follows the Apache 2.0 License\n"}, "9d574eeb18f875a5da291c74b0f479ec530537ea": {"t": 1785771750.0958302, "n": 8442, "h": "b3bc9c10ad66580a", "c": "# Hello World - The Simplest Chat Agent\n\nThis is an entry-level conversational agent built based on Volcano Engine VeADK and AgentKit, demonstrating how to create a basic AI Agent with short-term memory.\n\n## Overview\n\nThis example is the \"Hello World\" of AgentKit, showcasing the most basic Agent building process.\n\n## Core Features\n\n- Create a simple conversational Agent\n- Use local short-term memory to maintain conversation context\n- Implement information memory in multi-turn conversations\n- Support local debugging and cloud deployment\n\n## Agent Capability\n\n```text\nUser Message\n ↓\nAgentKit Runtime\n ↓\nHello World Agent\n ├── VeADK Agent (Conversation Engine)\n ├── ShortTermMemory (Session Memory)\n └── Volcano Ark Model (LLM)\n```\n\n### Core Components\n\n| Component | Description |\n| - | - |\n| **Agent Service** | [agent.py](https://github.com/volcengine/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world.py) - Main application, defines the Agent and memory components |\n| **Test Client** | [client.py](https://github.com/volcengine/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/client.py) - SSE streaming call client |\n| **Project Configuration** | [pyproject.toml](https://github.com/volcengine/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/pyproject.toml) - Dependency management (uv tool) |\n| **AgentKit Configuration** | agentkit.yaml - Cloud deployment configuration file |\n| **Short-Term Memory** | Use local backend to store session context |\n\n### Code Features\n\n**Agent Definition** ([agent.py](https://github.com/volcengine/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/agent.py#L11-L18)):\n\n```python\nagent = Agent()\nshort_term_memory = ShortTermMemory(backend=\"local\")\n\nrunner = Runner(\n agent=agent,\n short_term_memory=short_term_memory,\n app_name=app_name,\n user_id=user_id\n)\n```\n\n**Multi-turn Conversation Test** ([agent.py](https://github.com/volcengine/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/agent.py#L21-L26)):\n\n```python\nasync def main():\n response1 = await runner.run(messages=\"My name is VeADK\", session_id=session_id)\n response2 = await runner.run(messages=\"Do you remember my name?\", session_id=session_id)\n```\n\n## Directory Structure Description\n\n```bash\nhello_world/\n├── agent.py # Agent application entry point\n├── client.py # Test client (SSE streaming call)\n├── requirements.txt # Python dependency list (required for agentkit deployment)\n├── pyproject.toml # Project configuration (uv dependency management)\n├── agentkit.yaml # AgentKit deployment configuration (auto-generated after running agentkit config)\n├── Dockerfile # Docker image build file (auto-generated after running agentkit config)\n└── README.md # Project documentation\n```\n\n## Local Execution\n\n### Prerequisites\n\n**1. Activate Volcano Ark Model Service:**\n\n- Visit the [Volcano Ark Console](https://exp.volcengine.com/ark?mode=chat)\n- Activate the model service\n\n**2. Obtain Volcano Engine Access Credentials:**\n\n- Refer to the [User Guide](https://www.volcengine.com/docs/6291/65568?lang=en) to get AK/SK\n\n### Dependency Installation\n\n#### 1. Install uv Package Manager\n\n```bash\n# macOS / Linux (official installation script)\ncurl -LsSf https://astral.sh/uv/install.sh | sh\n\n# Or use Homebrew (macOS)\nbrew install uv\n```\n\n#### 2. Initialize Project Dependencies\n\n```bash\n# Enter the project directory\ncd python/01-tutorials/01-agentkit-runtime/hello_world\n```\n\nUse the `uv` tool to install the project dependencies:\n\n```bash\n# If you don't have a `uv` virtual environment, you can create one first\nuv venv --python 3.12\n\n# Use `pyproject.toml` to manage dependencies\nuv sync --index-url https://pypi.tuna.tsinghua.edu.cn/simple\n\n# Activate the virtual environment\nsource .venv/bin/activate\n```\n\n### Environment Preparation\n\n```bash\n# Volcano Ark Model Name\nexport MODEL_AGENT_NAME=deepseek-v3-2-251201\n\n# Volcano Engine Access Credentials (required)\nexport VOLCENGINE_ACCESS_KEY=\nexport VOLCENGINE_SECRET_KEY=\n```\n\n### Debugging Methods\n\n#### Method 1: Use VeADK Web Debugging Interface\n\n```bash\n# Go to the parent directory\ncd python/01-tutorials/01-agentkit-runtime\n\n# Start the VeADK Web interface\nveadk web --port 8080\n\n# Access in your browser: http://127.0.0.1:8080\n```\n\nThe web interface provides a graphical conversation testing environment, supporting real-time viewing of message flows and debugging information.\n\n#### Method 2: Command Line Testing\n\n```bash\ncd python/01-tutorials/01-agentkit-runtime/hello_world\n\n# Start the Agent service\nuv run agent.py\n# The service will listen on http://0.0.0.0:8000\n\n# Open a new terminal and run the test client\n# You need to edit client.py and change the base_url and api_key on lines 14 and 15 to the runtime_endpoint and runtime_apikey fields generated in agentkit.yaml\nuv run client.py\n```\n\n**Execution Effect**:\n\n```bash\n[create session] Response from server: {\"session_id\": \"agentkit_session\"}\n[run agent] Event from server:\ndata: {\"event\":\"on_agent_start\",...}\ndata: {\"event\":\"on_llm_chunk\",\"data\":{\"content\":\"Hello VeADK! Nice to meet you.\"}}\ndata: {\"event\":\"on_llm_chunk\",\"data\":{\"content\":\"Of course I remember, your name is VeADK.\"}}\n```\n\n## AgentKit Deployment\n\n### Prerequisites\n\n**Important Note**: Before running this example, please visit the [AgentKit Console Authorization Page](https://console.volcengine.com/agentkit/region:agentkit+cn-beijing/auth?projectName=default) to authorize all dependent services to ensure the case can be executed normally.\n\n**1. Activate Volcano Ark Model Service:**\n\n- Visit the [Volcano Ark Console](https://exp.volcengine.com/ark?mode=chat)\n- Activate the model service\n\n**2. Obtain Volcano Engine Access Credentials:**\n\n- Refer to the [User Guide](https://www.volcengine.com/docs/6291/65568?lang=en) to get AK/SK\n\n### AgentKit Cloud Deployment\n\n```bash\ncd python/01-tutorials/01-agentkit-runtime/hello_world\n\n# Configure deployment parameters\nagentkit config\n\n# Start the cloud service\nagentkit launch\n\n# Test the deployed Agent\nagentkit invoke 'who r u'\n\n# Or use client.py to connect to the cloud service\n# You need to edit client.py and change the base_url and api_key on lines 14 and 15 to the runtime_endpoint and runtime_apikey fields generated in agentkit.yaml\nuv run client.py\n```\n\n## Example Prompts\n\n### Basic Conversation Test\n\n**Test Short-Term Memory**:\n\n```text\nUser: My name is VeADK\nAgent: Hello VeADK! Nice to meet you.\n\nUser: Do you remember my name?\nAgent: Of course I remember, your name is VeADK.\n```\n\n### More Test Scenarios\n\n**Test Information Memory**:\n\n```text\nUser: I am 25 years old and I like programming\nAgent: Got it! You are 25 years old and you like programming, that's a great hobby.\n\nUser: How old am I? What are my hobbies?\nAgent: You are 25 years old and you like programming.\n```\n\n**Test Context Association**:\n\n```text\nUser: I live in Beijing and work at an internet company\nAgent: Understood, you work in Beijing at an internet company.\n\nUser: Do you know my basic information?\nAgent: Yes, your name is VeADK, you are 25 years old, you like programming, and you work at an internet company in Beijing.\n```\n\n## Effect Display\n\n## Technical Points\n\n### Short-Term Memory\n\n- **Storage Method**: Local memory (`backend=\"local\"`)\n- **Scope**: All conversations within a single session_id\n- **Lifecycle**: Cleared after process restart\n- **Applicable Scenarios**: Development and debugging, single-machine deployment\n\n### Multi-turn Conversation\n\n- Associate the same conversation through `session_id`\n- Automatically load historical messages with each call\n- The Agent understands the user's intent based on the context\n\n### AgentKit Integration\n\n```python\nfrom agentkit.apps import AgentkitAgentServerApp\n\nagent_server_app = AgentkitAgentServerApp(\n agent=agent,\n short_term_memory=short_term_memory,\n)\n```\n\n## FAQ\n\nNone.\n\n## References\n\n- [VeADK Official Documentation](https://volcengine.github.io/veadk-python/)\n- [AgentKit Development Guide](https://volcengine.github.io/agentkit-sdk-python/)\n- [Volcano Ark Model Service](https://console.volcengine.com/ark/region:ark+cn-beijing/overview?briefPage=0&briefType=introduce&type=new&projectName=default)\n\n## Code License\n\nThis project follows the Apache 2.0 License\n"}, "ecc358d7aac32aafcbd7488526130f28ce3eca6a": {"t": 1785771752.0673397, "n": 8444, "h": "24553a673adae0b3", "c": "# Hello World - The Simplest Chat Agent\n\nThis is an entry-level conversational agent built based on Volcano Engine VeADK and AgentKit, demonstrating how to create a basic AI Agent with short-term memory.\n\n## Overview\n\nThis example is the \"Hello World\" of AgentKit, showcasing the most basic Agent building process.\n\n## Core Features\n\n- Create a simple conversational Agent\n- Use local short-term memory to maintain conversation context\n- Implement information memory in multi-turn conversations\n- Support local debugging and cloud deployment\n\n## Agent Capability\n\n```text\nUser Message\n ↓\nAgentKit Runtime\n ↓\nHello World Agent\n ├── VeADK Agent (Conversation Engine)\n ├── ShortTermMemory (Session Memory)\n └── Volcano Ark Model (LLM)\n```\n\n### Core Components\n\n| Component | Description |\n| - | - |\n| **Agent Service** | [agent.py](https://github.com/volcengine/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world.py) - Main application, defines the Agent and memory components |\n| **Test Client** | [client.py](https://github.com/volcengine/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/client.py) - SSE streaming call client |\n| **Project Configuration** | [pyproject.toml](https://github.com/volcengine/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/pyproject.toml) - Dependency management (uv tool) |\n| **AgentKit Configuration** | agentkit.yaml - Cloud deployment configuration file |\n| **Short-Term Memory** | Use local backend to store session context |\n\n### Code Features\n\n**Agent Definition** ([agent.py](https://github.com/volcengine/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/agent.py#L11-L18)):\n\n```python\nagent = Agent()\nshort_term_memory = ShortTermMemory(backend=\"local\")\n\nrunner = Runner(\n agent=agent,\n short_term_memory=short_term_memory,\n app_name=app_name,\n user_id=user_id\n)\n```\n\n**Multi-turn Conversation Test** ([agent.py](https://github.com/volcengine/agentkit-samples/blob/main/python/01-tutorials/01-agentkit-runtime/hello_world/agent.py#L21-L26)):\n\n```python\nasync def main():\n response1 = await runner.run(messages=\"My name is VeADK\", session_id=session_id)\n response2 = await runner.run(messages=\"Do you remember my name?\", session_id=session_id)\n```\n\n## Directory Structure Description\n\n```bash\nhello_world/\n├── agent.py # Agent application entry point\n├── client.py # Test client (SSE streaming call)\n├── requirements.txt # Python dependency list (required for agentkit deployment)\n├── pyproject.toml # Project configuration (uv dependency management)\n├── agentkit.yaml # AgentKit deployment configuration (auto-generated after running agentkit config)\n├── Dockerfile # Docker image build file (auto-generated after running agentkit config)\n└── README.md # Project documentation\n```\n\n## Local Execution\n\n### Prerequisites\n\n**1. Activate Volcano Ark Model Service:**\n\n- Visit the [Volcano Ark Console](https://exp.volcengine.com/ark?mode=chat)\n- Activate the model service\n\n**2. Obtain Volcano Engine Access Credentials:**\n\n- Refer to the [User Guide](https://www.volcengine.com/docs/6291/65568?lang=en) to get AK/SK\n\n### Dependency Installation\n\n#### 1. Install uv Package Manager\n\n```bash\n# macOS / Linux (official installation script)\ncurl -LsSf https://astral.sh/uv/install.sh | sh\n\n# Or use Homebrew (macOS)\nbrew install uv\n```\n\n#### 2. Initialize Project Dependencies\n\n```bash\n# Enter the project directory\ncd python/01-tutorials/01-agentkit-runtime/hello_world\n```\n\nUse the `uv` tool to install the project dependencies:\n\n```bash\n# If you don't have a `uv` virtual environment, you can create one first\nuv venv --python 3.12\n\n# Use `pyproject.toml` to manage dependencies\nuv sync --index-url https://pypi.tuna.tsinghua.edu.cn/simple\n\n# Activate the virtual environment\nsource .venv/bin/activate\n```\n\n### Environment Preparation\n\n```bash\n# Volcano Ark Model Name\nexport MODEL_AGENT_NAME=doubao-seed-1-6-251015\n\n# Volcano Engine Access Credentials (required)\nexport VOLCENGINE_ACCESS_KEY=\nexport VOLCENGINE_SECRET_KEY=\n```\n\n### Debugging Methods\n\n#### Method 1: Use VeADK Web Debugging Interface\n\n```bash\n# Go to the parent directory\ncd python/01-tutorials/01-agentkit-runtime\n\n# Start the VeADK Web interface\nveadk web --port 8080\n\n# Access in your browser: http://127.0.0.1:8080\n```\n\nThe web interface provides a graphical conversation testing environment, supporting real-time viewing of message flows and debugging information.\n\n#### Method 2: Command Line Testing\n\n```bash\ncd python/01-tutorials/01-agentkit-runtime/hello_world\n\n# Start the Agent service\nuv run agent.py\n# The service will listen on http://0.0.0.0:8000\n\n# Open a new terminal and run the test client\n# You need to edit client.py and change the base_url and api_key on lines 14 and 15 to the runtime_endpoint and runtime_apikey fields generated in agentkit.yaml\nuv run client.py\n```\n\n**Execution Effect**:\n\n```bash\n[create session] Response from server: {\"session_id\": \"agentkit_session\"}\n[run agent] Event from server:\ndata: {\"event\":\"on_agent_start\",...}\ndata: {\"event\":\"on_llm_chunk\",\"data\":{\"content\":\"Hello VeADK! Nice to meet you.\"}}\ndata: {\"event\":\"on_llm_chunk\",\"data\":{\"content\":\"Of course I remember, your name is VeADK.\"}}\n```\n\n## AgentKit Deployment\n\n### Prerequisites\n\n**Important Note**: Before running this example, please visit the [AgentKit Console Authorization Page](https://console.volcengine.com/agentkit/region:agentkit+cn-beijing/auth?projectName=default) to authorize all dependent services to ensure the case can be executed normally.\n\n**1. Activate Volcano Ark Model Service:**\n\n- Visit the [Volcano Ark Console](https://exp.volcengine.com/ark?mode=chat)\n- Activate the model service\n\n**2. Obtain Volcano Engine Access Credentials:**\n\n- Refer to the [User Guide](https://www.volcengine.com/docs/6291/65568?lang=en) to get AK/SK\n\n### AgentKit Cloud Deployment\n\n```bash\ncd python/01-tutorials/01-agentkit-runtime/hello_world\n\n# Configure deployment parameters\nagentkit config\n\n# Start the cloud service\nagentkit launch\n\n# Test the deployed Agent\nagentkit invoke 'who r u'\n\n# Or use client.py to connect to the cloud service\n# You need to edit client.py and change the base_url and api_key on lines 14 and 15 to the runtime_endpoint and runtime_apikey fields generated in agentkit.yaml\nuv run client.py\n```\n\n## Example Prompts\n\n### Basic Conversation Test\n\n**Test Short-Term Memory**:\n\n```text\nUser: My name is VeADK\nAgent: Hello VeADK! Nice to meet you.\n\nUser: Do you remember my name?\nAgent: Of course I remember, your name is VeADK.\n```\n\n### More Test Scenarios\n\n**Test Information Memory**:\n\n```text\nUser: I am 25 years old and I like programming\nAgent: Got it! You are 25 years old and you like programming, that's a great hobby.\n\nUser: How old am I? What are my hobbies?\nAgent: You are 25 years old and you like programming.\n```\n\n**Test Context Association**:\n\n```text\nUser: I live in Beijing and work at an internet company\nAgent: Understood, you work in Beijing at an internet company.\n\nUser: Do you know my basic information?\nAgent: Yes, your name is VeADK, you are 25 years old, you like programming, and you work at an internet company in Beijing.\n```\n\n## Effect Display\n\n## Technical Points\n\n### Short-Term Memory\n\n- **Storage Method**: Local memory (`backend=\"local\"`)\n- **Scope**: All conversations within a single session_id\n- **Lifecycle**: Cleared after process restart\n- **Applicable Scenarios**: Development and debugging, single-machine deployment\n\n### Multi-turn Conversation\n\n- Associate the same conversation through `session_id`\n- Automatically load historical messages with each call\n- The Agent understands the user's intent based on the context\n\n### AgentKit Integration\n\n```python\nfrom agentkit.apps import AgentkitAgentServerApp\n\nagent_server_app = AgentkitAgentServerApp(\n agent=agent,\n short_term_memory=short_term_memory,\n)\n```\n\n## FAQ\n\nNone.\n\n## References\n\n- [VeADK Official Documentation](https://volcengine.github.io/veadk-python/)\n- [AgentKit Development Guide](https://volcengine.github.io/agentkit-sdk-python/)\n- [Volcano Ark Model Service](https://console.volcengine.com/ark/region:ark+cn-beijing/overview?briefPage=0&briefType=introduce&type=new&projectName=default)\n\n## Code License\n\nThis project follows the Apache 2.0 License\n"}}}}