Skip to content

fix(agent): replace hardcoded agent name with config-driven value#4140

Merged
xieyxclack merged 1 commit into
agentscope-ai:mainfrom
xieyxclack:xieyx/fix/agent_name
May 9, 2026
Merged

fix(agent): replace hardcoded agent name with config-driven value#4140
xieyxclack merged 1 commit into
agentscope-ai:mainfrom
xieyxclack:xieyx/fix/agent_name

Conversation

@xieyxclack
Copy link
Copy Markdown
Member

Description

  • Add AgentRunner.agent_name property
  • Replace hardcoded "Friday" references across runner, command_dispatch, daemon_commands, mission_dispatch, and react_agent
  • Fallback to "QwenPaw" when the config name is empty or unreadable

Fixes #4099

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Refactoring

Component(s) Affected

  • Core / Backend (app, agents, config, providers, utils, local_models)
  • Console (frontend web UI)
  • Channels (DingTalk, Feishu, QQ, Discord, iMessage, etc.)
  • Skills
  • CLI
  • Documentation (website)
  • Tests
  • CI/CD
  • Scripts / Deploy

Checklist

  • I ran pre-commit run --all-files locally and it passes
  • If pre-commit auto-fixed files, I committed those changes and reran checks
  • I ran tests locally (pytest or as relevant) and they pass
  • Documentation updated (if needed)
  • Ready for review

For Channel Changes (DingTalk, Feishu, QQ, Console, etc.)

  • I ran ./scripts/check-channels.sh (or ./scripts/check-channels.sh --changed) and it passes
  • Contract test exists in tests/contract/channels/test_<channel>_contract.py (REQUIRED)
  • Contract test implements create_instance() with proper channel initialization
  • All 19 contract verification points pass (see tests/contract/channels/__init__.py)
  • Optional: Unit tests in tests/unit/channels/test_<channel>.py for complex internal logic

Testing

[How to test these changes]

Local Verification Evidence

pre-commit run --all-files
# paste summary result

pytest
# paste summary result

Additional Notes

[Optional: any other context]

@github-project-automation github-project-automation Bot moved this to Todo in QwenPaw May 9, 2026
@xieyxclack xieyxclack temporarily deployed to maintainer-approved May 9, 2026 02:53 — with GitHub Actions Inactive
@xieyxclack xieyxclack requested a review from zhijianma May 9, 2026 02:53
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 9, 2026

Welcome to QwenPaw! 🐾

Hi @xieyxclack, this is your 136th Pull Request.

🙌 Join Developer Community

Thanks so much for your contribution! We'd love to invite you to join the official QwenPaw developer group! You can find the Discord and DingTalk group links under the "Developer Community" section on our docs page:
https://qwenpaw.agentscope.io/docs/community

We truly appreciate your enthusiasm—and look forward to your future contributions! 😊

We'll review your PR soon.

@xieyxclack xieyxclack merged commit 5c1cd03 into agentscope-ai:main May 9, 2026
19 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in QwenPaw May 9, 2026
@xieyxclack xieyxclack deleted the xieyx/fix/agent_name branch May 9, 2026 03:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Bug] 会话初始化中的 agent name "Friday" 被硬编码,应从 agent.json 配置读取

2 participants