@agntk/core 0.1.1 → 0.2.0
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.md +56 -90
- package/dist/advanced/index.d.ts +9 -2
- package/dist/advanced/index.d.ts.map +1 -1
- package/dist/advanced/index.js +13 -2
- package/dist/advanced/index.js.map +1 -1
- package/dist/agent.d.ts +27 -31
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +228 -275
- package/dist/agent.js.map +1 -1
- package/dist/config/schema.d.ts +38 -38
- package/dist/evals/runner.js +16 -9
- package/dist/evals/runner.js.map +1 -1
- package/dist/evals/types.d.ts +1 -1
- package/dist/evals/types.d.ts.map +1 -1
- package/dist/index.d.ts +4 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -9
- package/dist/index.js.map +1 -1
- package/dist/observability/langfuse.d.ts +2 -2
- package/dist/observability/langfuse.d.ts.map +1 -1
- package/dist/observability/langfuse.js +39 -17
- package/dist/observability/langfuse.js.map +1 -1
- package/dist/presets/sub-agent-configs.d.ts +11 -3
- package/dist/presets/sub-agent-configs.d.ts.map +1 -1
- package/dist/presets/sub-agent-configs.js +5 -10
- package/dist/presets/sub-agent-configs.js.map +1 -1
- package/dist/presets/tools.d.ts +5 -5
- package/dist/tools/browser/tool.d.ts +2 -2
- package/dist/tools/browser/types.d.ts +2 -2
- package/dist/tools/plan/tools.d.ts +1 -1
- package/dist/tools/plan/types.d.ts +2 -2
- package/dist/tools/progress/index.d.ts +2 -2
- package/dist/tools/spawn-agent/index.d.ts +7 -9
- package/dist/tools/spawn-agent/index.d.ts.map +1 -1
- package/dist/tools/spawn-agent/index.js +2 -4
- package/dist/tools/spawn-agent/index.js.map +1 -1
- package/dist/types/agent.d.ts +69 -199
- package/dist/types/agent.d.ts.map +1 -1
- package/dist/types/agent.js +4 -2
- package/dist/types/agent.js.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/usage-limits.d.ts +1 -1
- package/dist/usage-limits.js +1 -1
- package/dist/workflow/index.d.ts +1 -5
- package/dist/workflow/index.d.ts.map +1 -1
- package/dist/workflow/index.js +1 -9
- package/dist/workflow/index.js.map +1 -1
- package/dist/wrappers/best-of-n.d.ts +1 -1
- package/dist/wrappers/best-of-n.d.ts.map +1 -1
- package/dist/wrappers/best-of-n.js +11 -6
- package/dist/wrappers/best-of-n.js.map +1 -1
- package/package.json +4 -14
- package/dist/memory/engine.d.ts +0 -130
- package/dist/memory/engine.d.ts.map +0 -1
- package/dist/memory/engine.js +0 -227
- package/dist/memory/engine.js.map +0 -1
- package/dist/memory/vectra-store.d.ts +0 -31
- package/dist/memory/vectra-store.d.ts.map +0 -1
- package/dist/memory/vectra-store.js +0 -122
- package/dist/memory/vectra-store.js.map +0 -1
- package/dist/pool/index.d.ts +0 -7
- package/dist/pool/index.d.ts.map +0 -1
- package/dist/pool/index.js +0 -6
- package/dist/pool/index.js.map +0 -1
- package/dist/pool/specialist-pool.d.ts +0 -59
- package/dist/pool/specialist-pool.d.ts.map +0 -1
- package/dist/pool/specialist-pool.js +0 -224
- package/dist/pool/specialist-pool.js.map +0 -1
- package/dist/pool/tools.d.ts +0 -63
- package/dist/pool/tools.d.ts.map +0 -1
- package/dist/pool/tools.js +0 -83
- package/dist/pool/tools.js.map +0 -1
- package/dist/pool/types.d.ts +0 -79
- package/dist/pool/types.d.ts.map +0 -1
- package/dist/pool/types.js +0 -5
- package/dist/pool/types.js.map +0 -1
- package/dist/presets/index.d.ts +0 -5
- package/dist/presets/index.d.ts.map +0 -1
- package/dist/presets/index.js +0 -5
- package/dist/presets/index.js.map +0 -1
- package/dist/presets/role-registry.d.ts +0 -41
- package/dist/presets/role-registry.d.ts.map +0 -1
- package/dist/presets/role-registry.js +0 -213
- package/dist/presets/role-registry.js.map +0 -1
- package/dist/presets/roles.d.ts +0 -105
- package/dist/presets/roles.d.ts.map +0 -1
- package/dist/presets/roles.js +0 -207
- package/dist/presets/roles.js.map +0 -1
- package/dist/prompts/templates.d.ts +0 -11
- package/dist/prompts/templates.d.ts.map +0 -1
- package/dist/prompts/templates.js +0 -115
- package/dist/prompts/templates.js.map +0 -1
- package/dist/streaming/data-parts.d.ts +0 -163
- package/dist/streaming/data-parts.d.ts.map +0 -1
- package/dist/streaming/data-parts.js +0 -14
- package/dist/streaming/data-parts.js.map +0 -1
- package/dist/streaming/index.d.ts +0 -8
- package/dist/streaming/index.d.ts.map +0 -1
- package/dist/streaming/index.js +0 -10
- package/dist/streaming/index.js.map +0 -1
- package/dist/streaming/transient.d.ts +0 -136
- package/dist/streaming/transient.d.ts.map +0 -1
- package/dist/streaming/transient.js +0 -201
- package/dist/streaming/transient.js.map +0 -1
- package/dist/tools/provider.d.ts +0 -97
- package/dist/tools/provider.d.ts.map +0 -1
- package/dist/tools/provider.js +0 -178
- package/dist/tools/provider.js.map +0 -1
- package/dist/utils/logger.d.ts +0 -35
- package/dist/utils/logger.d.ts.map +0 -1
- package/dist/utils/logger.js +0 -149
- package/dist/utils/logger.js.map +0 -1
- package/dist/workflow/builders/adapt.d.ts +0 -20
- package/dist/workflow/builders/adapt.d.ts.map +0 -1
- package/dist/workflow/builders/adapt.js +0 -33
- package/dist/workflow/builders/adapt.js.map +0 -1
- package/dist/workflow/builders/index.d.ts +0 -8
- package/dist/workflow/builders/index.d.ts.map +0 -1
- package/dist/workflow/builders/index.js +0 -7
- package/dist/workflow/builders/index.js.map +0 -1
- package/dist/workflow/builders/parallel.d.ts +0 -25
- package/dist/workflow/builders/parallel.d.ts.map +0 -1
- package/dist/workflow/builders/parallel.js +0 -60
- package/dist/workflow/builders/parallel.js.map +0 -1
- package/dist/workflow/builders/pipeline.d.ts +0 -22
- package/dist/workflow/builders/pipeline.d.ts.map +0 -1
- package/dist/workflow/builders/pipeline.js +0 -48
- package/dist/workflow/builders/pipeline.js.map +0 -1
- package/dist/workflow/builders/types.d.ts +0 -54
- package/dist/workflow/builders/types.d.ts.map +0 -1
- package/dist/workflow/builders/types.js +0 -5
- package/dist/workflow/builders/types.js.map +0 -1
- package/dist/workflow/durable-agent.d.ts +0 -128
- package/dist/workflow/durable-agent.d.ts.map +0 -1
- package/dist/workflow/durable-agent.js +0 -323
- package/dist/workflow/durable-agent.js.map +0 -1
- package/dist/workflow/schedulers.d.ts +0 -231
- package/dist/workflow/schedulers.d.ts.map +0 -1
- package/dist/workflow/schedulers.js +0 -250
- package/dist/workflow/schedulers.js.map +0 -1
- package/dist/workflow/team/create-team.d.ts +0 -34
- package/dist/workflow/team/create-team.d.ts.map +0 -1
- package/dist/workflow/team/create-team.js +0 -242
- package/dist/workflow/team/create-team.js.map +0 -1
- package/dist/workflow/team/index.d.ts +0 -9
- package/dist/workflow/team/index.d.ts.map +0 -1
- package/dist/workflow/team/index.js +0 -8
- package/dist/workflow/team/index.js.map +0 -1
- package/dist/workflow/team/machines.d.ts +0 -152
- package/dist/workflow/team/machines.d.ts.map +0 -1
- package/dist/workflow/team/machines.js +0 -197
- package/dist/workflow/team/machines.js.map +0 -1
- package/dist/workflow/team/task-board.d.ts +0 -47
- package/dist/workflow/team/task-board.d.ts.map +0 -1
- package/dist/workflow/team/task-board.js +0 -111
- package/dist/workflow/team/task-board.js.map +0 -1
- package/dist/workflow/team/tools.d.ts +0 -66
- package/dist/workflow/team/tools.d.ts.map +0 -1
- package/dist/workflow/team/tools.js +0 -100
- package/dist/workflow/team/tools.js.map +0 -1
- package/dist/workflow/team/types.d.ts +0 -109
- package/dist/workflow/team/types.d.ts.map +0 -1
- package/dist/workflow/team/types.js +0 -5
- package/dist/workflow/team/types.js.map +0 -1
- package/dist/workflow/templates.d.ts +0 -71
- package/dist/workflow/templates.d.ts.map +0 -1
- package/dist/workflow/templates.js +0 -132
- package/dist/workflow/templates.js.map +0 -1
package/dist/presets/roles.js
DELETED
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @agntk/core - Role Configurations
|
|
3
|
-
*
|
|
4
|
-
* Agent role presets with system prompts and call options.
|
|
5
|
-
* Adapted from packages/core/src/agents/roles.ts
|
|
6
|
-
*/
|
|
7
|
-
import { z } from 'zod';
|
|
8
|
-
// ============================================================================
|
|
9
|
-
// Role Prompts
|
|
10
|
-
// ============================================================================
|
|
11
|
-
export const SPAWNED_AGENT_CONTEXT = `
|
|
12
|
-
# Context: Spawned Sub-Agent
|
|
13
|
-
|
|
14
|
-
You are running as a sub-agent spawned by a parent agent to handle a delegated task.
|
|
15
|
-
|
|
16
|
-
**Constraints:**
|
|
17
|
-
- The delegate tool is disabled to prevent infinite recursion
|
|
18
|
-
- You still have access to fs, shell, web, memory, and task tools
|
|
19
|
-
- Focus on completing the delegated task, then call task_complete
|
|
20
|
-
|
|
21
|
-
Work autonomously until the task is complete.`;
|
|
22
|
-
export const rolePrompts = {
|
|
23
|
-
generic: '',
|
|
24
|
-
researcher: `
|
|
25
|
-
# Role: Research Specialist
|
|
26
|
-
|
|
27
|
-
You excel at gathering, verifying, and synthesizing information from multiple sources.
|
|
28
|
-
|
|
29
|
-
**Core competencies:**
|
|
30
|
-
- Web search and documentation retrieval
|
|
31
|
-
- Cross-referencing claims across sources
|
|
32
|
-
- Distinguishing fact from speculation
|
|
33
|
-
- Summarizing complex topics clearly
|
|
34
|
-
- Identifying knowledge gaps and uncertainties
|
|
35
|
-
|
|
36
|
-
**Approach:**
|
|
37
|
-
1. Start with broad searches to understand the landscape
|
|
38
|
-
2. Drill into authoritative sources for specifics
|
|
39
|
-
3. Verify claims by finding corroborating evidence
|
|
40
|
-
4. Note conflicting information and assess credibility
|
|
41
|
-
5. Synthesize findings into clear, structured summaries
|
|
42
|
-
|
|
43
|
-
**Quality standards:**
|
|
44
|
-
- Cite sources for factual claims
|
|
45
|
-
- Explicitly state confidence levels
|
|
46
|
-
- Acknowledge when information is incomplete or uncertain
|
|
47
|
-
- Prefer primary sources over secondary summaries`,
|
|
48
|
-
coder: `
|
|
49
|
-
# Role: Software Engineer
|
|
50
|
-
|
|
51
|
-
You write production-quality code that integrates cleanly with existing systems.
|
|
52
|
-
|
|
53
|
-
**Core competencies:**
|
|
54
|
-
- Reading and understanding existing codebases
|
|
55
|
-
- Writing clean, maintainable code
|
|
56
|
-
- Testing and validation
|
|
57
|
-
- Debugging and error diagnosis
|
|
58
|
-
- Git operations and version control
|
|
59
|
-
|
|
60
|
-
**Approach:**
|
|
61
|
-
1. Read existing code before writing new code
|
|
62
|
-
2. Follow patterns established in the codebase
|
|
63
|
-
3. Write tests for new functionality
|
|
64
|
-
4. Validate changes compile and pass tests
|
|
65
|
-
5. Make atomic, focused commits
|
|
66
|
-
|
|
67
|
-
**Quality standards:**
|
|
68
|
-
- No commented-out code or TODOs without context
|
|
69
|
-
- Consistent formatting with the codebase
|
|
70
|
-
- Meaningful variable and function names
|
|
71
|
-
- Error handling for edge cases
|
|
72
|
-
- Type safety where applicable`,
|
|
73
|
-
analyst: `
|
|
74
|
-
# Role: Data Analyst
|
|
75
|
-
|
|
76
|
-
You analyze information to extract insights and support decision-making.
|
|
77
|
-
|
|
78
|
-
**Core competencies:**
|
|
79
|
-
- Pattern recognition across datasets
|
|
80
|
-
- Statistical reasoning
|
|
81
|
-
- Data visualization concepts
|
|
82
|
-
- Hypothesis formation and testing
|
|
83
|
-
- Clear communication of findings
|
|
84
|
-
|
|
85
|
-
**Approach:**
|
|
86
|
-
1. Understand what question needs answering
|
|
87
|
-
2. Gather relevant data from available sources
|
|
88
|
-
3. Clean and validate data quality
|
|
89
|
-
4. Apply appropriate analysis methods
|
|
90
|
-
5. Present findings with supporting evidence
|
|
91
|
-
|
|
92
|
-
**Quality standards:**
|
|
93
|
-
- Distinguish correlation from causation
|
|
94
|
-
- Quantify uncertainty in conclusions
|
|
95
|
-
- Consider alternative explanations
|
|
96
|
-
- Present data honestly without cherry-picking
|
|
97
|
-
- Make recommendations actionable`,
|
|
98
|
-
};
|
|
99
|
-
// ============================================================================
|
|
100
|
-
// Base System Prompt (standalone version)
|
|
101
|
-
// ============================================================================
|
|
102
|
-
const baseSystemPrompt = `You are an autonomous AI agent operating in a software development workspace. You have access to tools for reading, writing, and searching files, running shell commands, browsing the web, and delegating to sub-agents. You are in a multi-step execution loop — you will keep working until the task is complete.
|
|
103
|
-
|
|
104
|
-
# Identity and Approach
|
|
105
|
-
|
|
106
|
-
You are a hands-on agent. When given a task, you use your tools to accomplish it directly rather than explaining what the user could do. You think through problems step by step, writing out your reasoning before each tool call so your decision-making is transparent. When a task requires multiple steps, you persist through all of them — you do not stop partway or ask for permission to continue unless the request is genuinely ambiguous.
|
|
107
|
-
|
|
108
|
-
CRITICAL RULES:
|
|
109
|
-
- Never say "I can't", "I don't have access", or "I don't know" without trying a tool first.
|
|
110
|
-
- If you don't know how to answer something, your default action is to use a tool — not to give up.
|
|
111
|
-
- Always prefer action over asking for clarification.
|
|
112
|
-
|
|
113
|
-
# Working with Code
|
|
114
|
-
|
|
115
|
-
Before modifying any file, you read it first to understand its current state and context. You make targeted, minimal edits rather than rewriting entire files. After making changes, you verify they work by running builds, tests, or other validation as appropriate. When exploring an unfamiliar codebase, you start broad (glob for file patterns, grep for content) and narrow down progressively.
|
|
116
|
-
|
|
117
|
-
# Tool Awareness
|
|
118
|
-
|
|
119
|
-
Your tool calls and their results are displayed directly to the user. Because of this, you do not echo or restate tool output in your text responses. Instead, you provide brief interpretation — what the results mean, what you noticed, or what you plan to do next. This keeps the conversation focused and avoids redundancy.
|
|
120
|
-
|
|
121
|
-
# Problem Solving
|
|
122
|
-
|
|
123
|
-
When something goes wrong — a failed command, an unexpected error, a tool call that returns nothing useful — you read the error output, reason about what happened, and try a different approach. You never give up after one failure. If one path doesn't work, you try alternative approaches before concluding something isn't possible. When the user asks you to do something and you're not sure how, try the most obvious approach first — action beats deliberation.
|
|
124
|
-
|
|
125
|
-
# Communication
|
|
126
|
-
|
|
127
|
-
You are direct and concise. You lead with actions and results rather than preamble. After completing work, you briefly summarize what you did and why. If you're uncertain about something, you say so clearly rather than guessing. Never ask the user to clarify something you could figure out by using your tools.`;
|
|
128
|
-
// ============================================================================
|
|
129
|
-
// Combined System Prompts
|
|
130
|
-
// ============================================================================
|
|
131
|
-
export const systemPrompts = {
|
|
132
|
-
generic: baseSystemPrompt,
|
|
133
|
-
researcher: `${baseSystemPrompt}\n${rolePrompts.researcher}`,
|
|
134
|
-
coder: `${baseSystemPrompt}\n${rolePrompts.coder}`,
|
|
135
|
-
analyst: `${baseSystemPrompt}\n${rolePrompts.analyst}`,
|
|
136
|
-
};
|
|
137
|
-
export const AGENT_ROLES = ['generic', 'researcher', 'coder', 'analyst'];
|
|
138
|
-
// ============================================================================
|
|
139
|
-
// Call Options Schema per Role
|
|
140
|
-
// ============================================================================
|
|
141
|
-
export const roleCallOptionsSchemas = {
|
|
142
|
-
generic: z.object({
|
|
143
|
-
userId: z.string().optional(),
|
|
144
|
-
sessionId: z.string().optional(),
|
|
145
|
-
workspaceRoot: z.string().optional(),
|
|
146
|
-
}),
|
|
147
|
-
researcher: z.object({
|
|
148
|
-
userId: z.string().optional(),
|
|
149
|
-
sessionId: z.string().optional(),
|
|
150
|
-
workspaceRoot: z.string().optional(),
|
|
151
|
-
searchDepth: z.enum(['shallow', 'deep']).optional(),
|
|
152
|
-
sourceTypes: z.array(z.string()).optional(),
|
|
153
|
-
}),
|
|
154
|
-
coder: z.object({
|
|
155
|
-
userId: z.string().optional(),
|
|
156
|
-
sessionId: z.string().optional(),
|
|
157
|
-
workspaceRoot: z.string().optional(),
|
|
158
|
-
language: z.string().optional(),
|
|
159
|
-
testingStrategy: z.enum(['unit', 'integration', 'both', 'none']).optional(),
|
|
160
|
-
}),
|
|
161
|
-
analyst: z.object({
|
|
162
|
-
userId: z.string().optional(),
|
|
163
|
-
sessionId: z.string().optional(),
|
|
164
|
-
workspaceRoot: z.string().optional(),
|
|
165
|
-
analysisType: z.enum(['exploratory', 'confirmatory']).optional(),
|
|
166
|
-
outputFormat: z.enum(['summary', 'detailed', 'visual']).optional(),
|
|
167
|
-
}),
|
|
168
|
-
};
|
|
169
|
-
export const roleConfigs = {
|
|
170
|
-
generic: {
|
|
171
|
-
systemPrompt: systemPrompts.generic,
|
|
172
|
-
callOptionsSchema: roleCallOptionsSchemas.generic,
|
|
173
|
-
defaultTools: ['fs', 'shell', 'web'],
|
|
174
|
-
recommendedModel: 'standard',
|
|
175
|
-
},
|
|
176
|
-
researcher: {
|
|
177
|
-
systemPrompt: systemPrompts.researcher,
|
|
178
|
-
callOptionsSchema: roleCallOptionsSchemas.researcher,
|
|
179
|
-
defaultTools: ['web', 'fs', 'reasoning'],
|
|
180
|
-
recommendedModel: 'standard',
|
|
181
|
-
},
|
|
182
|
-
coder: {
|
|
183
|
-
systemPrompt: systemPrompts.coder,
|
|
184
|
-
callOptionsSchema: roleCallOptionsSchemas.coder,
|
|
185
|
-
defaultTools: ['fs', 'shell', 'grep', 'glob'],
|
|
186
|
-
recommendedModel: 'powerful',
|
|
187
|
-
},
|
|
188
|
-
analyst: {
|
|
189
|
-
systemPrompt: systemPrompts.analyst,
|
|
190
|
-
callOptionsSchema: roleCallOptionsSchemas.analyst,
|
|
191
|
-
defaultTools: ['fs', 'reasoning', 'shell'],
|
|
192
|
-
recommendedModel: 'standard',
|
|
193
|
-
},
|
|
194
|
-
};
|
|
195
|
-
// ============================================================================
|
|
196
|
-
// Helpers
|
|
197
|
-
// ============================================================================
|
|
198
|
-
export function buildSpawnedAgentPrompt(role) {
|
|
199
|
-
return `${systemPrompts[role]}\n${SPAWNED_AGENT_CONTEXT}`;
|
|
200
|
-
}
|
|
201
|
-
export function getRoleSystemPrompt(role) {
|
|
202
|
-
return systemPrompts[role];
|
|
203
|
-
}
|
|
204
|
-
export function getRoleCallOptionsSchema(role) {
|
|
205
|
-
return roleCallOptionsSchemas[role];
|
|
206
|
-
}
|
|
207
|
-
//# sourceMappingURL=roles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"roles.js","sourceRoot":"","sources":["../../src/presets/roles.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IACtD,OAAO,sBAAsB,CAAC,IAAI,CAAC,CAAC;AACtC,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @agntk/core - System Prompt Templates
|
|
3
|
-
* Core system prompts for agent behavior
|
|
4
|
-
*
|
|
5
|
-
* @deprecated Use `presets/role-registry.ts` instead. That module is the canonical
|
|
6
|
-
* source of truth for role prompts, used by `createAgent()` via `getRole()`.
|
|
7
|
-
* This file is kept for backward compatibility of public exports only.
|
|
8
|
-
*/
|
|
9
|
-
export declare const systemPrompt = "You are an autonomous agent. Your purpose is to accomplish the user's goal using whatever approach makes sense.\n\n# Philosophy\n\nYou have a mind and you have tools. Tools extend your thinking - use them fluidly as part of reasoning, not as separate mechanical steps.\n\nThere is no single correct workflow. Match your approach to the problem:\n- Reason through it, gather information, reason more, then act\n- Act immediately if the path is obvious\n- Start one approach, realize it's wrong, switch to another\n- Call multiple tools in parallel when they don't depend on each other\n\nWhen something doesn't work, adapt. When you need information, go get it. When uncertain, reason carefully. When clear, act directly.\n\nWhen errors occur, read them carefully. The error message usually points to the fix.\n\n# Action\n\nDo things, don't announce them. Instead of \"I'll search for X\", just search.\n\nBe autonomous. Complete tasks without asking permission at every step. Only ask the user when you genuinely need information only they can provide.\n\n# Thinking Out Loud\n\nBefore each action, briefly state:\n- **Goal**: What am I trying to accomplish?\n- **Approach**: Why is this the right tool/action?\n- **Risk**: What could go wrong?\n\nKeep it concise (1-2 sentences each). This helps the user understand your decisions.\n\n# Efficiency\n\nComplete tasks in the fewest steps possible:\n- Think first: What's the most direct path to the goal?\n- Use the right tool: Each tool's description explains when to use it\n- Chain when independent: Call multiple tools in parallel when they don't depend on each other\n- No random exploration: Every action should have a purpose\n\n# Tools\n\nYou have access to consolidated tools with multiple actions. Use the action parameter to specify what to do:\n\n**fs** - All file operations (read, write, edit, list, glob, grep, move, delete, info, mkdir)\n**shell** - Execute shell commands (with allowlisting for repeated commands)\n**web** - Search the internet (search) or fetch page content (fetch)\n**memory** - Knowledge graph operations (add, search, episodes, fact, entity, related)\n\n**delegate** - Parallel work: tool chains (steps), sub-agents (agent), or background processes (background)\n**task** - Manage background tasks (status, output, cancel, list, cleanup)\n\nAdditional tools: plan, ask_user, task_complete\n\nEach tool's description provides detailed guidance on when and how to use it. Read the descriptions to understand capabilities and constraints.\n\n# Delegation\n\nFor complex work, use the delegate tool:\n- **steps**: Execute multiple tool calls in sequence with dependency handling\n- **agent**: Spawn a specialized sub-agent (coder/researcher/analyst)\n- **background**: Start a long-running shell command\n\nAfter delegating, use the task tool to monitor progress and retrieve output.\n\n# Completion\n\nCall task_complete when you have fully accomplished what the user asked for.\n\nOnly call task_complete when truly done - not planned, not partially done, but actually complete.\n";
|
|
10
|
-
export declare const rolePrompts: Record<string, string>;
|
|
11
|
-
//# sourceMappingURL=templates.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/prompts/templates.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,eAAO,MAAM,YAAY,+/FAqExB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAsC9C,CAAC"}
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @agntk/core - System Prompt Templates
|
|
3
|
-
* Core system prompts for agent behavior
|
|
4
|
-
*
|
|
5
|
-
* @deprecated Use `presets/role-registry.ts` instead. That module is the canonical
|
|
6
|
-
* source of truth for role prompts, used by `createAgent()` via `getRole()`.
|
|
7
|
-
* This file is kept for backward compatibility of public exports only.
|
|
8
|
-
*/
|
|
9
|
-
export const systemPrompt = `You are an autonomous agent. Your purpose is to accomplish the user's goal using whatever approach makes sense.
|
|
10
|
-
|
|
11
|
-
# Philosophy
|
|
12
|
-
|
|
13
|
-
You have a mind and you have tools. Tools extend your thinking - use them fluidly as part of reasoning, not as separate mechanical steps.
|
|
14
|
-
|
|
15
|
-
There is no single correct workflow. Match your approach to the problem:
|
|
16
|
-
- Reason through it, gather information, reason more, then act
|
|
17
|
-
- Act immediately if the path is obvious
|
|
18
|
-
- Start one approach, realize it's wrong, switch to another
|
|
19
|
-
- Call multiple tools in parallel when they don't depend on each other
|
|
20
|
-
|
|
21
|
-
When something doesn't work, adapt. When you need information, go get it. When uncertain, reason carefully. When clear, act directly.
|
|
22
|
-
|
|
23
|
-
When errors occur, read them carefully. The error message usually points to the fix.
|
|
24
|
-
|
|
25
|
-
# Action
|
|
26
|
-
|
|
27
|
-
Do things, don't announce them. Instead of "I'll search for X", just search.
|
|
28
|
-
|
|
29
|
-
Be autonomous. Complete tasks without asking permission at every step. Only ask the user when you genuinely need information only they can provide.
|
|
30
|
-
|
|
31
|
-
# Thinking Out Loud
|
|
32
|
-
|
|
33
|
-
Before each action, briefly state:
|
|
34
|
-
- **Goal**: What am I trying to accomplish?
|
|
35
|
-
- **Approach**: Why is this the right tool/action?
|
|
36
|
-
- **Risk**: What could go wrong?
|
|
37
|
-
|
|
38
|
-
Keep it concise (1-2 sentences each). This helps the user understand your decisions.
|
|
39
|
-
|
|
40
|
-
# Efficiency
|
|
41
|
-
|
|
42
|
-
Complete tasks in the fewest steps possible:
|
|
43
|
-
- Think first: What's the most direct path to the goal?
|
|
44
|
-
- Use the right tool: Each tool's description explains when to use it
|
|
45
|
-
- Chain when independent: Call multiple tools in parallel when they don't depend on each other
|
|
46
|
-
- No random exploration: Every action should have a purpose
|
|
47
|
-
|
|
48
|
-
# Tools
|
|
49
|
-
|
|
50
|
-
You have access to consolidated tools with multiple actions. Use the action parameter to specify what to do:
|
|
51
|
-
|
|
52
|
-
**fs** - All file operations (read, write, edit, list, glob, grep, move, delete, info, mkdir)
|
|
53
|
-
**shell** - Execute shell commands (with allowlisting for repeated commands)
|
|
54
|
-
**web** - Search the internet (search) or fetch page content (fetch)
|
|
55
|
-
**memory** - Knowledge graph operations (add, search, episodes, fact, entity, related)
|
|
56
|
-
|
|
57
|
-
**delegate** - Parallel work: tool chains (steps), sub-agents (agent), or background processes (background)
|
|
58
|
-
**task** - Manage background tasks (status, output, cancel, list, cleanup)
|
|
59
|
-
|
|
60
|
-
Additional tools: plan, ask_user, task_complete
|
|
61
|
-
|
|
62
|
-
Each tool's description provides detailed guidance on when and how to use it. Read the descriptions to understand capabilities and constraints.
|
|
63
|
-
|
|
64
|
-
# Delegation
|
|
65
|
-
|
|
66
|
-
For complex work, use the delegate tool:
|
|
67
|
-
- **steps**: Execute multiple tool calls in sequence with dependency handling
|
|
68
|
-
- **agent**: Spawn a specialized sub-agent (coder/researcher/analyst)
|
|
69
|
-
- **background**: Start a long-running shell command
|
|
70
|
-
|
|
71
|
-
After delegating, use the task tool to monitor progress and retrieve output.
|
|
72
|
-
|
|
73
|
-
# Completion
|
|
74
|
-
|
|
75
|
-
Call task_complete when you have fully accomplished what the user asked for.
|
|
76
|
-
|
|
77
|
-
Only call task_complete when truly done - not planned, not partially done, but actually complete.
|
|
78
|
-
`;
|
|
79
|
-
export const rolePrompts = {
|
|
80
|
-
generic: systemPrompt,
|
|
81
|
-
coder: `${systemPrompt}
|
|
82
|
-
|
|
83
|
-
# Specialized Role: Code Implementation
|
|
84
|
-
|
|
85
|
-
You are a code implementation specialist. Your focus areas:
|
|
86
|
-
- Writing clean, maintainable code
|
|
87
|
-
- Following existing patterns in the codebase
|
|
88
|
-
- Making minimal, targeted changes
|
|
89
|
-
- Running tests to verify your changes work
|
|
90
|
-
|
|
91
|
-
Always read relevant code before making changes. Match the existing style.`,
|
|
92
|
-
researcher: `${systemPrompt}
|
|
93
|
-
|
|
94
|
-
# Specialized Role: Research
|
|
95
|
-
|
|
96
|
-
You are a research specialist. Your focus areas:
|
|
97
|
-
- Gathering comprehensive information on topics
|
|
98
|
-
- Evaluating source credibility
|
|
99
|
-
- Synthesizing findings into clear summaries
|
|
100
|
-
- Identifying key insights and patterns
|
|
101
|
-
|
|
102
|
-
Be thorough but efficient. Focus on actionable information.`,
|
|
103
|
-
analyst: `${systemPrompt}
|
|
104
|
-
|
|
105
|
-
# Specialized Role: Analysis
|
|
106
|
-
|
|
107
|
-
You are an analysis specialist. Your focus areas:
|
|
108
|
-
- Breaking down complex problems
|
|
109
|
-
- Identifying patterns and relationships
|
|
110
|
-
- Evaluating trade-offs and options
|
|
111
|
-
- Providing data-driven recommendations
|
|
112
|
-
|
|
113
|
-
Be systematic and logical. Support conclusions with evidence.`,
|
|
114
|
-
};
|
|
115
|
-
//# sourceMappingURL=templates.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../src/prompts/templates.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,CAAC,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqE3B,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAA2B;IACjD,OAAO,EAAE,YAAY;IAErB,KAAK,EAAE,GAAG,YAAY;;;;;;;;;;2EAUmD;IAEzE,UAAU,EAAE,GAAG,YAAY;;;;;;;;;;4DAU+B;IAE1D,OAAO,EAAE,GAAG,YAAY;;;;;;;;;;8DAUoC;CAC7D,CAAC"}
|
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview Custom data part types for AI SDK streaming.
|
|
3
|
-
* These types define the shape of transient data streamed during agent execution.
|
|
4
|
-
*
|
|
5
|
-
* Usage with AI SDK:
|
|
6
|
-
* ```typescript
|
|
7
|
-
* import type { DataStreamWriter } from 'ai';
|
|
8
|
-
*
|
|
9
|
-
* const writer: DataStreamWriter = ...;
|
|
10
|
-
* writer.writeData({ type: 'file-content', data: { path: '/foo.ts', content: '...', truncated: false } });
|
|
11
|
-
* ```
|
|
12
|
-
*/
|
|
13
|
-
/**
|
|
14
|
-
* Union type of all custom data parts supported by the agent SDK.
|
|
15
|
-
* These are streamed transiently and not persisted to conversation context.
|
|
16
|
-
*/
|
|
17
|
-
export type AgentDataParts = {
|
|
18
|
-
/**
|
|
19
|
-
* Streaming output from a spawned sub-agent.
|
|
20
|
-
* Displayed as nested collapsible in UI.
|
|
21
|
-
*/
|
|
22
|
-
'sub-agent-stream': SubAgentStreamData;
|
|
23
|
-
/**
|
|
24
|
-
* Search results from grep/glob/codebase search.
|
|
25
|
-
*/
|
|
26
|
-
'search-result': SearchResultData;
|
|
27
|
-
/**
|
|
28
|
-
* File content streamed transiently (not added to context).
|
|
29
|
-
*/
|
|
30
|
-
'file-content': FileContentData;
|
|
31
|
-
/**
|
|
32
|
-
* Shell command execution output.
|
|
33
|
-
*/
|
|
34
|
-
'shell-output': ShellOutputData;
|
|
35
|
-
/**
|
|
36
|
-
* Progress indicator for long-running tools.
|
|
37
|
-
*/
|
|
38
|
-
'tool-progress': ToolProgressData;
|
|
39
|
-
/**
|
|
40
|
-
* Reasoning/thinking step from deep reasoning tool.
|
|
41
|
-
*/
|
|
42
|
-
'reasoning-step': ReasoningStepData;
|
|
43
|
-
/**
|
|
44
|
-
* Memory retrieval results.
|
|
45
|
-
*/
|
|
46
|
-
'memory-result': MemoryResultData;
|
|
47
|
-
};
|
|
48
|
-
/** Sub-agent streaming data. */
|
|
49
|
-
export interface SubAgentStreamData {
|
|
50
|
-
/** Unique identifier for the sub-agent instance. */
|
|
51
|
-
agentId: string;
|
|
52
|
-
/** Role of the sub-agent. */
|
|
53
|
-
role: string;
|
|
54
|
-
/** Streamed text content. */
|
|
55
|
-
text: string;
|
|
56
|
-
/** Status of the sub-agent stream. */
|
|
57
|
-
status: 'streaming' | 'complete' | 'error';
|
|
58
|
-
/** Error message if status is 'error'. */
|
|
59
|
-
error?: string;
|
|
60
|
-
}
|
|
61
|
-
/** Search result data from file/code search. */
|
|
62
|
-
export interface SearchResultData {
|
|
63
|
-
/** File path relative to workspace root. */
|
|
64
|
-
path: string;
|
|
65
|
-
/** Matched content snippet. */
|
|
66
|
-
content: string;
|
|
67
|
-
/** Number of matches in the file. */
|
|
68
|
-
matches: number;
|
|
69
|
-
/** Line number of the first match. */
|
|
70
|
-
line?: number;
|
|
71
|
-
/** Search pattern used. */
|
|
72
|
-
pattern?: string;
|
|
73
|
-
}
|
|
74
|
-
/** File content data for transient streaming. */
|
|
75
|
-
export interface FileContentData {
|
|
76
|
-
/** Absolute or relative file path. */
|
|
77
|
-
path: string;
|
|
78
|
-
/** File content. */
|
|
79
|
-
content: string;
|
|
80
|
-
/** Whether content was truncated due to size limits. */
|
|
81
|
-
truncated: boolean;
|
|
82
|
-
/** Total file size in bytes. */
|
|
83
|
-
totalBytes?: number;
|
|
84
|
-
/** MIME type of the file. */
|
|
85
|
-
mimeType?: string;
|
|
86
|
-
/** Language identifier for syntax highlighting. */
|
|
87
|
-
language?: string;
|
|
88
|
-
/** Line range if partial content. */
|
|
89
|
-
lineRange?: {
|
|
90
|
-
start: number;
|
|
91
|
-
end: number;
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
/** Shell command output data. */
|
|
95
|
-
export interface ShellOutputData {
|
|
96
|
-
/** Command that was executed. */
|
|
97
|
-
command: string;
|
|
98
|
-
/** Command output (stdout + stderr). */
|
|
99
|
-
output: string;
|
|
100
|
-
/** Exit code of the command. */
|
|
101
|
-
exitCode: number;
|
|
102
|
-
/** Working directory where command was executed. */
|
|
103
|
-
cwd?: string;
|
|
104
|
-
/** Whether output was truncated. */
|
|
105
|
-
truncated?: boolean;
|
|
106
|
-
/** Execution duration in milliseconds. */
|
|
107
|
-
durationMs?: number;
|
|
108
|
-
}
|
|
109
|
-
/** Tool progress indicator data. */
|
|
110
|
-
export interface ToolProgressData {
|
|
111
|
-
/** Name of the tool being executed. */
|
|
112
|
-
toolName: string;
|
|
113
|
-
/** Progress percentage (0-100). */
|
|
114
|
-
progress: number;
|
|
115
|
-
/** Human-readable progress message. */
|
|
116
|
-
message: string;
|
|
117
|
-
/** Estimated time remaining in milliseconds. */
|
|
118
|
-
estimatedRemaining?: number;
|
|
119
|
-
/** Current step/total steps format. */
|
|
120
|
-
step?: {
|
|
121
|
-
current: number;
|
|
122
|
-
total: number;
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
/** Reasoning step from deep reasoning tool. */
|
|
126
|
-
export interface ReasoningStepData {
|
|
127
|
-
/** Step number in the reasoning chain. */
|
|
128
|
-
stepNumber: number;
|
|
129
|
-
/** Total estimated steps. */
|
|
130
|
-
totalSteps: number;
|
|
131
|
-
/** The reasoning thought content. */
|
|
132
|
-
thought: string;
|
|
133
|
-
/** Whether this is a revision of a previous thought. */
|
|
134
|
-
isRevision?: boolean;
|
|
135
|
-
/** Which thought number is being revised. */
|
|
136
|
-
revisesThought?: number;
|
|
137
|
-
/** Branch identifier for alternative reasoning paths. */
|
|
138
|
-
branchId?: string;
|
|
139
|
-
}
|
|
140
|
-
/** Memory retrieval result data. */
|
|
141
|
-
export interface MemoryResultData {
|
|
142
|
-
/** Memory entry content. */
|
|
143
|
-
content: string;
|
|
144
|
-
/** Similarity score (0-1). */
|
|
145
|
-
score: number;
|
|
146
|
-
/** Metadata associated with the memory. */
|
|
147
|
-
metadata?: Record<string, unknown>;
|
|
148
|
-
/** When the memory was stored. */
|
|
149
|
-
timestamp?: string;
|
|
150
|
-
}
|
|
151
|
-
/** Type helper to get data type for a specific part type. */
|
|
152
|
-
export type DataPartType<K extends keyof AgentDataParts> = AgentDataParts[K];
|
|
153
|
-
/** Type helper for creating typed data parts. */
|
|
154
|
-
export interface TypedDataPart<K extends keyof AgentDataParts> {
|
|
155
|
-
type: K;
|
|
156
|
-
id?: string;
|
|
157
|
-
data: AgentDataParts[K];
|
|
158
|
-
}
|
|
159
|
-
/** Union of all possible data parts. */
|
|
160
|
-
export type AnyDataPart = {
|
|
161
|
-
[K in keyof AgentDataParts]: TypedDataPart<K>;
|
|
162
|
-
}[keyof AgentDataParts];
|
|
163
|
-
//# sourceMappingURL=data-parts.d.ts.map
|
|
@@ -1 +0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A6C;IAC7C,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,yDAAyD;IACzD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,oCAAoC;AACpC,MAAM,WAAW,gBAAgB;IAC/B,4BAA4B;IAC5B,OAAO,EAAE,MAAM,CAAC;IAEhB,8BAA8B;IAC9B,KAAK,EAAE,MAAM,CAAC;IAEd,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEnC,kCAAkC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAMD,6DAA6D;AAC7D,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,MAAM,cAAc,IAAI,cAAc,CAAC,CAAC,CAAC,CAAC;AAE7E,iDAAiD;AACjD,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,MAAM,cAAc;IAC3D,IAAI,EAAE,CAAC,CAAC;IACR,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;CACzB;AAED,wCAAwC;AACxC,MAAM,MAAM,WAAW,GAAG;KACvB,CAAC,IAAI,MAAM,cAAc,GAAG,aAAa,CAAC,CAAC,CAAC;CAC9C,CAAC,MAAM,cAAc,CAAC,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview Custom data part types for AI SDK streaming.
|
|
3
|
-
* These types define the shape of transient data streamed during agent execution.
|
|
4
|
-
*
|
|
5
|
-
* Usage with AI SDK:
|
|
6
|
-
* ```typescript
|
|
7
|
-
* import type { DataStreamWriter } from 'ai';
|
|
8
|
-
*
|
|
9
|
-
* const writer: DataStreamWriter = ...;
|
|
10
|
-
* writer.writeData({ type: 'file-content', data: { path: '/foo.ts', content: '...', truncated: false } });
|
|
11
|
-
* ```
|
|
12
|
-
*/
|
|
13
|
-
export {};
|
|
14
|
-
//# sourceMappingURL=data-parts.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"data-parts.js","sourceRoot":"","sources":["../../src/streaming/data-parts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @agntk/core - Streaming Module
|
|
3
|
-
*
|
|
4
|
-
* Exports for transient streaming and custom data parts.
|
|
5
|
-
*/
|
|
6
|
-
export { type AgentDataParts, type SubAgentStreamData, type SearchResultData, type FileContentData, type ShellOutputData, type ToolProgressData, type ReasoningStepData, type MemoryResultData, type DataPartType, type TypedDataPart, type AnyDataPart, } from './data-parts.js';
|
|
7
|
-
export { withTransientStreaming, writeTransient, streamTransient, streamFileContent, streamShellOutput, streamSearchResult, streamProgress, streamReasoningStep, streamSubAgent, type TransientStreamWriter, type TransientToolContext, } from './transient.js';
|
|
8
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/streaming/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,WAAW,GACjB,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,sBAAsB,EACtB,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,GAC1B,MAAM,aAAa,CAAC"}
|
package/dist/streaming/index.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @agntk/core - Streaming Module
|
|
3
|
-
*
|
|
4
|
-
* Exports for transient streaming and custom data parts.
|
|
5
|
-
*/
|
|
6
|
-
// Data part types
|
|
7
|
-
export {} from './data-parts.js';
|
|
8
|
-
// Transient streaming
|
|
9
|
-
export { withTransientStreaming, writeTransient, streamTransient, streamFileContent, streamShellOutput, streamSearchResult, streamProgress, streamReasoningStep, streamSubAgent, } from './transient.js';
|
|
10
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/streaming/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,kBAAkB;AAClB,OAAO,EAYN,MAAM,cAAc,CAAC;AAEtB,sBAAsB;AACtB,OAAO,EACL,sBAAsB,EACtB,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,cAAc,GAGf,MAAM,aAAa,CAAC"}
|