Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
ca9ed62
feat: add Chinese localization for tool descriptions
Feb 14, 2026
0cb51f8
feat: add init_param_descriptions with i18n for exa_search_tool
Feb 14, 2026
c842f96
fix: add services module mock to fix test_add_tool_field test
Feb 14, 2026
762019b
fix: fix TypeScript type error in ToolTestPanel.tsx
Feb 14, 2026
8a7cf06
test: add tests for get_local_tools_description_zh function
Feb 14, 2026
774a32b
test: add tests for get_local_tools_description_zh i18n function
Feb 14, 2026
f9c1dbe
test: add tests for add_tool_field description_zh i18n merge logic
Feb 14, 2026
8601b99
test: fix test imports for get_local_tools_description_zh
Feb 14, 2026
c8d5efe
implement DashScope and TokenPony model providers
wadecrack Mar 9, 2026
609f8ea
bugfix for provider model add (added model can't be displayed when ba…
wadecrack Mar 9, 2026
e28350c
implement DashScope and TokenPony model providers
wadecrack Mar 9, 2026
674cda3
bugfix for provider model add (added model can't be displayed when ba…
wadecrack Mar 9, 2026
fa516a7
Merge remote-tracking branch 'origin/release/v1.8.0.1' into gerui-bugfix
Mar 10, 2026
9992be2
Merge remote-tracking branch 'origin/develop' into gerui-bugfix
Mar 10, 2026
ec3aa12
fix: 解决循环导入问题并清理工具参数描述
Mar 10, 2026
8447f08
fix: remove duplicate period in get_email_tool description_zh
Mar 10, 2026
a240575
fix: restore MCP transport functions and authorization support
Mar 11, 2026
b37c5a3
test: fix mock paths for get_local_tools_classes and get_local_tools_…
Mar 11, 2026
f8e8d4e
fix: restore MCP tool unique key logic and fix test mock paths
Mar 11, 2026
54eba07
fix: add missing ToolSourceEnum import and restore create_or_update_t…
Mar 11, 2026
41efd51
test: add tests for description_zh coverage
Mar 11, 2026
2d234aa
test: fix mock paths and async tests for description_zh coverage
Mar 11, 2026
fe803fb
fix: add init_param_descriptions fallback for param description_zh
Mar 11, 2026
f31c503
use local image for vlm model connectivity test
wadecrack Mar 12, 2026
3f4b148
Merge branch 'xq/bugfix_develop_model_providers' into xq/develop_mode…
wadecrack Mar 12, 2026
d6db634
improve codecov
wadecrack Mar 12, 2026
bafe14c
Merge branch 'xq/bugfix_develop_model_providers' into xq/develop_mode…
wadecrack Mar 12, 2026
e296aa3
improve codecov
wadecrack Mar 12, 2026
35c007f
improve codecov
wadecrack Mar 12, 2026
35472e8
improve codecov
wadecrack Mar 12, 2026
fb0c8aa
improve codecov
wadecrack Mar 12, 2026
73628ad
improve codecov
wadecrack Mar 12, 2026
2410a9d
improve codecov
wadecrack Mar 12, 2026
ab806c6
Add user testimonials to memorial wall
SHEN-e929 Mar 12, 2026
93bd64e
improve codecov
wadecrack Mar 13, 2026
8a80777
improve codecov
wadecrack Mar 13, 2026
8ba0393
合并 scroll useEffects
xuyaqist Mar 12, 2026
5746247
创建 frontend/styles/chat.css,将 taskWindow.tsx 和 chatStreamMain.tsx 中的 …
xuyaqist Mar 12, 2026
03b0acb
chatRightPanel.tsx: SearchResultItem 移到模块作用域,避免每次 render 重新创建组件定义
xuyaqist Mar 12, 2026
bfd823d
✨ Add ModelEngine integration guide in English and Chinese, and updat…
Zhi-a Mar 16, 2026
cb54e5a
refactor: move extractMsgFromHistoryResponse to lib/chatMessageExtrac…
xuyaqist Mar 16, 2026
4c77f40
Update opensource-memorial-wall.md
BigBen0724 Mar 16, 2026
b3c4598
Refactor: Reorganize utility functions by moving them from lib to app…
xuyaqist Mar 16, 2026
da7e035
recover deleted file
xuyaqist Mar 16, 2026
6aabcda
Update opensource-memorial-wall.md
whale0110-bit Mar 16, 2026
ce367b0
✨ Enhance knowledge base creation: Add support for specifying embeddi…
Zhi-a Mar 17, 2026
0c70983
Potential fix for pull request finding
xuyaqist Mar 18, 2026
db8447c
feat: add vendor icons to config footer and relocate test assets
wadecrack Mar 18, 2026
186443d
feat: add vendor icons to config footer and relocate test assets
wadecrack Mar 18, 2026
08813bc
✨ Enhance KnowledgeBaseSearchTool: Add index_names parameter to forwa…
Zhi-a Mar 19, 2026
a55aafd
📝 Add ModelEngine integration guide in English and Chinese, and updat…
Zhi-a Mar 19, 2026
93862fa
Update antd version & remove deprecated attribute
xuyaqist Mar 19, 2026
afd1887
Add update dependencies git log
xuyaqist Mar 19, 2026
7e715a6
Potential fix for pull request finding
xuyaqist Mar 19, 2026
ed8478b
Merge branch 'xyq/bugfix_frontend' of https://github.com/ModelEngine-…
xuyaqist Mar 19, 2026
f3a6a6e
📦 Update antd version & remove deprecated attribute
WMC001 Mar 19, 2026
cd1feb5
🐛 bugfix: model status sync, SiliconFlow logic alignment, and VLM con…
WMC001 Mar 19, 2026
e7f2c75
Update opensource-memorial-wall.md from BigBen0724/patch-1
WMC001 Mar 19, 2026
982335e
✨ Support skill framework in the backend
Jasonxia007 Mar 19, 2026
ab77fa4
✨ Support skill framework in the backend
Jasonxia007 Mar 20, 2026
2ce4d57
delete unused code
xuyaqist Mar 23, 2026
7d66799
✨ Add model mismatch confirmation modal in KnowledgeBaseSelectorModal…
Zhi-a Mar 24, 2026
3884179
Modify Nexent License from Apache with extra conditions to pure MIT
SimengBian Mar 24, 2026
004ee32
✨ Nexent Kubernetes Deployment Implementation #1853
YehongPan Mar 24, 2026
9c1689f
✨ Add new skill file access RESTful API
Jasonxia007 Mar 25, 2026
b2f7c5b
✨ Add new skill file access RESTful API
Jasonxia007 Mar 25, 2026
6a799f1
✨ New builtin tools (write_skill_file, read_skill_config) available f…
Jasonxia007 Mar 26, 2026
d7cf442
feat: add skill management, tenant SkillList UI, and params DB/YAML h…
xuyaqist Mar 26, 2026
7fa6a61
✨ Nexent Kubernetes Deployment Implementation - part 2 #1853
YehongPan Mar 26, 2026
36bd301
✨ Frontend supports agent skill selection, creation and upload
Jasonxia007 Mar 26, 2026
80d02cf
✨ Frontend supports agent skill selection, creation and upload
Jasonxia007 Mar 26, 2026
b27d258
✨ Frontend typo error fixed
Jasonxia007 Mar 27, 2026
3651402
♻️ Remove duplicate api
Jasonxia007 Mar 27, 2026
534ff79
Merge branch 'develop' into patch-1
WMC001 Mar 27, 2026
99c7d24
Add user testimonials to memorial wall from SHEN-e929/patch-1
WMC001 Mar 27, 2026
0853ad5
📝 Add ModelEngine integration guide in English and Chinese, and updat…
WMC001 Mar 27, 2026
3eddd99
update docs and bugfix
Mar 27, 2026
7f839f3
♻️ Refactor: delete unused code & improve component render action
WMC001 Mar 27, 2026
74ebe05
Merge branch 'develop' into patch-2
WMC001 Mar 27, 2026
b691e4b
Update opensource-memorial-wall.md
WMC001 Mar 27, 2026
a008bc9
Merge pull request #2705 from ModelEngine-Group/develop_kb_support_se…
WMC001 Mar 27, 2026
5847a26
🔨Update License
WMC001 Mar 27, 2026
2dd57e3
✨ Add Chinese localization for tool descriptions
WMC001 Mar 27, 2026
a525bd4
✨ Nexent Kubernetes Deployment Implementation #1853
WMC001 Mar 27, 2026
8b848e1
Change provideRunSummary param from read-only to editable
SimengBian Mar 27, 2026
f074963
Merge branch 'develop' of https://github.com/ModelEngine-Group/nexent…
Zhi-a Mar 27, 2026
c8d69ca
✨ Change provideRunSummary param from read-only to editable
WMC001 Mar 27, 2026
f22cd91
Merge pull request #2712 from ModelEngine-Group/develop_fix_kb_index_…
WMC001 Mar 27, 2026
bc9005e
Update docs to illustrate agent params including provideRunSummary
SimengBian Mar 27, 2026
98fa374
update skill params sql
xuyaqist Mar 27, 2026
d60ef9c
Merge remote-tracking branch 'origin/develop' into xyc/dev_skills
Jasonxia007 Mar 27, 2026
89d86ee
♻️ Merge redundant skill_repository into skill_db.py
Jasonxia007 Mar 27, 2026
617eb4a
📝 Update docs to illustrate agent params including provideRunSummary
WMC001 Mar 27, 2026
43a84ef
✨ Kubernetes Helm deployment directory reconstruction #2722
YehongPan Mar 27, 2026
ca0ba2c
✨ Kubernetes Helm deployment directory reconstruction #2722
YehongPan Mar 27, 2026
96c1cc6
✨ Kubernetes Helm deployment directory reconstruction #2722
WMC001 Mar 27, 2026
ea667fb
add fetch skill list
xuyaqist Mar 27, 2026
253398b
Fetch newest config after save & Ensure the order of the form fields …
xuyaqist Mar 27, 2026
7b24a34
Merge remote-tracking branch 'origin/develop' into xyc/dev_skills
Jasonxia007 Mar 28, 2026
f34e13e
♻️ Add fallback regex matching logic when analyzing upload files
Jasonxia007 Mar 28, 2026
563a73a
✨ Update pagination logic in DataMateClient and adjust related parame…
Zhi-a Mar 28, 2026
136e4b0
Merge pull request #2735 from ModelEngine-Group/develop_fix_kb_cannot…
WMC001 Mar 28, 2026
b044dcf
Update readme to illustrate harness-engineering
SimengBian Mar 28, 2026
eb4882a
📝 Update readme to illustrate harness-engineering
WMC001 Mar 28, 2026
421f780
Bugfix: exit create mode and select newly created agent after saving
xuyaqist Mar 28, 2026
7123349
🐛 Bugfix: exit create mode and select newly created agent after saving
WMC001 Mar 28, 2026
1797e39
🧪 Add test files
Jasonxia007 Mar 28, 2026
d464053
Merge remote-tracking branch 'origin/develop' into xyc/dev_skills
Jasonxia007 Mar 28, 2026
a8b0055
Update skill_app.py
Jasonxia007 Mar 28, 2026
861dde9
Update skill_app.py
Jasonxia007 Mar 28, 2026
8030e15
🧪 Add test files
Jasonxia007 Mar 28, 2026
3988f7e
🧪 Add test files
Jasonxia007 Mar 28, 2026
bb93106
Merge pull request #2731 from ModelEngine-Group/xyc/dev_skills
WMC001 Mar 28, 2026
8d8f418
Merge branch 'main' into release/v2.0.0
WMC001 Mar 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ docker/volumes/db/data
docker/.env
docker/.run
docker/deploy.options
k8s/helm/.deploy.options

frontend_standalone/
.pnpm-store/
Expand All @@ -32,4 +33,4 @@ model-assets/
*coverage_html
*.pytest_cache
*.coverage
*coverage.xml
*coverage.xml
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[![Docker Pulls](https://img.shields.io/docker/pulls/nexent/nexent?logo=docker&label=DockerPull)](https://hub.docker.com/repositories/nexent)
[![Codecov (with branch)](https://img.shields.io/codecov/c/github/ModelEngine-Group/nexent/develop?logo=codecov&color=green)](https://codecov.io/gh/ModelEngine-Group/nexent)

Nexent is a zero-code platform for auto-generating agents — no orchestration, no complex drag-and-drop required, using pure language to develop any agent you want. Built on the MCP ecosystem with rich tool integration, Nexent also provides various built-in agents to meet your intelligent service needs in different scenarios such as work, travel, and daily life. Nexent offers powerful capabilities for agent running control, multi-agent collaboration, data processing and knowledge tracing, multimodal dialogue, and batch scaling.
Nexent is a zero-code platform for auto-generating production-grade AI agents, built on **Harness Engineering** principles. It provides unified tools, skills, memory, and orchestration with built-in constraints, feedback loops, and control planes — no orchestration, no complex drag-and-drop required, using pure language to develop any agent you want.

> One prompt. Endless reach.

Expand Down Expand Up @@ -58,7 +58,7 @@ Most of all, we need visibility. Star ⭐ and watch the repo, share it with frie

## 💬 Community & contact

- Browse the [Documentation](https://modelengine-group.github.io/nexent) for more information.
- Browse the [Documentation](https://modelengine-group.github.io/nexent) for more information.
- Join our [Discord community](https://discord.gg/tb5H3S3wyv) to chat with other developers and get help!
- Conntact us by Wechat, find our QR Code in our [website](https://nexent.tech/en/contact)

Expand Down Expand Up @@ -119,5 +119,4 @@ Prefer to run Nexent from source code? Follow our [Developer Guide](https://mode

# 📄 License

Nexent is licensed under the [MIT](LICENSE) with additional conditions. Please read the [LICENSE](LICENSE) file for details.

Nexent is licensed under the [MIT License](LICENSE).
6 changes: 3 additions & 3 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[![Docker Pulls](https://img.shields.io/docker/pulls/nexent/nexent?logo=docker&label=DockerPull)](https://hub.docker.com/repositories/nexent)
[![Codecov (with branch)](https://img.shields.io/codecov/c/github/ModelEngine-Group/nexent/develop?logo=codecov&color=green)](https://codecov.io/gh/ModelEngine-Group/nexent)

Nexent 是一个零代码智能体自动生成平台 —— 无需编排,无需复杂的拖拉拽操作,使用纯语言开发你想要的任何智能体。基于MCP生态,具备丰富的工具集成,同时提供多种自带智能体,满足你的工作、旅行、生活等不同场景的智能服务需要。Nexent 还提供强大的智能体运行控制、多智能体协作、数据处理和知识溯源、多模态对话、批量扩展能力
Nexent 是一个基于 **Harness Engineering** 原则打造的零代码智能体自动生成平台。集统一工具、技能、记忆和编排能力于一体,内置约束机制、反馈循环和控制平面。无需编排,无需复杂的拖拉拽操作,使用纯语言开发你想要的任何智能体。

> 一个提示词,无限种可能。

Expand Down Expand Up @@ -58,7 +58,7 @@ bash deploy.sh

## 💬 社区与联系方式

- 浏览 [文档](https://modelengine-group.github.io/nexent) 了解更多信息。
- 浏览 [文档](https://modelengine-group.github.io/nexent) 了解更多信息。
- 加入我们的 [Discord 社区](https://discord.gg/tb5H3S3wyv) 与其他开发者交流并获取帮助!
- 通过微信联系我们,在我们的[网站](https://nexent.tech/zh/contact)找到二维码

Expand Down Expand Up @@ -119,4 +119,4 @@ bash deploy.sh

# 📄 许可证

Nexent 采用 [MIT](LICENSE) 许可证,并附有额外条件。请阅读 [LICENSE](LICENSE) 文件了解详情
Nexent 采用 [MIT 许可证](LICENSE)。
176 changes: 156 additions & 20 deletions backend/agents/create_agent_info.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import threading
import logging
from typing import List
from urllib.parse import urljoin
from datetime import datetime

from jinja2 import Template, StrictUndefined
from smolagents.utils import BASE_BUILTIN_MODULES
from nexent.core.utils.observer import MessageObserver
from nexent.core.agents.agent_model import AgentRunInfo, ModelConfig, AgentConfig, ToolConfig
from nexent.memory.memory_service import search_memory_in_levels
Expand All @@ -27,11 +27,119 @@
from utils.prompt_template_utils import get_agent_prompt_template
from utils.config_utils import tenant_config_manager, get_model_name_from_config
from consts.const import LOCAL_MCP_SERVER, MODEL_CONFIG_MAPPING, LANGUAGE, DATA_PROCESS_SERVICE
import re

logger = logging.getLogger("create_agent_info")
logger.setLevel(logging.DEBUG)


def _get_skills_for_template(
agent_id: int,
tenant_id: str,
version_no: int = 0
) -> List[dict]:
"""Get skills list for prompt template injection.

Args:
agent_id: Agent ID
tenant_id: Tenant ID
version_no: Version number

Returns:
List of skill dicts with name and description
"""
try:
from services.skill_service import SkillService
skill_service = SkillService()
enabled_skills = skill_service.get_enabled_skills_for_agent(
agent_id=agent_id,
tenant_id=tenant_id,
version_no=version_no
)
return [
{"name": s.get("name", ""), "description": s.get("description", "")}
for s in enabled_skills
]
except Exception as e:
logger.warning(f"Failed to get skills for template: {e}")
return []


def _get_skill_script_tools(
agent_id: int,
tenant_id: str,
version_no: int = 0
) -> List[ToolConfig]:
"""Get tool config for skill script execution and skill reading.

Args:
agent_id: Agent ID for filtering available skills in error messages.
tenant_id: Tenant ID for filtering available skills in error messages.
version_no: Version number for filtering available skills.

Returns:
List of ToolConfig for skill execution and reading tools
"""
from consts.const import CONTAINER_SKILLS_PATH

skill_context = {
"agent_id": agent_id,
"tenant_id": tenant_id,
"version_no": version_no,
}

try:
return [
ToolConfig(
class_name="RunSkillScriptTool",
name="run_skill_script",
description="Execute a skill script with given parameters. Use this to run Python or shell scripts that are part of a skill.",
inputs='{"skill_name": "str", "script_path": "str", "params": "dict"}',
output_type="string",
params={"local_skills_dir": CONTAINER_SKILLS_PATH},
source="builtin",
usage="builtin",
metadata=skill_context,
),
ToolConfig(
class_name="ReadSkillMdTool",
name="read_skill_md",
description="Read skill execution guide and optional additional files. Always reads SKILL.md first, then optionally reads additional files.",
inputs='{"skill_name": "str", "additional_files": "list[str]"}',
output_type="string",
params={"local_skills_dir": CONTAINER_SKILLS_PATH},
source="builtin",
usage="builtin",
metadata=skill_context,
),
ToolConfig(
class_name="ReadSkillConfigTool",
name="read_skill_config",
description="Read the config.yaml file from a skill directory. Returns JSON containing configuration variables needed for skill workflows.",
inputs='{"skill_name": "str"}',
output_type="string",
params={"local_skills_dir": CONTAINER_SKILLS_PATH},
source="builtin",
usage="builtin",
metadata=skill_context,
),
ToolConfig(
class_name="WriteSkillFileTool",
name="write_skill_file",
description="Write content to a file within a skill directory. Creates parent directories if they do not exist.",
inputs='{"skill_name": "str", "file_path": "str", "content": "str"}',
output_type="string",
params={"local_skills_dir": CONTAINER_SKILLS_PATH},
source="builtin",
usage="builtin",
metadata=skill_context,
)
]
except Exception as e:
logger.warning(f"Failed to load skill script tool: {e}")
return []


async def create_model_config_list(tenant_id):
records = get_model_records({"model_type": "llm"}, tenant_id)
model_list = []
Expand Down Expand Up @@ -169,22 +277,26 @@
logger.error(f"Failed to build knowledge base summary: {e}")

# Assemble system_prompt
if duty_prompt or constraint_prompt or few_shots_prompt:
system_prompt = Template(prompt_template["system_prompt"], undefined=StrictUndefined).render({
"duty": duty_prompt,
"constraint": constraint_prompt,
"few_shots": few_shots_prompt,
"tools": {tool.name: tool for tool in tool_list},
"managed_agents": {agent.name: agent for agent in managed_agents},
"authorized_imports": str(BASE_BUILTIN_MODULES),
"APP_NAME": app_name,
"APP_DESCRIPTION": app_description,
"memory_list": memory_list,
"knowledge_base_summary": knowledge_base_summary,
"time": datetime.now().strftime("%Y-%m-%d %H:%M:%S")
})
else:
system_prompt = agent_info.get("prompt", "")
# Get skills list for prompt template
skills = _get_skills_for_template(agent_id, tenant_id, version_no)

render_kwargs = {
"duty": duty_prompt,
"constraint": constraint_prompt,
"few_shots": few_shots_prompt,
"tools": {tool.name: tool for tool in tool_list},
"skills": skills,
"managed_agents": {agent.name: agent for agent in managed_agents},
"APP_NAME": app_name,
"APP_DESCRIPTION": app_description,
"memory_list": memory_list,
"knowledge_base_summary": knowledge_base_summary,
"time": datetime.now().strftime("%Y-%m-%d %H:%M:%S"),
"user_id": user_id,
}
system_prompt = Template(prompt_template["system_prompt"], undefined=StrictUndefined).render(render_kwargs)

_print_prompt_with_token_count(system_prompt, agent_id, "BEFORE_INJECTION")

if agent_info.get("model_id") is not None:
model_info = get_model_by_model_id(agent_info.get("model_id"))
Expand All @@ -197,9 +309,10 @@
prompt_templates=await prepare_prompt_templates(
is_manager=len(managed_agents) > 0,
system_prompt=system_prompt,
language=language
language=language,
agent_id=agent_id
),
tools=tool_list,
tools=tool_list + _get_skill_script_tools(agent_id, tenant_id, version_no),
max_steps=agent_info.get("max_steps", 10),
model_name=model_name,
provide_run_summary=agent_info.get("provide_run_summary", False),
Expand Down Expand Up @@ -296,23 +409,46 @@
return langchain_tools


async def prepare_prompt_templates(is_manager: bool, system_prompt: str, language: str = 'zh'):
async def prepare_prompt_templates(

Check warning on line 412 in backend/agents/create_agent_info.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use asynchronous features in this function or remove the `async` keyword.

See more on https://sonarcloud.io/project/issues?id=ModelEngine-Group_nexent&issues=AZ01GCX7Z7p57OGEaL0f&open=AZ01GCX7Z7p57OGEaL0f&pullRequest=2742
is_manager: bool,
system_prompt: str,
language: str = 'zh',
agent_id: int = None,
):
"""
Prepare prompt templates, support multiple languages

Args:
is_manager: Whether it is a manager mode
system_prompt: System prompt content
language: Language code ('zh' or 'en')
agent_id: Agent ID for fetching skill instances

Returns:
dict: Prompt template configuration
"""
prompt_templates = get_agent_prompt_template(is_manager, language)
prompt_templates["system_prompt"] = system_prompt

# Print final prompt with all injections
_print_prompt_with_token_count(prompt_templates["system_prompt"], agent_id, "FINAL_PROMPT")

return prompt_templates


def _print_prompt_with_token_count(prompt: str, agent_id: int = None, stage: str = "PROMPT"):
"""Print prompt content and estimate token count using tiktoken."""
try:
import tiktoken
encoding = tiktoken.get_encoding("cl100k_base")
token_count = len(encoding.encode(prompt))
logger.info(f"[Skill Debug][{stage}] Agent {agent_id} token count: {token_count}")
logger.info(f"[Skill Debug][{stage}] Agent {agent_id} prompt:\n{prompt}")
except Exception as e:
logger.warning(f"[Skill Debug][{stage}] Failed to count tokens: {e}")
logger.info(f"[Skill Debug][{stage}] Agent {agent_id} prompt:\n{prompt}")


async def join_minio_file_description_to_query(minio_files, query):
final_query = query
if minio_files and isinstance(minio_files, list):
Expand Down
24 changes: 23 additions & 1 deletion backend/apps/agent_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
run_agent_stream,
stop_agent_tasks,
get_agent_call_relationship_impl,
clear_agent_new_mark_impl
clear_agent_new_mark_impl,
get_agent_by_name_impl,
)
from services.agent_version_service import (
publish_version_impl,
Expand Down Expand Up @@ -100,6 +101,27 @@ async def search_agent_info_api(
status_code=HTTPStatus.INTERNAL_SERVER_ERROR, detail="Agent search info error.")


@agent_config_router.get("/by-name/{agent_name}")
async def get_agent_by_name_api(
agent_name: str,
tenant_id: Optional[str] = Query(
None, description="Tenant ID for filtering (uses auth if not provided)"),
authorization: Optional[str] = Header(None)
):
"""
Look up an agent by name and return its agent_id and highest published version_no.
"""
try:
_, auth_tenant_id = get_current_user_id(authorization)
effective_tenant_id = tenant_id or auth_tenant_id
result = get_agent_by_name_impl(agent_name, effective_tenant_id)
return JSONResponse(status_code=HTTPStatus.OK, content=result)
except Exception as e:
logger.error(f"Agent by name lookup error: {str(e)}")
raise HTTPException(
status_code=HTTPStatus.INTERNAL_SERVER_ERROR, detail="Agent not found.")


@agent_config_router.get("/get_creating_sub_agent_id")
async def get_creating_sub_agent_info_api(authorization: Optional[str] = Header(None)):
"""
Expand Down
2 changes: 2 additions & 0 deletions backend/apps/config_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from apps.model_managment_app import router as model_manager_router
from apps.prompt_app import router as prompt_router
from apps.remote_mcp_app import router as remote_mcp_router
from apps.skill_app import router as skill_router
from apps.tenant_config_app import router as tenant_config_router
from apps.tool_config_app import router as tool_config_router
from apps.user_management_app import router as user_management_router
Expand Down Expand Up @@ -52,6 +53,7 @@

app.include_router(summary_router)
app.include_router(prompt_router)
app.include_router(skill_router)
app.include_router(tenant_config_router)
app.include_router(remote_mcp_router)
app.include_router(tenant_router)
Expand Down
Loading
Loading