@andreprado/agentkit 0.1.0-alpha.3 → 0.1.0-alpha.5

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.
@@ -65,6 +65,7 @@ node_modules/
65
65
  contents: `# Optional: only needed after switching agentkit.config.ts to a Pi-backed real provider.
66
66
  OPENAI_API_KEY=
67
67
  ANTHROPIC_API_KEY=
68
+ OPENROUTER_API_KEY=
68
69
  `,
69
70
  },
70
71
  {
@@ -151,6 +152,7 @@ Start building immediately:
151
152
  - Edit \`prompts/instructions.md\` for the agent behavior.
152
153
  - Edit \`agentkit.config.ts\` for provider, tools, secrets, access, and storage.
153
154
  - Add TypeScript tools under \`tools/\` when the requested agent needs actions or external data.
155
+ - Do not wait for a wizard or recipe. AgentKit provides the scaffold and contract; you decide the implementation from the owner's brief.
154
156
  - Ask follow-up questions only when missing information blocks a safe local implementation.
155
157
  - State assumptions in the final response.
156
158
 
@@ -170,6 +172,13 @@ Start building immediately:
170
172
  - \`npm run agentkit -- env list\`: list local secret names without printing values.
171
173
  - \`npm run agentkit -- docs full\`: print the full AgentKit contract path.
172
174
 
175
+ ## Testing With A UI
176
+
177
+ - Local UI: run \`npm run dev\`, open the printed \`Chat:\` URL, and tell the owner the exact URL.
178
+ - 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.
179
+ - \`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.
180
+ - 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.
181
+
173
182
  This blank capsule starts with the built-in \`test/fake\` provider, so local chat works without secrets or internet access. It is also deploy-ready by default: the user can edit the prompt, add tools, and run \`npm run agentkit -- deploy\`.
174
183
 
175
184
  ## Local Runtime Contract
@@ -213,11 +222,13 @@ Use \`ctx.db\` as the canonical helper. \`ctx.database\` and \`ctx.storage.sql\`
213
222
  - Put production secret values into managed secrets with \`npm run agentkit -- secret set <NAME> --from-local-env\`, \`--from-env\`, or \`--stdin\`, not into committed files or shell history.
214
223
  - The user should not choose a deploy target, create hosted databases, create buckets, copy production secrets into this capsule, or run operator/admin commands.
215
224
  - Hosted deploy writes the local chat/UI deploy access token to \`.agentkit/chat-access-token.json\`. Create extra client-facing tokens with \`npm run agentkit -- access token create <name> --out <path>\`.
225
+ - Use \`npm run agentkit -- deploy --smoke "hello"\` or \`npm run agentkit -- deploy smoke --message "hello"\` for an official hosted chat smoke check.
216
226
 
217
227
  ## Rules
218
228
 
219
229
  - Keep required local secret names in \`.env.schema\` and values in ignored \`.env\`. AgentKit local commands load \`.env\` directly.
220
230
  - Real providers are resolved by AgentKit through the internal Pi SDK backend; keep project code on \`@andreprado/agentkit\`.
231
+ - The owner must choose the real provider before you switch from \`test/fake\`. Update \`agentkit.config.ts\`, \`.env.schema\`, and local/hosted secrets after that choice.
221
232
  - Do not commit \`.env\` or \`.agentkit/\`.
222
233
  - Edit the agent contract in \`agentkit.config.ts\`.
223
234
  - Edit instructions in \`prompts/instructions.md\`.
@@ -243,6 +254,7 @@ Turn the request into a working local capsule:
243
254
  - Update \`agentkit.config.ts\` when tools, secrets, provider, or access rules change.
244
255
  - Add TypeScript tools under \`tools/\` for real actions or external data.
245
256
  - Keep the first version runnable with \`test/fake\` unless the owner explicitly asks for a real provider.
257
+ - Do not use a wizard or recipe. Build the capsule directly from the scaffold, the AgentKit contract, and the owner's brief.
246
258
  - Make practical assumptions and list them in your final response.
247
259
  - Ask follow-up questions only when missing information blocks a safe local implementation.
248
260
 
@@ -254,6 +266,8 @@ npm run agentkit -- inspect
254
266
  npm run chat -- --message "hello"
255
267
  \`\`\`
256
268
 
269
+ \`test/fake\` proves the scaffold and deterministic tool paths. It does not prove natural conversation quality.
270
+
257
271
  \`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.
258
272
 
259
273
  Set local development secrets without opening code:
@@ -264,6 +278,27 @@ npm run agentkit -- inspect
264
278
  npm run chat -- --message "hello"
265
279
  \`\`\`
266
280
 
281
+ ## Testing With A UI
282
+
283
+ Local UI:
284
+
285
+ \`\`\`sh
286
+ npm run dev
287
+ \`\`\`
288
+
289
+ Open the printed \`Chat:\` URL and tell the owner the exact URL.
290
+
291
+ Hosted deploy UI:
292
+
293
+ \`\`\`sh
294
+ npm run agentkit -- deploy
295
+ npm run agentkit -- chat-ui --deploy
296
+ \`\`\`
297
+
298
+ Open the printed \`Chat:\` URL and tell the owner this local UI is connected to the hosted deploy.
299
+
300
+ 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.
301
+
267
302
  If you add a tool, also run a fake-provider tool smoke test:
268
303
 
269
304
  \`\`\`sh
@@ -287,6 +322,7 @@ This capsule is hosted-deploy ready by default.
287
322
  5. Put production secrets into managed secrets with \`npm run agentkit -- secret set <NAME> --from-local-env\`, \`--from-env\`, or \`--stdin\`.
288
323
  6. Run \`npm run agentkit -- deploy\`.
289
324
  7. Run \`npm run agentkit -- chat-ui --deploy\` to test the hosted agent through a local UI using the auto-created \`.agentkit/chat-access-token.json\`. Create extra client-facing deploy access tokens with \`npm run agentkit -- access token create <name> --out <path>\` when a separate website or app needs its own credential.
325
+ 8. Use \`npm run agentkit -- deploy --smoke "hello"\` during deploy or \`npm run agentkit -- deploy smoke --message "hello"\` afterward for an official hosted smoke check.
290
326
 
291
327
  AgentKit owns hosted infrastructure and production secrets. Do not put production secret values in this capsule. Do not run operator/admin commands from a user capsule.
292
328
  `,
@@ -303,6 +339,7 @@ Use AgentKit conventions when editing this project.
303
339
  - Local runtime state lives in \`.agentkit/\` and should not be committed.
304
340
  - The default provider is \`test/fake\`, which needs no secrets.
305
341
  - Real providers run through AgentKit's internal Pi SDK backend.
342
+ - Ask the owner which real provider to use before switching from \`test/fake\`; do not choose OpenRouter, OpenAI, or Anthropic automatically.
306
343
  - Production secrets must be managed secrets, not committed files.
307
344
  - Keep required local secret names in \`.env.schema\` and values in ignored \`.env\`. AgentKit local commands load \`.env\` directly.
308
345
  - Treat the owner's natural-language request as the brief and start implementing inside this capsule.
@@ -328,6 +365,10 @@ When a real provider or tool needs a local development secret, keep the required
328
365
 
329
366
  \`npm run dev\` runs the whole capsule locally. It should expose local chat, API, inspect, and storage endpoints.
330
367
 
368
+ 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.
369
+
370
+ \`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.
371
+
331
372
  ## Files
332
373
 
333
374
  - \`agentkit.config.ts\`: agent contract.