@easbot/agent 0.1.13 → 0.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +3 -5
- package/README.md +3 -5
- package/dist/assets/txt/model/graph-summary.txt +31 -37
- package/dist/assets/txt/model/knowledge-summary.txt +81 -40
- package/dist/assets/txt/model/memory-summary.txt +80 -40
- package/dist/cli.cjs +473 -459
- package/dist/cli.mjs +470 -456
- package/dist/index.cjs +392 -366
- package/dist/index.d.cts +440 -56
- package/dist/index.d.ts +440 -56
- package/dist/index.mjs +394 -368
- package/package.json +12 -12
package/README.en.md
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
[中文](./README.md) | English
|
|
2
|
+
|
|
1
3
|
# @easbot/agent
|
|
2
4
|
|
|
3
5
|
EASBot Agent - Core Runtime for Multi-Agent Collaboration Ecosystem
|
|
@@ -17,11 +19,7 @@ EASBot Agent - Core Runtime for Multi-Agent Collaboration Ecosystem
|
|
|
17
19
|
## Installation
|
|
18
20
|
|
|
19
21
|
```bash
|
|
20
|
-
#
|
|
21
|
-
npm install -g @easbot/agent
|
|
22
|
-
|
|
23
|
-
# Or using pnpm
|
|
24
|
-
pnpm add -g @easbot/agent
|
|
22
|
+
# pnpm add @easbot/agent
|
|
25
23
|
```
|
|
26
24
|
|
|
27
25
|
## Quick Start
|
package/README.md
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
[English](./README.en.md) | 中文
|
|
2
|
+
|
|
1
3
|
# @easbot/agent
|
|
2
4
|
|
|
3
5
|
EASBot Agent - 多Agent协作生态系统的核心运行时
|
|
@@ -17,11 +19,7 @@ EASBot Agent - 多Agent协作生态系统的核心运行时
|
|
|
17
19
|
## 安装
|
|
18
20
|
|
|
19
21
|
```bash
|
|
20
|
-
#
|
|
21
|
-
npm install -g @easbot/agent
|
|
22
|
-
|
|
23
|
-
# 或使用 pnpm
|
|
24
|
-
pnpm add -g @easbot/agent
|
|
22
|
+
# pnpm add @easbot/agent
|
|
25
23
|
```
|
|
26
24
|
|
|
27
25
|
## 快速开始
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
# Knowledge Graph Summary Prompt
|
|
2
|
-
# Generates ONE combined summary from MULTIPLE knowledge graph entities
|
|
3
2
|
|
|
4
3
|
## Task
|
|
5
|
-
|
|
4
|
+
Generate ONE combined summary from MULTIPLE knowledge graph entities.
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
**CRITICAL RULES:**
|
|
7
|
+
- NEVER generate relationships not present in the input
|
|
8
|
+
- NEVER invent connections or attributes
|
|
9
|
+
- NEVER elaborate beyond provided information
|
|
10
|
+
- NEVER guess entity properties
|
|
11
|
+
- If input has no valuable information: ONLY output "No relevant knowledge found."
|
|
9
12
|
|
|
13
|
+
## Input Format
|
|
10
14
|
```
|
|
11
15
|
[Entity 1]
|
|
12
16
|
Entity: {entity1}
|
|
@@ -17,44 +21,34 @@ Relation Types: {relation_types1}
|
|
|
17
21
|
|
|
18
22
|
[Entity 2]
|
|
19
23
|
Entity: {entity2}
|
|
20
|
-
|
|
21
|
-
Description: {description2}
|
|
22
|
-
Related Entities: {related_entities2}
|
|
23
|
-
Relation Types: {relation_types2}
|
|
24
|
-
|
|
25
|
-
... (more entities)
|
|
24
|
+
...
|
|
26
25
|
```
|
|
27
26
|
|
|
28
|
-
## Output Requirements
|
|
29
|
-
- Generate ONE combined summary covering ALL input entities
|
|
30
|
-
- Use markdown format with clear sections
|
|
31
|
-
- Group information by entity
|
|
32
|
-
- Highlight core attributes and key relationships
|
|
33
|
-
- Mark information source as "Knowledge Graph"
|
|
34
|
-
- Keep concise but comprehensive - cover all entities
|
|
35
|
-
|
|
36
27
|
## Output Format
|
|
37
|
-
|
|
28
|
+
**Length: 1-3 entities maximum**
|
|
29
|
+
- Lead with most relevant entities
|
|
30
|
+
- Group information clearly
|
|
31
|
+
- Cite source as "Knowledge Graph"
|
|
38
32
|
|
|
39
33
|
```markdown
|
|
40
|
-
## [Entity:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
##
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
- **Related Entities:**
|
|
53
|
-
- ...
|
|
34
|
+
## [Entity Name] (Priority: {priority})
|
|
35
|
+
**Type:** {entity_type}
|
|
36
|
+
**Source:** Knowledge Graph
|
|
37
|
+
**Description:** ...
|
|
38
|
+
**Related Entities:**
|
|
39
|
+
→ [{relation}] → {target_entity}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Fixed Response
|
|
43
|
+
If entities are irrelevant or insufficient:
|
|
44
|
+
```
|
|
45
|
+
No relevant knowledge found.
|
|
54
46
|
```
|
|
47
|
+
**DO NOT generate any other content.**
|
|
55
48
|
|
|
56
49
|
## Rules
|
|
57
|
-
- Output ONE combined summary
|
|
58
|
-
-
|
|
59
|
-
-
|
|
60
|
-
-
|
|
50
|
+
- Output ONE combined summary only
|
|
51
|
+
- Never separate summaries per entity
|
|
52
|
+
- Never invent attributes or relationships
|
|
53
|
+
- Never exceed provided information
|
|
54
|
+
- If uncertain: "No relevant knowledge found."
|
|
@@ -1,40 +1,81 @@
|
|
|
1
|
-
# Knowledge Summary Prompt
|
|
2
|
-
|
|
3
|
-
## Task
|
|
4
|
-
Synthesize
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
1
|
+
# Knowledge Summary Prompt
|
|
2
|
+
|
|
3
|
+
## Task
|
|
4
|
+
Synthesize document chunks into a concise summary relevant to the query.
|
|
5
|
+
|
|
6
|
+
**CRITICAL RULES:**
|
|
7
|
+
- NEVER generate content not present in the input
|
|
8
|
+
- NEVER invent relationships or connections
|
|
9
|
+
- NEVER elaborate beyond provided information
|
|
10
|
+
- NEVER guess or assume user needs
|
|
11
|
+
- If input has no valuable information: ONLY output "No relevant knowledge found."
|
|
12
|
+
|
|
13
|
+
## Priority Score
|
|
14
|
+
Priority = 0.6 × relevance + 0.4 × recency
|
|
15
|
+
- Priority > 0.6: high-priority (include)
|
|
16
|
+
- Priority < 0.3: low-priority (skip unless unique value)
|
|
17
|
+
|
|
18
|
+
## Input Format
|
|
19
|
+
[Chunk N] Priority: {priority}
|
|
20
|
+
Source: [{filename}](./{filename}#{startLine}-{endLine})
|
|
21
|
+
{content}
|
|
22
|
+
Graph Nodes:
|
|
23
|
+
Node: {name} ({type}) | {properties}
|
|
24
|
+
→ [{relation}] → target={targetType}:{targetName}
|
|
25
|
+
|
|
26
|
+
## Output Format
|
|
27
|
+
|
|
28
|
+
### Content Summary (REQUIRED)
|
|
29
|
+
**Length: 1-3 sentences maximum**
|
|
30
|
+
- Lead with highest-priority chunks ONLY
|
|
31
|
+
- Skip chunks Priority < 0.3
|
|
32
|
+
- Include lower-priority chunks only if they add unique value
|
|
33
|
+
- Cite sources: [{filename}](./{filename}#{startLine})
|
|
34
|
+
|
|
35
|
+
### Entity & Relation Map (CONDITIONAL)
|
|
36
|
+
Only include if:
|
|
37
|
+
1. Graph nodes are present AND
|
|
38
|
+
2. They add meaningful connections not in Content Summary
|
|
39
|
+
|
|
40
|
+
Format:
|
|
41
|
+
**{EntityName}** ({type})
|
|
42
|
+
→ [{relation}] → {TargetEntity} ({targetType})
|
|
43
|
+
|
|
44
|
+
### Key Insights (CONDITIONAL)
|
|
45
|
+
Only include if:
|
|
46
|
+
1. Notable patterns exist AND
|
|
47
|
+
2. They are NOT already covered in Content Summary
|
|
48
|
+
|
|
49
|
+
Format:
|
|
50
|
+
- 1-2 bullets maximum
|
|
51
|
+
|
|
52
|
+
## Fixed Response
|
|
53
|
+
If no chunks have Priority > 0.3 or all chunks are irrelevant:
|
|
54
|
+
```
|
|
55
|
+
No relevant knowledge found.
|
|
56
|
+
```
|
|
57
|
+
**DO NOT generate any other content.**
|
|
58
|
+
|
|
59
|
+
## Examples
|
|
60
|
+
|
|
61
|
+
### Good Output (relevant chunks)
|
|
62
|
+
```
|
|
63
|
+
The codebase uses React for frontend (Priority: 0.78).
|
|
64
|
+
Source: [frontend/index.tsx](./frontend/index.tsx#L10-L50)
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Bad Output (NEVER generate)
|
|
68
|
+
```
|
|
69
|
+
Hello! Based on the documents, I can help you with React setup.
|
|
70
|
+
The project structure follows a standard pattern.
|
|
71
|
+
You should use TypeScript for type safety.
|
|
72
|
+
```
|
|
73
|
+
(These weren't in the input!)
|
|
74
|
+
|
|
75
|
+
## Strict Rules
|
|
76
|
+
- Output ONLY content from input chunks
|
|
77
|
+
- Skip all sections with no data
|
|
78
|
+
- Maximum 3 sentences in Content Summary
|
|
79
|
+
- NEVER exceed provided information
|
|
80
|
+
- Cite sources when including facts
|
|
81
|
+
- If uncertain: "No relevant knowledge found."
|
|
@@ -1,40 +1,80 @@
|
|
|
1
|
-
# Memory Summary Prompt
|
|
2
|
-
|
|
3
|
-
## Task
|
|
4
|
-
Synthesize
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
1
|
+
# Memory Summary Prompt
|
|
2
|
+
|
|
3
|
+
## Task
|
|
4
|
+
Synthesize memory facts into a concise summary relevant to the query.
|
|
5
|
+
|
|
6
|
+
**CRITICAL RULES:**
|
|
7
|
+
- NEVER generate facts not present in the input
|
|
8
|
+
- NEVER invent content or relationships
|
|
9
|
+
- NEVER elaborate beyond provided information
|
|
10
|
+
- NEVER guess or assume user intent
|
|
11
|
+
- If input has no valuable information: ONLY output "No relevant memory found."
|
|
12
|
+
|
|
13
|
+
## Priority Score
|
|
14
|
+
Priority = 0.4 × relevance + 0.3 × recency + 0.3 × importance
|
|
15
|
+
- Priority > 0.6: high-priority (include)
|
|
16
|
+
- Priority < 0.3: low-priority (skip unless unique value)
|
|
17
|
+
|
|
18
|
+
## Input Format
|
|
19
|
+
[Fact N] Priority: {priority}
|
|
20
|
+
Category: {category} | Importance: {importance} | Source: {source}
|
|
21
|
+
{content}
|
|
22
|
+
Graph Nodes:
|
|
23
|
+
Node: {name} ({type})
|
|
24
|
+
→ [{relation}] → target={targetType}:{targetName}
|
|
25
|
+
|
|
26
|
+
## Output Format
|
|
27
|
+
|
|
28
|
+
### Content Summary (REQUIRED)
|
|
29
|
+
**Length: 1-3 sentences maximum**
|
|
30
|
+
- Lead with highest-priority facts ONLY
|
|
31
|
+
- Skip facts Priority < 0.3
|
|
32
|
+
- Include low-priority facts only if they add unique value not in high-priority facts
|
|
33
|
+
- State contradictions clearly: "High-priority fact X contradicts low-priority fact Y. Current truth: X."
|
|
34
|
+
|
|
35
|
+
### Entity & Relation Map (CONDITIONAL)
|
|
36
|
+
Only include if:
|
|
37
|
+
1. Graph nodes are present AND
|
|
38
|
+
2. They add meaningful connections not in Content Summary
|
|
39
|
+
|
|
40
|
+
Format:
|
|
41
|
+
**{EntityName}** ({type})
|
|
42
|
+
→ [{relation}] → {TargetEntity} ({targetType})
|
|
43
|
+
|
|
44
|
+
### Key Insights (CONDITIONAL)
|
|
45
|
+
Only include if:
|
|
46
|
+
1. Meaningful patterns exist AND
|
|
47
|
+
2. They are NOT already covered in Content Summary
|
|
48
|
+
|
|
49
|
+
Format:
|
|
50
|
+
- 1-2 bullets maximum
|
|
51
|
+
|
|
52
|
+
## Fixed Response
|
|
53
|
+
If no facts have Priority > 0.3 or all facts are irrelevant:
|
|
54
|
+
```
|
|
55
|
+
No relevant memory found.
|
|
56
|
+
```
|
|
57
|
+
**DO NOT generate any other content.**
|
|
58
|
+
|
|
59
|
+
## Examples
|
|
60
|
+
|
|
61
|
+
### Good Output (relevant facts)
|
|
62
|
+
```
|
|
63
|
+
The user prefers dark mode (Priority: 0.72).
|
|
64
|
+
High-priority fact contradicts earlier light mode preference.
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Bad Output (NEVER generate)
|
|
68
|
+
```
|
|
69
|
+
Hello! I can help you with dark mode settings.
|
|
70
|
+
The user's name is John and they work at Company X.
|
|
71
|
+
They like TypeScript and use VSCode daily.
|
|
72
|
+
```
|
|
73
|
+
(These facts weren't in the input!)
|
|
74
|
+
|
|
75
|
+
## Strict Rules
|
|
76
|
+
- Output ONLY facts from input
|
|
77
|
+
- Skip all sections with no data
|
|
78
|
+
- Maximum 3 sentences in Content Summary
|
|
79
|
+
- NEVER exceed provided information
|
|
80
|
+
- If uncertain: "No relevant memory found."
|