@andreprado/agentkit 0.1.0-alpha.16 → 0.1.0-alpha.18
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 +8 -0
- package/docs/guides/add-channel.md +4 -2
- package/docs/guides/add-managed-composio.md +161 -0
- package/docs/guides/channel-security.md +36 -39
- package/docs/guides/connect-telegram.md +3 -1
- package/docs/guides/debug-channel.md +141 -0
- package/docs/guides/prepare-deploy.md +7 -10
- package/docs/llms-full.txt +19 -5
- package/docs/llms.txt +11 -2
- package/package.json +1 -3
- package/src/cli/cloud-client.ts +12 -0
- package/src/cli/commands/channels.ts +119 -7
- package/src/cli/commands/transcribe.ts +171 -0
- package/src/cli/deploy-chat-ui.ts +146 -3
- package/src/cli/deploy-readiness.ts +112 -3
- package/src/cli/help.ts +19 -4
- package/src/cli/index.ts +198 -3
- package/src/create-project.ts +4 -32
- package/src/index.ts +149 -0
- package/src/runtime/chat.ts +2 -1
- package/src/runtime/config.ts +133 -0
- package/src/runtime/core/manifest.ts +31 -2
- package/src/runtime/deploy-readiness.ts +31 -1
- package/src/runtime/inspect.ts +109 -4
- package/src/runtime/integrations/composio.ts +423 -0
- package/src/runtime/skills.ts +95 -0
- package/src/runtime/targets/cloudflare/build.ts +395 -10
- package/src/runtime/tool-runner.ts +2 -1
- package/src/templates/skills/agentkit-capsule/SKILL.md +1 -0
- package/src/templates/skills/agentkit-channels/SKILL.md +2 -0
- package/src/templates/skills/agentkit-channels/references/channel-debugging.md +3 -1
- package/src/templates/skills/agentkit-channels/references/telegram.md +3 -1
- package/src/templates/skills/agentkit-deploy/SKILL.md +1 -1
- package/src/templates/skills/agentkit-integrations/SKILL.md +75 -0
- package/src/templates/skills/agentkit-troubleshooting/SKILL.md +3 -2
- package/docs/guides/agentkit-skills-architecture.md +0 -472
- package/docs/guides/channels-implementation-map.md +0 -243
- package/docs/guides/channels-production-handoff.md +0 -118
- package/docs/portable-deploy-release-checklist.md +0 -41
|
@@ -23,6 +23,8 @@ agentkit channels connect telegram support-telegram
|
|
|
23
23
|
agentkit channels doctor support-telegram
|
|
24
24
|
agentkit channels status support-telegram
|
|
25
25
|
agentkit channels test support-telegram --message "hello"
|
|
26
|
+
agentkit channels test-audio support-telegram --fixture voice-note
|
|
27
|
+
agentkit transcribe smoke --provider groq
|
|
26
28
|
agentkit channels deliveries list support-telegram
|
|
27
29
|
```
|
|
28
30
|
|
|
@@ -67,4 +69,4 @@ export default defineAgent({
|
|
|
67
69
|
});
|
|
68
70
|
```
|
|
69
71
|
|
|
70
|
-
AgentKit validates the Telegram webhook, normalizes `voice` and `audio` payloads, enqueues an audio job, then the retryable channel worker calls Telegram `getFile`, downloads the media with `TELEGRAM_BOT_TOKEN`, sends the bytes to the configured transcription provider, and runs the agent with transcript text. Telegram voice notes are usually OGG/Opus; use Groq in V1 for that path.
|
|
72
|
+
AgentKit validates the Telegram webhook, normalizes `voice` and `audio` payloads, enqueues an audio job, then the retryable channel worker calls Telegram `getFile`, downloads the media with `TELEGRAM_BOT_TOKEN`, sends the bytes to the configured transcription provider, and runs the agent with transcript text. Telegram voice notes are usually OGG/Opus; use Groq in V1 for that path. `test-audio` validates the audio channel ingress path; `transcribe smoke` validates the transcription provider separately.
|
|
@@ -18,6 +18,7 @@ Use this when the owner asks to prepare, test, or run hosted deploy.
|
|
|
18
18
|
|
|
19
19
|
```sh
|
|
20
20
|
npm run typecheck
|
|
21
|
+
npm run agentkit -- skills status
|
|
21
22
|
npm run agentkit -- inspect
|
|
22
23
|
npm run agentkit -- db migrate
|
|
23
24
|
npm run chat -- --message "hello"
|
|
@@ -41,4 +42,3 @@ Open the printed `Chat:` URL and report it to the owner.
|
|
|
41
42
|
## Production Handoff
|
|
42
43
|
|
|
43
44
|
Report changed files, required env/secret names, database schema changes, deploy order, smoke checks, rollback concerns, and whether the provider was still `test/fake`.
|
|
44
|
-
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agentkit-integrations
|
|
3
|
+
description: Use when adding, inspecting, connecting, or troubleshooting AgentKit-managed integrations such as managed Composio in an Agent Capsule.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# AgentKit Integrations
|
|
7
|
+
|
|
8
|
+
Use this when the owner asks for managed connected apps, Gmail/Calendar/Slack/Linear through AgentKit, or paid AgentKit-managed Composio.
|
|
9
|
+
|
|
10
|
+
## Managed Composio
|
|
11
|
+
|
|
12
|
+
Managed Composio is a paid hosted AgentKit feature. Use it when the owner wants AgentKit to manage OAuth/connect links, per-agent connected app state, deploy readiness, and hosted Composio credentials.
|
|
13
|
+
|
|
14
|
+
Use BYO `defineTool` instead when the owner wants to bring their own Composio account/API key.
|
|
15
|
+
|
|
16
|
+
## Config
|
|
17
|
+
|
|
18
|
+
Edit `agentkit.config.ts`:
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
import { composioManaged, defineAgent } from "@andreprado/agentkit";
|
|
22
|
+
|
|
23
|
+
export default defineAgent({
|
|
24
|
+
integrations: [
|
|
25
|
+
composioManaged({
|
|
26
|
+
toolkits: ["gmail", "googlecalendar"],
|
|
27
|
+
tools: {
|
|
28
|
+
gmail: ["GMAIL_FETCH_EMAILS", "GMAIL_SEND_EMAIL"],
|
|
29
|
+
googlecalendar: [
|
|
30
|
+
"GOOGLECALENDAR_EVENTS_LIST",
|
|
31
|
+
"GOOGLECALENDAR_CREATE_EVENT",
|
|
32
|
+
"GOOGLECALENDAR_UPDATE_EVENT",
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
confirmExternalWrites: true,
|
|
36
|
+
}),
|
|
37
|
+
],
|
|
38
|
+
});
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Keep the action list explicit. Do not expose the whole Composio catalog by default.
|
|
42
|
+
|
|
43
|
+
For Google Calendar, do not configure create-only access. Include `GOOGLECALENDAR_EVENTS_LIST` so the agent can inspect availability before writing. For `GOOGLECALENDAR_CREATE_EVENT`, pass UTC `start_datetime` and explicit `event_duration_minutes` or `event_duration_hour`; AgentKit blocks Composio's implicit 30-minute duration default.
|
|
44
|
+
|
|
45
|
+
Managed Composio write actions require tool input `confirmed: true` by default. Set it only after the owner/user confirms the exact external change. Use `confirmExternalWrites: false` only when the capsule implements an equivalent confirmation guard elsewhere.
|
|
46
|
+
|
|
47
|
+
## Commands
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
npm run agentkit -- inspect
|
|
51
|
+
npm run agentkit -- deploy doctor
|
|
52
|
+
npm run agentkit -- deploy
|
|
53
|
+
npm run agentkit -- integrations status --toolkit googlecalendar
|
|
54
|
+
npm run agentkit -- integrations connect composio --toolkit gmail
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Rules
|
|
58
|
+
|
|
59
|
+
- Do not add `COMPOSIO_API_KEY` to `.env.schema` for managed Composio.
|
|
60
|
+
- Do not ask the owner for a Composio key when using managed Composio.
|
|
61
|
+
- Managed Composio requires a non-anonymous hosted deploy and `managed_composio` entitlement.
|
|
62
|
+
- The generated tool is `agentkit_composio_execute`.
|
|
63
|
+
- Use one Composio settings profile per agent.
|
|
64
|
+
|
|
65
|
+
## Verification
|
|
66
|
+
|
|
67
|
+
Expected `inspect` output includes:
|
|
68
|
+
|
|
69
|
+
```txt
|
|
70
|
+
integrations[0].provider = composio
|
|
71
|
+
tools includes agentkit_composio_execute
|
|
72
|
+
managedSecrets includes COMPOSIO_API_KEY
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
If `deploy doctor` reports `managed_composio_entitlement_required`, the owner must log in with a paid AgentKit Cloud account or ask an operator to grant it.
|
|
@@ -18,6 +18,7 @@ Use this when something fails.
|
|
|
18
18
|
|
|
19
19
|
```sh
|
|
20
20
|
npm run agentkit -- inspect
|
|
21
|
+
npm run agentkit -- skills status
|
|
21
22
|
npm run typecheck
|
|
22
23
|
npm run agentkit -- env list
|
|
23
24
|
git status --short
|
|
@@ -48,5 +49,5 @@ npm run agentkit -- deploy doctor
|
|
|
48
49
|
- provider not chosen: stay on `test/fake` or ask the owner;
|
|
49
50
|
- schema missing: run `db migrate` and check `schema.sql`;
|
|
50
51
|
- tool validation failed: check `inputSchema` and `outputSchema`;
|
|
51
|
-
- channel secret missing: set hosted managed secret, not source files
|
|
52
|
-
|
|
52
|
+
- channel secret missing: set hosted managed secret, not source files;
|
|
53
|
+
- local AgentKit skills are stale: run `npm run agentkit -- skills sync`.
|
|
@@ -1,472 +0,0 @@
|
|
|
1
|
-
# AgentKit Skills Architecture
|
|
2
|
-
|
|
3
|
-
## Recommendation
|
|
4
|
-
|
|
5
|
-
Ship AgentKit skills as the default interface for the user's coding agent, while keeping the docs as the canonical source of truth.
|
|
6
|
-
|
|
7
|
-
The current docs remain authoritative:
|
|
8
|
-
|
|
9
|
-
```txt
|
|
10
|
-
docs/llms.txt short router
|
|
11
|
-
docs/llms-full.txt complete operating contract
|
|
12
|
-
docs/guides/*.md task guides
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
Skills should become the context-efficient working surface:
|
|
16
|
-
|
|
17
|
-
```txt
|
|
18
|
-
skills/agentkit-capsule/SKILL.md
|
|
19
|
-
skills/agentkit-tools/SKILL.md
|
|
20
|
-
skills/agentkit-deploy/SKILL.md
|
|
21
|
-
...
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
The default agent path should be:
|
|
25
|
-
|
|
26
|
-
```txt
|
|
27
|
-
AGENTS.md
|
|
28
|
-
-> skills/agentkit-capsule/SKILL.md
|
|
29
|
-
-> one task skill
|
|
30
|
-
-> one reference, example, or template only when needed
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
Do not make `llms-full.txt` part of the default handoff. It is the full contract and should be loaded only for ambiguous framework behavior, internals work, or broad audits.
|
|
34
|
-
|
|
35
|
-
## Problem
|
|
36
|
-
|
|
37
|
-
`docs/llms-full.txt` is useful but too large for ordinary agent work. Loading it by default spends context on deploy, channels, backend contracts, evals, and storage details even when the owner only asked for a prompt change or one tool.
|
|
38
|
-
|
|
39
|
-
The generated capsule files and `agentkit handoff` currently tell coding agents to read the full docs path. That is correct for completeness, but not for context economy.
|
|
40
|
-
|
|
41
|
-
Skills solve this because they use progressive disclosure:
|
|
42
|
-
|
|
43
|
-
- metadata is always discoverable;
|
|
44
|
-
- `SKILL.md` loads only when the task matches;
|
|
45
|
-
- examples, templates, scripts, and references load only when selected by the skill.
|
|
46
|
-
|
|
47
|
-
## Product Contract
|
|
48
|
-
|
|
49
|
-
AgentKit should ship skills out of the box for agents that support repo-local skills.
|
|
50
|
-
|
|
51
|
-
Generated capsules should include:
|
|
52
|
-
|
|
53
|
-
```txt
|
|
54
|
-
skills/
|
|
55
|
-
agentkit-capsule/
|
|
56
|
-
SKILL.md
|
|
57
|
-
references/
|
|
58
|
-
docs-router.md
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
Template-specific and task-specific skills can live either:
|
|
62
|
-
|
|
63
|
-
- inside the generated capsule, for maximum out-of-the-box usability; or
|
|
64
|
-
- inside the installed AgentKit package, copied into the capsule by `agentkit new`.
|
|
65
|
-
|
|
66
|
-
The generated capsule must still include `AGENTS.md`, `AGENTKIT.md`, `CLAUDE.md`, and `README.md` for agents or tools that do not support skills.
|
|
67
|
-
|
|
68
|
-
## Skill Design Rules
|
|
69
|
-
|
|
70
|
-
Each `SKILL.md` should be short and procedural. Target 300-800 words.
|
|
71
|
-
|
|
72
|
-
Every skill should include:
|
|
73
|
-
|
|
74
|
-
- when to use it;
|
|
75
|
-
- files to inspect;
|
|
76
|
-
- files it may edit;
|
|
77
|
-
- exact commands;
|
|
78
|
-
- safety rules;
|
|
79
|
-
- verification;
|
|
80
|
-
- links to optional references, examples, templates, or assets.
|
|
81
|
-
|
|
82
|
-
Each skill should avoid:
|
|
83
|
-
|
|
84
|
-
- duplicating whole guides;
|
|
85
|
-
- copying large code examples into `SKILL.md`;
|
|
86
|
-
- requiring `llms-full.txt` by default;
|
|
87
|
-
- mixing user-capsule workflows with AgentKit maintainer/operator workflows.
|
|
88
|
-
|
|
89
|
-
Use bundled resources this way:
|
|
90
|
-
|
|
91
|
-
```txt
|
|
92
|
-
references/ deeper task notes loaded only when needed
|
|
93
|
-
examples/ source examples the agent may inspect
|
|
94
|
-
templates/ starter files the agent may copy and adapt
|
|
95
|
-
scripts/ deterministic helpers for fragile/repeated tasks
|
|
96
|
-
assets/ files used as output resources
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
## Core Skills To Ship
|
|
100
|
-
|
|
101
|
-
### agentkit-capsule
|
|
102
|
-
|
|
103
|
-
The always-first router for work inside an Agent Capsule.
|
|
104
|
-
|
|
105
|
-
Use when the agent detects `agentkit.config.ts` or the owner asks to build/change an AgentKit agent.
|
|
106
|
-
|
|
107
|
-
Responsibilities:
|
|
108
|
-
|
|
109
|
-
- establish the capsule root as the runtime boundary;
|
|
110
|
-
- read `AGENTS.md` or `AGENTKIT.md`;
|
|
111
|
-
- route to one task skill;
|
|
112
|
-
- prefer `agentkit docs llms` over `agentkit docs full`;
|
|
113
|
-
- load `llms-full.txt` only when the task needs the complete contract;
|
|
114
|
-
- run the baseline checks before completion.
|
|
115
|
-
|
|
116
|
-
Default verification:
|
|
117
|
-
|
|
118
|
-
```sh
|
|
119
|
-
npm run typecheck
|
|
120
|
-
npm run agentkit -- inspect
|
|
121
|
-
npm run chat -- --message "hello"
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
### agentkit-build-agent
|
|
125
|
-
|
|
126
|
-
Use when the owner gives a natural-language brief for a new or changed agent.
|
|
127
|
-
|
|
128
|
-
Responsibilities:
|
|
129
|
-
|
|
130
|
-
- translate the brief into prompt, tools, schema, evals, and assumptions;
|
|
131
|
-
- keep the first useful version runnable with `test/fake` unless the owner chooses a real provider;
|
|
132
|
-
- create domain-specific local behavior without waiting for a wizard;
|
|
133
|
-
- add evals for the expected first behavior.
|
|
134
|
-
|
|
135
|
-
Likely templates:
|
|
136
|
-
|
|
137
|
-
```txt
|
|
138
|
-
templates/support-agent.instructions.md
|
|
139
|
-
templates/appointment-intake.instructions.md
|
|
140
|
-
templates/sales-qualifier.instructions.md
|
|
141
|
-
templates/internal-operations.instructions.md
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
### agentkit-prompts
|
|
145
|
-
|
|
146
|
-
Use when editing `prompts/instructions.md` or designing the agent's behavior.
|
|
147
|
-
|
|
148
|
-
Responsibilities:
|
|
149
|
-
|
|
150
|
-
- define role, boundaries, escalation rules, tone, and tool-use policy;
|
|
151
|
-
- prevent false claims about actions not performed;
|
|
152
|
-
- describe when to use Knowledge versus tools;
|
|
153
|
-
- keep user-facing behavior specific to the owner's domain.
|
|
154
|
-
|
|
155
|
-
Likely templates:
|
|
156
|
-
|
|
157
|
-
```txt
|
|
158
|
-
templates/knowledge-grounded-faq.instructions.md
|
|
159
|
-
templates/appointment-intake.instructions.md
|
|
160
|
-
templates/support-agent.instructions.md
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
### agentkit-tools
|
|
164
|
-
|
|
165
|
-
Use when adding or changing TypeScript tools.
|
|
166
|
-
|
|
167
|
-
Responsibilities:
|
|
168
|
-
|
|
169
|
-
- create `defineTool` tools with input/output schemas;
|
|
170
|
-
- register tools in `agentkit.config.ts`;
|
|
171
|
-
- declare tool secrets and permissions;
|
|
172
|
-
- add timeouts;
|
|
173
|
-
- test tools directly;
|
|
174
|
-
- keep eval runs deterministic and non-destructive.
|
|
175
|
-
|
|
176
|
-
Likely examples:
|
|
177
|
-
|
|
178
|
-
```txt
|
|
179
|
-
examples/lookup-order.tool.ts
|
|
180
|
-
examples/external-api-lookup.tool.ts
|
|
181
|
-
examples/eval-safe-send-email.tool.ts
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
Primary reference: `docs/guides/add-tool.md`.
|
|
185
|
-
|
|
186
|
-
### agentkit-database
|
|
187
|
-
|
|
188
|
-
Use when adding agent-owned tables or database-backed tools.
|
|
189
|
-
|
|
190
|
-
Responsibilities:
|
|
191
|
-
|
|
192
|
-
- edit `schema.sql`;
|
|
193
|
-
- keep schema changes idempotent;
|
|
194
|
-
- use `ctx.db` in tools;
|
|
195
|
-
- avoid local database driver imports;
|
|
196
|
-
- run local migration/seed/shell checks;
|
|
197
|
-
- preserve deploy-compatible `storage.driver: "agentkit"`.
|
|
198
|
-
|
|
199
|
-
Likely templates:
|
|
200
|
-
|
|
201
|
-
```txt
|
|
202
|
-
templates/appointments.schema.sql
|
|
203
|
-
templates/leads.schema.sql
|
|
204
|
-
templates/tickets.schema.sql
|
|
205
|
-
templates/notes.schema.sql
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
Primary reference: `docs/guides/add-tool.md` database section and `docs/guides/prepare-deploy.md`.
|
|
209
|
-
|
|
210
|
-
### agentkit-knowledge
|
|
211
|
-
|
|
212
|
-
Use when the agent should answer from committed source files such as FAQs, prices, policies, CSVs, and procedures.
|
|
213
|
-
|
|
214
|
-
Responsibilities:
|
|
215
|
-
|
|
216
|
-
- create `knowledge/` sources;
|
|
217
|
-
- configure `knowledge.sources`;
|
|
218
|
-
- choose lexical search by default;
|
|
219
|
-
- configure embeddings only when needed;
|
|
220
|
-
- verify with `knowledge sync` and `knowledge search`;
|
|
221
|
-
- keep secrets and live customer data out of Knowledge.
|
|
222
|
-
|
|
223
|
-
Likely templates:
|
|
224
|
-
|
|
225
|
-
```txt
|
|
226
|
-
templates/faq.md
|
|
227
|
-
templates/prices.csv
|
|
228
|
-
templates/policies.md
|
|
229
|
-
```
|
|
230
|
-
|
|
231
|
-
Primary reference: `docs/guides/add-knowledge.md`.
|
|
232
|
-
|
|
233
|
-
### agentkit-provider
|
|
234
|
-
|
|
235
|
-
Use when switching from `test/fake` to a real provider.
|
|
236
|
-
|
|
237
|
-
Responsibilities:
|
|
238
|
-
|
|
239
|
-
- ask the owner which provider to use;
|
|
240
|
-
- update `agentkit.config.ts`;
|
|
241
|
-
- update `.env.schema`;
|
|
242
|
-
- set local secrets through AgentKit commands;
|
|
243
|
-
- verify with chat, inspect, and UI;
|
|
244
|
-
- never import provider SDKs into the capsule.
|
|
245
|
-
|
|
246
|
-
Primary reference: `docs/guides/use-provider.md`.
|
|
247
|
-
|
|
248
|
-
### agentkit-evals
|
|
249
|
-
|
|
250
|
-
Use when adding or running evals.
|
|
251
|
-
|
|
252
|
-
Responsibilities:
|
|
253
|
-
|
|
254
|
-
- create `evals/*.eval.ts`;
|
|
255
|
-
- use deterministic assertions;
|
|
256
|
-
- verify persisted tool calls;
|
|
257
|
-
- avoid real PII and secrets;
|
|
258
|
-
- guard external side effects with `ctx.runtime.environment === "eval"`;
|
|
259
|
-
- run `npm run eval`.
|
|
260
|
-
|
|
261
|
-
Likely templates:
|
|
262
|
-
|
|
263
|
-
```txt
|
|
264
|
-
templates/smoke.eval.ts
|
|
265
|
-
templates/tool-call.eval.ts
|
|
266
|
-
templates/no-leak.eval.ts
|
|
267
|
-
templates/knowledge-answer.eval.ts
|
|
268
|
-
```
|
|
269
|
-
|
|
270
|
-
Primary reference: `docs/guides/run-evals.md`.
|
|
271
|
-
|
|
272
|
-
### agentkit-deploy
|
|
273
|
-
|
|
274
|
-
Use when preparing or running hosted deploy.
|
|
275
|
-
|
|
276
|
-
Responsibilities:
|
|
277
|
-
|
|
278
|
-
- run readiness checks;
|
|
279
|
-
- keep hosting target selection inside AgentKit;
|
|
280
|
-
- use managed secrets, not committed `.env`;
|
|
281
|
-
- run `deploy doctor`;
|
|
282
|
-
- run `deploy --smoke`;
|
|
283
|
-
- run hosted UI checks;
|
|
284
|
-
- report production handoff details when deploy is ready.
|
|
285
|
-
|
|
286
|
-
Primary reference: `docs/guides/prepare-deploy.md`.
|
|
287
|
-
|
|
288
|
-
### agentkit-security
|
|
289
|
-
|
|
290
|
-
Use before or during any work involving secrets, external APIs, tools, evals from conversations, public access, channels, or hosted deploys.
|
|
291
|
-
|
|
292
|
-
Responsibilities:
|
|
293
|
-
|
|
294
|
-
- prevent `.env`, `.agentkit/`, and secret values from being committed;
|
|
295
|
-
- enforce secret-name-only config;
|
|
296
|
-
- confirm tool secrets and permissions;
|
|
297
|
-
- check access mode assumptions;
|
|
298
|
-
- require redaction for client data.
|
|
299
|
-
|
|
300
|
-
Primary reference: `docs/guides/security-rules.md`.
|
|
301
|
-
|
|
302
|
-
### agentkit-channels
|
|
303
|
-
|
|
304
|
-
Use when adding, connecting, testing, or debugging website, Telegram, or WhatsApp channels.
|
|
305
|
-
|
|
306
|
-
Responsibilities:
|
|
307
|
-
|
|
308
|
-
- add channel config helpers;
|
|
309
|
-
- deploy before hosted channel creation;
|
|
310
|
-
- manage provider secret names;
|
|
311
|
-
- verify setup/status/test/delivery logs;
|
|
312
|
-
- separate channels from tools;
|
|
313
|
-
- debug webhook and delivery errors without leaking provider payloads.
|
|
314
|
-
|
|
315
|
-
Likely references:
|
|
316
|
-
|
|
317
|
-
```txt
|
|
318
|
-
references/telegram.md
|
|
319
|
-
references/whatsapp-zapster.md
|
|
320
|
-
references/channel-debugging.md
|
|
321
|
-
```
|
|
322
|
-
|
|
323
|
-
Primary references:
|
|
324
|
-
|
|
325
|
-
- `docs/guides/add-channel.md`
|
|
326
|
-
- `docs/guides/connect-telegram.md`
|
|
327
|
-
- `docs/guides/connect-whatsapp-zapster.md`
|
|
328
|
-
- `docs/guides/debug-channel.md`
|
|
329
|
-
- `docs/guides/channel-security.md`
|
|
330
|
-
|
|
331
|
-
### agentkit-troubleshooting
|
|
332
|
-
|
|
333
|
-
Use when AgentKit commands fail or the agent is unsure which task skill applies.
|
|
334
|
-
|
|
335
|
-
Responsibilities:
|
|
336
|
-
|
|
337
|
-
- start from the error code;
|
|
338
|
-
- run `inspect`;
|
|
339
|
-
- check config, secrets, package install, provider, storage, and channel state;
|
|
340
|
-
- route to a more specific skill;
|
|
341
|
-
- load `llms-full.txt` only when narrower references cannot explain the behavior.
|
|
342
|
-
|
|
343
|
-
Primary reference: `docs/llms-full.txt` troubleshooting section.
|
|
344
|
-
|
|
345
|
-
## Maintainer-Only Skills
|
|
346
|
-
|
|
347
|
-
Do not ship these into user capsules by default:
|
|
348
|
-
|
|
349
|
-
- control-plane deploy;
|
|
350
|
-
- operator dashboard;
|
|
351
|
-
- account grant/revoke;
|
|
352
|
-
- backend contract implementation;
|
|
353
|
-
- Cloudflare/Turso/R2 provisioning internals;
|
|
354
|
-
- release-lane ownership;
|
|
355
|
-
- package publishing.
|
|
356
|
-
|
|
357
|
-
Those workflows belong in maintainer skills inside the AgentKit repository, not in generated user capsules.
|
|
358
|
-
|
|
359
|
-
Suggested maintainer skills:
|
|
360
|
-
|
|
361
|
-
```txt
|
|
362
|
-
skills/agentkit-maintainer-control-plane/
|
|
363
|
-
skills/agentkit-maintainer-channels/
|
|
364
|
-
skills/agentkit-maintainer-release/
|
|
365
|
-
```
|
|
366
|
-
|
|
367
|
-
## Generated Capsule Shape
|
|
368
|
-
|
|
369
|
-
V1 generated capsules should contain:
|
|
370
|
-
|
|
371
|
-
```txt
|
|
372
|
-
AGENTS.md
|
|
373
|
-
AGENTKIT.md
|
|
374
|
-
CLAUDE.md
|
|
375
|
-
README.md
|
|
376
|
-
skills/
|
|
377
|
-
agentkit-capsule/
|
|
378
|
-
SKILL.md
|
|
379
|
-
references/
|
|
380
|
-
docs-router.md
|
|
381
|
-
agentkit-build-agent/
|
|
382
|
-
SKILL.md
|
|
383
|
-
templates/
|
|
384
|
-
support-agent.instructions.md
|
|
385
|
-
appointment-intake.instructions.md
|
|
386
|
-
agentkit-prompts/
|
|
387
|
-
SKILL.md
|
|
388
|
-
templates/
|
|
389
|
-
support-agent.instructions.md
|
|
390
|
-
knowledge-grounded-faq.instructions.md
|
|
391
|
-
agentkit-tools/
|
|
392
|
-
SKILL.md
|
|
393
|
-
examples/
|
|
394
|
-
lookup-order.tool.ts
|
|
395
|
-
database-write.tool.ts
|
|
396
|
-
eval-safe-external-action.tool.ts
|
|
397
|
-
agentkit-database/
|
|
398
|
-
SKILL.md
|
|
399
|
-
templates/
|
|
400
|
-
appointments.schema.sql
|
|
401
|
-
leads.schema.sql
|
|
402
|
-
agentkit-evals/
|
|
403
|
-
SKILL.md
|
|
404
|
-
templates/
|
|
405
|
-
smoke.eval.ts
|
|
406
|
-
tool-call.eval.ts
|
|
407
|
-
agentkit-deploy/
|
|
408
|
-
SKILL.md
|
|
409
|
-
agentkit-security/
|
|
410
|
-
SKILL.md
|
|
411
|
-
```
|
|
412
|
-
|
|
413
|
-
Channel, Knowledge, provider, and troubleshooting skills are copied into every generated capsule. Since skills are context-lazy, the main tradeoff is filesystem size, not context usage.
|
|
414
|
-
|
|
415
|
-
## Handoff Changes
|
|
416
|
-
|
|
417
|
-
Change generated `AGENTS.md` and `AGENTKIT.md` from:
|
|
418
|
-
|
|
419
|
-
```txt
|
|
420
|
-
Read AGENTKIT.md and the full docs path from npm run agentkit -- docs full.
|
|
421
|
-
```
|
|
422
|
-
|
|
423
|
-
To:
|
|
424
|
-
|
|
425
|
-
```txt
|
|
426
|
-
Start with skills/agentkit-capsule/SKILL.md.
|
|
427
|
-
Use npm run agentkit -- docs llms as the docs router.
|
|
428
|
-
Read npm run agentkit -- docs full only when a skill tells you the complete contract is needed.
|
|
429
|
-
```
|
|
430
|
-
|
|
431
|
-
Change `agentkit handoff codex|claude` so it points to:
|
|
432
|
-
|
|
433
|
-
```txt
|
|
434
|
-
Read these files first:
|
|
435
|
-
- AGENTKIT.md
|
|
436
|
-
- skills/agentkit-capsule/SKILL.md
|
|
437
|
-
- the path printed by npm run agentkit -- docs llms
|
|
438
|
-
```
|
|
439
|
-
|
|
440
|
-
It should not include the concrete `llms-full.txt` path by default. It may mention that `llms-full.txt` exists for complete-contract checks.
|
|
441
|
-
|
|
442
|
-
## CLI Packaging
|
|
443
|
-
|
|
444
|
-
Keep the first version simple:
|
|
445
|
-
|
|
446
|
-
```sh
|
|
447
|
-
agentkit new <name> --template blank
|
|
448
|
-
```
|
|
449
|
-
|
|
450
|
-
The generated capsule receives the default skill pack automatically. Add `agentkit skills list/install` later only if users need to refresh or extend skill packs in existing capsules.
|
|
451
|
-
|
|
452
|
-
## Acceptance Criteria
|
|
453
|
-
|
|
454
|
-
The skills architecture is working when:
|
|
455
|
-
|
|
456
|
-
- a new capsule contains a `skills/` directory;
|
|
457
|
-
- `AGENTS.md` points to `skills/agentkit-capsule/SKILL.md`;
|
|
458
|
-
- `agentkit handoff codex` points to the skill router and `docs llms`, not `llms-full.txt`;
|
|
459
|
-
- ordinary prompt/tool/database tasks do not require loading `llms-full.txt`;
|
|
460
|
-
- each skill has focused verification commands;
|
|
461
|
-
- examples and templates live beside skills and are loaded only when needed;
|
|
462
|
-
- docs remain canonical and tests still verify packaged docs sync;
|
|
463
|
-
- user capsules do not include maintainer/operator skills by default.
|
|
464
|
-
|
|
465
|
-
## Rollout Plan
|
|
466
|
-
|
|
467
|
-
1. Add the default skill pack under `packages/agentkit/src/templates/skills` or another package-owned source directory.
|
|
468
|
-
2. Update `blank`, `support`, and `dentista` templates to copy the skill pack.
|
|
469
|
-
3. Update generated `AGENTS.md`, `AGENTKIT.md`, and `CLAUDE.md` to prefer skills and `docs llms`.
|
|
470
|
-
4. Update `agentkit handoff` to prefer the skill router.
|
|
471
|
-
5. Add tests that generated capsules contain the default skills and no longer nudge default handoff to `llms-full.txt`.
|
|
472
|
-
6. Keep `agentkit docs full` available for complete-contract audits.
|