@andreprado/agentkit 0.1.0-alpha.21 → 0.1.0-alpha.22
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/docs/guides/add-managed-composio.md +3 -1
- package/docs/guides/add-tool.md +6 -3
- package/docs/guides/create-agent.md +6 -4
- package/docs/guides/prepare-deploy.md +1 -1
- package/docs/guides/run-evals.md +5 -1
- package/docs/guides/use-provider.md +26 -2
- package/docs/llms-full.txt +33 -5
- package/docs/llms.txt +4 -2
- package/package.json +1 -1
- package/src/cli/deploy-chat-ui.ts +86 -15
- package/src/cli/index.ts +107 -8
- package/src/index.ts +1 -1
- package/src/providers/pi.ts +12 -2
- package/src/runtime/chat.ts +7 -1
- package/src/runtime/config.ts +1 -1
- package/src/runtime/evals.ts +39 -24
- package/src/templates/blank.ts +29 -6
- package/src/templates/dentista.ts +22 -4
- package/src/templates/skills/agentkit-build-agent/SKILL.md +30 -2
- package/src/templates/skills/agentkit-capsule/SKILL.md +21 -0
- package/src/templates/skills/agentkit-database/SKILL.md +11 -0
- package/src/templates/skills/agentkit-deploy/SKILL.md +2 -0
- package/src/templates/skills/agentkit-evals/SKILL.md +15 -0
- package/src/templates/skills/agentkit-improve/SKILL.md +14 -4
- package/src/templates/skills/agentkit-integrations/SKILL.md +22 -0
- package/src/templates/skills/agentkit-provider/SKILL.md +20 -2
- package/src/templates/skills/agentkit-tools/SKILL.md +2 -0
- package/src/templates/support.ts +30 -7
package/src/templates/support.ts
CHANGED
|
@@ -64,6 +64,7 @@ node_modules/
|
|
|
64
64
|
OPENAI_API_KEY=
|
|
65
65
|
ANTHROPIC_API_KEY=
|
|
66
66
|
OPENROUTER_API_KEY=
|
|
67
|
+
OPENCODE_API_KEY=
|
|
67
68
|
`,
|
|
68
69
|
},
|
|
69
70
|
{
|
|
@@ -193,7 +194,7 @@ This is an AgentKit support Agent Capsule.
|
|
|
193
194
|
|
|
194
195
|
## Coding Agent Workflow
|
|
195
196
|
|
|
196
|
-
When the owner opens this folder in Codex, Claude Code, or another coding agent and asks for a specific support agent, treat that request as the product brief.
|
|
197
|
+
When the owner opens this folder in Codex, Claude Code, or another coding agent and asks for a specific support agent, treat that request as the product brief. The owner should not need to run a separate AgentKit wizard or prepare a brief file.
|
|
197
198
|
|
|
198
199
|
Start building immediately:
|
|
199
200
|
|
|
@@ -203,11 +204,26 @@ Start building immediately:
|
|
|
203
204
|
- Edit \`prompts/instructions.md\` for support behavior.
|
|
204
205
|
- Edit \`agentkit.config.ts\` for provider, tools, secrets, access, and storage.
|
|
205
206
|
- Add or replace TypeScript tools under \`tools/\` when the requested support agent needs actions or external data.
|
|
207
|
+
- When the support agent needs to save durable records, complete the full slice: schema/migration, tool, config registration, prompt instructions, direct tool check, and eval.
|
|
206
208
|
- Add \`sync.ts\`, \`seed.sql\`, and ordered \`migrations/*.sql\` when the support agent depends on external catalogs or production-shaped data changes.
|
|
207
209
|
- Do not wait for a wizard or recipe. AgentKit provides the scaffold and contract; you decide the implementation from the owner's brief.
|
|
208
210
|
- Ask follow-up questions only when missing information blocks a safe local implementation.
|
|
209
211
|
- State assumptions in the final response.
|
|
210
212
|
|
|
213
|
+
## Proactive Agent Builder Contract
|
|
214
|
+
|
|
215
|
+
Do not only edit prompts. For every meaningful requirement in the owner's request or \`AGENT_SPEC.md\`, decide what should enforce it:
|
|
216
|
+
|
|
217
|
+
- spec entry for the product contract;
|
|
218
|
+
- prompt instruction for behavior, tone, boundaries, intake, and escalation;
|
|
219
|
+
- tool plus config registration for actions, live data, external writes, or authorization-sensitive data;
|
|
220
|
+
- schema/migration plus tool for durable records;
|
|
221
|
+
- eval for privacy, confirmation, required fields, date/time behavior, business rules, and regressions;
|
|
222
|
+
- fixture, seed data, fake branch, or direct tool check for integrations and failure paths;
|
|
223
|
+
- deploy/readiness check for hosted secrets, channels, integrations, or production access.
|
|
224
|
+
|
|
225
|
+
If a rule protects privacy, money, bookings, external writes, customer data, business hours, or safety, it must have an eval or deterministic check before you call the capsule done. If a real conversation exposes a bug, convert it into the smallest regression eval before or alongside the fix.
|
|
226
|
+
|
|
211
227
|
## Local Commands
|
|
212
228
|
|
|
213
229
|
- \`npm install\`: restore capsule dependencies if this capsule used \`--no-install\`, install failed, or \`node_modules\` was deleted.
|
|
@@ -229,7 +245,7 @@ Start building immediately:
|
|
|
229
245
|
- Local UI: run \`npm run dev\`, open the printed \`Chat:\` URL, and tell the owner the exact URL.
|
|
230
246
|
- Hosted UI: after \`npm run agentkit -- deploy\`, run \`npm run agentkit -- chat-ui --deploy\`, open the printed \`Chat:\` URL, and tell the owner it is connected to the hosted deploy.
|
|
231
247
|
- \`test/fake\` is deterministic. It is useful for scaffold checks, direct tool checks, and fake-provider evals, but it does not validate natural conversation quality.
|
|
232
|
-
- Before claiming real conversation behavior is tested, ask the owner which provider to use: OpenRouter, OpenAI, Anthropic, or another supported provider. Do not choose for them.
|
|
248
|
+
- Before claiming real conversation behavior is tested, ask the owner which provider to use: OpenRouter, OpenAI, Anthropic, OpenCode Zen, OpenCode Go, or another supported provider. Do not choose for them.
|
|
233
249
|
|
|
234
250
|
## Hosted Deploy
|
|
235
251
|
|
|
@@ -262,7 +278,9 @@ This folder is an AgentKit support Agent Capsule.
|
|
|
262
278
|
|
|
263
279
|
## Start Here
|
|
264
280
|
|
|
265
|
-
If the owner asks you to build an agent in natural language, that request is the brief. Do not ask them to fill another file first.
|
|
281
|
+
If the owner asks you to build an agent in natural language, that request is the brief. Do not ask them to run a wizard or fill another file first.
|
|
282
|
+
|
|
283
|
+
Build a testable capsule, not only a prompt.
|
|
266
284
|
|
|
267
285
|
Example owner request:
|
|
268
286
|
|
|
@@ -274,7 +292,10 @@ Turn the request into a working local capsule:
|
|
|
274
292
|
- Create or update \`AGENT_SPEC.md\` with \`npm run agentkit -- spec init --brief "<owner request>"\`. The owner gives the general idea; the coding agent turns it into the structured contract.
|
|
275
293
|
- Update \`agentkit.config.ts\` when tools, secrets, provider, or access rules change.
|
|
276
294
|
- Add, replace, or remove TypeScript tools under \`tools/\` for real actions or external data.
|
|
295
|
+
- For durable records, implement the full schema/tool/prompt/eval slice instead of only adding a table or only adding a tool.
|
|
277
296
|
- Use \`npm run agentkit -- sync init\` when the agent needs catalog sync, fixture seed data, or ordered migrations.
|
|
297
|
+
- For every privacy, confirmation, required-intake, timezone, business-hour, integration-error, or no-leak rule, add an eval, fixture, fake branch, or direct tool check.
|
|
298
|
+
- Convert failed or surprising real conversations into regression evals with \`npm run agentkit -- eval from-conversation <conversation-id>\`.
|
|
278
299
|
- Keep the first version runnable with \`test/fake\` unless the owner explicitly asks for a real provider.
|
|
279
300
|
- Do not use a wizard or recipe. Build the capsule directly from the scaffold, the AgentKit contract, and the owner's brief.
|
|
280
301
|
- Make practical assumptions and list them in your final response.
|
|
@@ -291,6 +312,8 @@ npm run eval
|
|
|
291
312
|
|
|
292
313
|
\`test/fake\` proves the scaffold and deterministic tool paths. It does not prove natural conversation quality.
|
|
293
314
|
|
|
315
|
+
Before saying the agent is done, make sure important requirements have matching checks. Prompt-only changes are not enough for privacy, external writes, bookings, customer data, business hours, or integration failures.
|
|
316
|
+
|
|
294
317
|
\`agentkit new\` installs dependencies by default. Run \`npm install\` only if the capsule was created with \`--no-install\`, install failed, or \`node_modules\` was deleted.
|
|
295
318
|
|
|
296
319
|
Set local development secrets without opening code:
|
|
@@ -320,7 +343,7 @@ npm run agentkit -- chat-ui --deploy
|
|
|
320
343
|
|
|
321
344
|
Open the printed \`Chat:\` URL and tell the owner this local UI is connected to the hosted deploy.
|
|
322
345
|
|
|
323
|
-
Before claiming real conversation behavior has been tested, ask the owner which provider to use: OpenRouter, OpenAI, Anthropic, or another supported provider. Do not choose for them. After they choose, update \`agentkit.config.ts\`, \`.env.schema\`, local secrets, hosted secrets if deploying, then rerun chat/UI checks.
|
|
346
|
+
Before claiming real conversation behavior has been tested, ask the owner which provider to use: OpenRouter, OpenAI, Anthropic, OpenCode Zen, OpenCode Go, or another supported provider. Do not choose for them. After they choose, update \`agentkit.config.ts\`, \`.env.schema\`, local secrets, hosted secrets if deploying, then rerun chat/UI checks.
|
|
324
347
|
|
|
325
348
|
If you add a tool, also run a fake-provider tool smoke test:
|
|
326
349
|
|
|
@@ -348,7 +371,7 @@ The recommended dual-storage pattern is:
|
|
|
348
371
|
4. Use \`npm run agentkit -- db migrate\`, \`db reset --yes\`, \`db seed\`, and \`db shell\` for local database setup and inspection.
|
|
349
372
|
5. Run \`npm run agentkit -- deploy\`. AgentKit migrates/provisions hosted storage internally.
|
|
350
373
|
|
|
351
|
-
\`schema.sql\` is an idempotent bootstrap file
|
|
374
|
+
\`schema.sql\` is an idempotent bootstrap file. Use \`CREATE TABLE IF NOT EXISTS\`, \`CREATE INDEX IF NOT EXISTS\`, and safe additive changes. Use ordered \`migrations/*.sql\` for production-shaped schema evolution; \`npm run agentkit -- db migrate\` applies unapplied local migrations before \`schema.sql\`.
|
|
352
375
|
|
|
353
376
|
## Hosted Deploy
|
|
354
377
|
|
|
@@ -374,7 +397,7 @@ Use AgentKit conventions when editing this support capsule.
|
|
|
374
397
|
- The agent contract lives in \`agentkit.config.ts\`.
|
|
375
398
|
- The example tool lives in \`tools/lookup-order.ts\`.
|
|
376
399
|
- The default provider is \`test/fake\`, which can call tools from JSON messages during local tests.
|
|
377
|
-
- Ask the owner which real provider to use before switching from \`test/fake\`; do not choose OpenRouter, OpenAI, or
|
|
400
|
+
- Ask the owner which real provider to use before switching from \`test/fake\`; do not choose OpenRouter, OpenAI, Anthropic, OpenCode Zen, or OpenCode Go automatically.
|
|
378
401
|
- Keep required local secret names in \`.env.schema\` and values in ignored \`.env\`. AgentKit local commands load \`.env\` directly.
|
|
379
402
|
- Treat the owner's natural-language request as the brief and start implementing inside this capsule.
|
|
380
403
|
- Start with \`skills/agentkit-capsule/SKILL.md\` when the task is not obvious.
|
|
@@ -398,7 +421,7 @@ npm run dev
|
|
|
398
421
|
\`agentkit new\` installs dependencies by default. Run \`npm install\` only if this capsule was created with \`--no-install\`, install failed, or \`node_modules\` was deleted.
|
|
399
422
|
|
|
400
423
|
The support template includes a local \`lookup_order\` TypeScript tool and uses \`test/fake\` by default.
|
|
401
|
-
\`test/fake\` does not validate real conversation quality. The owner must choose OpenRouter, OpenAI, Anthropic, or another supported provider before real model behavior is tested.
|
|
424
|
+
\`test/fake\` does not validate real conversation quality. The owner must choose OpenRouter, OpenAI, Anthropic, OpenCode Zen, OpenCode Go, or another supported provider before real model behavior is tested.
|
|
402
425
|
|
|
403
426
|
For UI testing, run \`npm run dev\` and open the printed \`Chat:\` URL. After hosted deploy, run \`npm run agentkit -- chat-ui --deploy\` and open its printed \`Chat:\` URL.
|
|
404
427
|
`,
|