add
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
# 输入要求
|
||||
|
||||
必须要求用户提供**会话ID**。
|
||||
|
||||
## 工作流程
|
||||
|
||||
1. 查询所有切片号,假设查询出来的`part`是[1,2]
|
||||
|
||||
```sql
|
||||
select part from log_agent_chat where del_flag = '0';
|
||||
```
|
||||
|
||||
2. 根据切片号查询并合并各个切片表的数据
|
||||
|
||||
```sql
|
||||
select * from log_agent_chat_1 where chat_window_id = <会话ID>
|
||||
UNION ALL
|
||||
select * from log_agent_chat_2 where chat_window_id = <会话ID>
|
||||
```
|
||||
@@ -0,0 +1,63 @@
|
||||
# 输入要求
|
||||
|
||||
必须提供**智能体ID**,在不明确用户查询的是单智能体还是多智能体时,友好的询问要查询哪种智能体。
|
||||
|
||||
## 查询单智能体信息
|
||||
|
||||
```sql
|
||||
with agent_info AS (
|
||||
select
|
||||
agent_id,
|
||||
agent_name,
|
||||
system_prompt,
|
||||
`description`,
|
||||
max_messages,
|
||||
max_tokens,
|
||||
kb_uuids,
|
||||
kb_configs,
|
||||
kb_similarity_threshold,
|
||||
kb_top_k,
|
||||
kb_max_recall_toekn,
|
||||
llm_name,
|
||||
long_term_memory,
|
||||
case kb_mode when '1' then '直接检索' when '2' then 'tool检索' else '' end AS kb_mode,
|
||||
case kb_search_type when '0' then '向量检索' when '1' then '混合检索' when '2' then '智能检索' else '' end AS kb_search_type
|
||||
from mis-agent.agent
|
||||
where agent_id = <智能体ID>
|
||||
),
|
||||
agent_skill AS (
|
||||
select
|
||||
<智能体ID> AS agent_id,
|
||||
GROUP_CONCAT(skill_name) AS skill_names
|
||||
from mis-mcp.skill
|
||||
where skill_id in (
|
||||
select skill_id from mis-agent.agent_skill_mapping
|
||||
where agent_id = <智能体ID>
|
||||
)
|
||||
),
|
||||
agent_mcp_tool AS (
|
||||
select
|
||||
<智能体ID> AS agent_id,
|
||||
GROUP_CONCAT(tool_name) AS tool_names
|
||||
from mis-mcp.map_tools
|
||||
where mcp_server_uuid in (
|
||||
select mcp_server_uuid from mis-agent.agent_tool_mapping
|
||||
where relate_agent_id = <智能体ID>
|
||||
)
|
||||
)
|
||||
|
||||
select * from agent_info AS a
|
||||
left join agent_skill AS b on a.agent_id = b.agent_id
|
||||
left join agent_mcp_tool AS c on a.agent_id = c.agent_id
|
||||
```
|
||||
|
||||
## 查询多智能体信息
|
||||
|
||||
```sql
|
||||
select * from mis-agent.agent_release_info where release_id in (
|
||||
select
|
||||
release_id
|
||||
from mis-agent.multi_agent_sub
|
||||
where main_agent_id = <智能体ID>
|
||||
)
|
||||
```
|
||||
@@ -0,0 +1,9 @@
|
||||
# 输入要求
|
||||
|
||||
必须提供**智能体ID**。
|
||||
|
||||
## 执行查询
|
||||
|
||||
```sql
|
||||
select * from mis-agent.agent_usage_stats_daily where agent_id = <智能体ID> order by daily desc
|
||||
```
|
||||
@@ -0,0 +1,17 @@
|
||||
# 输入要求
|
||||
|
||||
必须提供**项目名称**。
|
||||
|
||||
## 工作流程
|
||||
|
||||
1. 查询项目注册表,判断是否包含该项目。用户提供的项目名称大概率是模糊的,比如"认证"、"ebiz",要根据语义判断究竟是哪一个,如果猜不准就询问一下用户是哪个。重要:`project_stats_registry`里的`id`字段,称为项目ID,或者叫project_id,后面的步骤需要用到。
|
||||
|
||||
```sql
|
||||
select * from mis-agent.project_stats_registry
|
||||
```
|
||||
|
||||
2. 查询项目统计数据
|
||||
|
||||
```sql
|
||||
select * from mis-agent.project_data_stats_daily where project_id = <project_id>
|
||||
```
|
||||
Reference in New Issue
Block a user