@inkeep/create-agents 0.0.0-dev-20250916184039 → 0.0.0-dev-20250916190005

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/dist/utils.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare const defaultDualModelConfigurations: {
1
+ export declare const defaultGoogleModelConfigurations: {
2
2
  base: {
3
3
  model: string;
4
4
  };
@@ -36,6 +36,7 @@ export declare const createAgents: (args?: {
36
36
  templateName?: string;
37
37
  openAiKey?: string;
38
38
  anthropicKey?: string;
39
+ googleKey?: string;
39
40
  template?: string;
40
41
  customProjectId?: string;
41
42
  }) => Promise<void>;
package/dist/utils.js CHANGED
@@ -1,20 +1,20 @@
1
- import color from 'picocolors';
2
1
  import * as p from '@clack/prompts';
3
- import fs from 'fs-extra';
4
2
  import { exec } from 'child_process';
5
- import { promisify } from 'util';
3
+ import fs from 'fs-extra';
6
4
  import path from 'path';
5
+ import color from 'picocolors';
6
+ import { promisify } from 'util';
7
7
  import { cloneTemplate, getAvailableTemplates } from './templates.js';
8
8
  const execAsync = promisify(exec);
9
- export const defaultDualModelConfigurations = {
9
+ export const defaultGoogleModelConfigurations = {
10
10
  base: {
11
- model: 'anthropic/claude-sonnet-4-20250514',
11
+ model: 'google/gemini-2.5-flash',
12
12
  },
13
13
  structuredOutput: {
14
- model: 'openai/gpt-4.1-mini-2025-04-14',
14
+ model: 'google/gemini-2.5-flash-lite',
15
15
  },
16
16
  summarizer: {
17
- model: 'openai/gpt-4.1-nano-2025-04-14',
17
+ model: 'google/gemini-2.5-flash-lite',
18
18
  },
19
19
  };
20
20
  export const defaultOpenaiModelConfigurations = {
@@ -33,14 +33,14 @@ export const defaultAnthropicModelConfigurations = {
33
33
  model: 'anthropic/claude-sonnet-4-20250514',
34
34
  },
35
35
  structuredOutput: {
36
- model: 'anthropic/claude-sonnet-4-20250514',
36
+ model: 'anthropic/claude-3-5-haiku-20241022',
37
37
  },
38
38
  summarizer: {
39
- model: 'anthropic/claude-sonnet-4-20250514',
39
+ model: 'anthropic/claude-3-5-haiku-20241022',
40
40
  },
41
41
  };
42
42
  export const createAgents = async (args = {}) => {
43
- let { dirName, openAiKey, anthropicKey, template, customProjectId } = args;
43
+ let { dirName, openAiKey, anthropicKey, googleKey, template, customProjectId } = args;
44
44
  const tenantId = 'default';
45
45
  const manageApiPort = '3002';
46
46
  const runApiPort = '3003';
@@ -97,6 +97,7 @@ export const createAgents = async (args = {}) => {
97
97
  options: [
98
98
  { value: 'anthropic', label: 'Anthropic only' },
99
99
  { value: 'openai', label: 'OpenAI only' },
100
+ { value: 'google', label: 'Google only' },
100
101
  ],
101
102
  });
102
103
  if (p.isCancel(providerChoice)) {
@@ -121,7 +122,7 @@ export const createAgents = async (args = {}) => {
121
122
  }
122
123
  anthropicKey = anthropicKeyResponse;
123
124
  }
124
- if (providerChoice === 'openai') {
125
+ else if (providerChoice === 'openai') {
125
126
  const openAiKeyResponse = await p.text({
126
127
  message: 'Enter your OpenAI API key:',
127
128
  placeholder: 'sk-...',
@@ -138,49 +139,41 @@ export const createAgents = async (args = {}) => {
138
139
  }
139
140
  openAiKey = openAiKeyResponse;
140
141
  }
141
- }
142
- else {
143
- // If some keys are provided via CLI args, prompt for missing ones
144
- if (!anthropicKey) {
145
- const anthropicKeyResponse = await p.text({
146
- message: 'Enter your Anthropic API key (optional):',
147
- placeholder: 'sk-ant-...',
148
- defaultValue: '',
149
- });
150
- if (p.isCancel(anthropicKeyResponse)) {
151
- p.cancel('Operation cancelled');
152
- process.exit(0);
153
- }
154
- anthropicKey = anthropicKeyResponse || undefined;
155
- }
156
- if (!openAiKey) {
157
- const openAiKeyResponse = await p.text({
158
- message: 'Enter your OpenAI API key (optional):',
159
- placeholder: 'sk-...',
160
- defaultValue: '',
142
+ else if (providerChoice === 'google') {
143
+ const googleKeyResponse = await p.text({
144
+ message: 'Enter your Google API key:',
145
+ placeholder: 'AIzaSy...',
146
+ validate: (value) => {
147
+ if (!value || value.trim() === '') {
148
+ return 'Google API key is required';
149
+ }
150
+ return undefined;
151
+ },
161
152
  });
162
- if (p.isCancel(openAiKeyResponse)) {
153
+ if (p.isCancel(googleKeyResponse)) {
163
154
  p.cancel('Operation cancelled');
164
155
  process.exit(0);
165
156
  }
166
- openAiKey = openAiKeyResponse || undefined;
157
+ googleKey = googleKeyResponse;
167
158
  }
168
159
  }
169
160
  let defaultModelSettings = {};
170
- if (anthropicKey && openAiKey) {
171
- defaultModelSettings = defaultDualModelConfigurations;
172
- }
173
- else if (anthropicKey) {
161
+ if (anthropicKey) {
174
162
  defaultModelSettings = defaultAnthropicModelConfigurations;
175
163
  }
176
164
  else if (openAiKey) {
177
165
  defaultModelSettings = defaultOpenaiModelConfigurations;
178
166
  }
167
+ else if (googleKey) {
168
+ defaultModelSettings = defaultGoogleModelConfigurations;
169
+ }
179
170
  const s = p.spinner();
180
171
  s.start('Creating directory structure...');
181
172
  try {
182
173
  const agentsTemplateRepo = 'https://github.com/inkeep/create-agents-template';
183
- const projectTemplateRepo = templateName ? `https://github.com/inkeep/agents-cookbook/templates/${templateName}` : null;
174
+ const projectTemplateRepo = templateName
175
+ ? `https://github.com/inkeep/agents-cookbook/templates/${templateName}`
176
+ : null;
184
177
  const directoryPath = path.resolve(process.cwd(), dirName);
185
178
  // Check if directory already exists
186
179
  if (await fs.pathExists(directoryPath)) {
@@ -284,6 +277,17 @@ DB_FILE_NAME=file:./local.db
284
277
  # AI Provider Keys
285
278
  ANTHROPIC_API_KEY=${config.anthropicKey || 'your-anthropic-key-here'}
286
279
  OPENAI_API_KEY=${config.openAiKey || 'your-openai-key-here'}
280
+ GOOGLE_GENERATIVE_AI_API_KEY=${config.googleKey || 'your-google-key-here'}
281
+
282
+ # Logging
283
+ LOG_LEVEL=debug
284
+
285
+ # Service Ports
286
+ MANAGE_API_PORT=${config.manageApiPort}
287
+ RUN_API_PORT=${config.runApiPort}
288
+
289
+ # UI Configuration (for dashboard)
290
+
287
291
  `;
288
292
  await fs.writeFile('.env', envContent);
289
293
  // Create .env.example
@@ -299,6 +303,7 @@ DB_FILE_NAME=file:../../local.db
299
303
  # AI Provider Keys
300
304
  ANTHROPIC_API_KEY=${config.anthropicKey || 'your-anthropic-key-here'}
301
305
  OPENAI_API_KEY=${config.openAiKey || 'your-openai-key-here'}
306
+ GOOGLE_GENERATIVE_AI_API_KEY=${config.googleKey || 'your-google-key-here'}
302
307
 
303
308
  AGENTS_RUN_API_URL=http://localhost:${config.runApiPort}
304
309
  `;
@@ -348,6 +353,175 @@ export const myProject = project({
348
353
  await fs.writeFile(`src/${config.projectId}/index.ts`, customIndexContent);
349
354
  }
350
355
  }
356
+ async function createTurboConfig() {
357
+ const turboConfig = {
358
+ $schema: 'https://turbo.build/schema.json',
359
+ ui: 'tui',
360
+ globalDependencies: ['**/.env', '**/.env.local', '**/.env.*'],
361
+ globalEnv: [
362
+ 'NODE_ENV',
363
+ 'CI',
364
+ 'ANTHROPIC_API_KEY',
365
+ 'OPENAI_API_KEY',
366
+ 'ENVIRONMENT',
367
+ 'DB_FILE_NAME',
368
+ 'MANAGE_API_PORT',
369
+ 'RUN_API_PORT',
370
+ 'LOG_LEVEL',
371
+ 'NANGO_SECRET_KEY',
372
+ ],
373
+ tasks: {
374
+ build: {
375
+ dependsOn: ['^build'],
376
+ inputs: ['$TURBO_DEFAULT$', '.env*'],
377
+ outputs: ['dist/**', 'build/**', '.next/**', '!.next/cache/**'],
378
+ },
379
+ dev: {
380
+ cache: false,
381
+ persistent: true,
382
+ },
383
+ start: {
384
+ dependsOn: ['build'],
385
+ cache: false,
386
+ },
387
+ 'db:push': {
388
+ cache: false,
389
+ inputs: ['drizzle.config.ts', 'src/data/db/schema.ts'],
390
+ },
391
+ },
392
+ };
393
+ await fs.writeJson('turbo.json', turboConfig, { spaces: 2 });
394
+ }
395
+ async function createDocumentation(config) {
396
+ const readme = `# ${config.dirName}
397
+
398
+ An Inkeep Agent Framework project with multi-service architecture.
399
+
400
+ ## Architecture
401
+
402
+ This project follows a workspace structure with the following services:
403
+
404
+ - **Agents Manage API** (Port 3002): Agent configuration and managemen
405
+ - Handles entity management and configuration endpoints.
406
+ - **Agents Run API** (Port 3003): Agent execution and chat processing
407
+ - Handles agent communication. You can interact with your agents either over MCP from an MCP client or through our React UI components library
408
+ - **Agents Manage UI** (Port 3000): Web interface available via \`inkeep dev\`
409
+ - The agent framework visual builder. From the builder you can create, manage and visualize all your graphs.
410
+
411
+ ## Quick Start
412
+ 1. **Install the Inkeep CLI:**
413
+ \`\`\`bash
414
+ pnpm install -g @inkeep/agents-cli
415
+ \`\`\`
416
+
417
+ 1. **Start services:**
418
+ \`\`\`bash
419
+ # Start Agents Manage API and Agents Run API
420
+ pnpm dev
421
+
422
+ # Start the Dashboard
423
+ inkeep dev
424
+ \`\`\`
425
+
426
+ 3. **Deploy your first agent graph:**
427
+ \`\`\`bash
428
+ # Navigate to your project's graph directory
429
+ cd src/${config.projectId}/
430
+
431
+ # Push the weather graph to create it
432
+ inkeep push weather.graph.ts
433
+ \`\`\`
434
+ - Follow the prompts to create the project and graph
435
+ - Click on the "View graph in UI:" link to see the graph in the management dashboard
436
+
437
+ ## Project Structure
438
+
439
+ \`\`\`
440
+ ${config.dirName}/
441
+ ├── src/
442
+ │ ├── /${config.projectId} # Agent configurations
443
+ ├── apps/
444
+ │ ├── manage-api/ # Agents Manage API service
445
+ │ ├── run-api/ # Agents Run API service
446
+ │ └── shared/ # Shared code between API services
447
+ │ └── credential-stores.ts # Shared credential store configuration
448
+ ├── turbo.json # Turbo configuration
449
+ ├── pnpm-workspace.yaml # pnpm workspace configuration
450
+ └── package.json # Root package configuration
451
+ \`\`\`
452
+
453
+ ## Configuration
454
+
455
+ ### Environment Variables
456
+
457
+ Environment variables are defined in the following places:
458
+
459
+ - \`apps/manage-api/.env\`: Agents Manage API environment variables
460
+ - \`apps/run-api/.env\`: Agents Run API environment variables
461
+ - \`src/${config.projectId}/.env\`: Inkeep CLI environment variables
462
+ - \`.env\`: Root environment variables
463
+
464
+ To change the API keys used by your agents modify \`apps/run-api/.env\`. You are required to define at least one LLM provider key.
465
+
466
+ \`\`\`bash
467
+ # AI Provider Keys
468
+ ANTHROPIC_API_KEY=your-anthropic-key-here
469
+ OPENAI_API_KEY=your-openai-key-here
470
+ \`\`\`
471
+
472
+
473
+
474
+ ### Agent Configuration
475
+
476
+ Your graphs are defined in \`src/${config.projectId}/weather.graph.ts\`. The default setup includes:
477
+
478
+ - **Weather Graph**: A graph that can forecast the weather in a given location.
479
+
480
+ Your inkeep configuration is defined in \`src/${config.projectId}/inkeep.config.ts\`. The inkeep configuration is used to configure defaults for the inkeep CLI. The configuration includes:
481
+
482
+ - \`tenantId\`: The tenant ID
483
+ - \`projectId\`: The project ID
484
+ - \`agentsManageApiUrl\`: The Manage API URL
485
+ - \`agentsRunApiUrl\`: The Run API URL
486
+
487
+
488
+ ## Development
489
+
490
+ ### Updating Your Agents
491
+
492
+ 1. Edit \`src/${config.projectId}/weather.graph.ts\`
493
+ 2. Push the graph to the platform to update: \`inkeep pus weather.graph.ts\`
494
+
495
+ ### API Documentation
496
+
497
+ Once services are running, view the OpenAPI documentation:
498
+
499
+ - Manage API: http://localhost:${config.manageApiPort}/docs
500
+ - Run API: http://localhost:${config.runApiPort}/docs
501
+
502
+ ## Learn More
503
+
504
+ - [Inkeep Documentation](https://docs.inkeep.com)
505
+
506
+ ## Troubleshooting
507
+
508
+ ## Inkeep CLI commands
509
+
510
+ - Ensure you are runnning commands from \`cd src/${config.projectId}\`.
511
+ - Validate the \`inkeep.config.ts\` file has the correct api urls.
512
+ - Validate that the \`.env\` file in \`src/${config.projectId}\` has the correct \`DB_FILE_NAME\`.
513
+
514
+ ### Services won't start
515
+
516
+ 1. Ensure all dependencies are installed: \`pnpm install\`
517
+ 2. Check that ports 3000-3003 are available
518
+
519
+ ### Agents won't respond
520
+
521
+ 1. Ensure that the Agents Run API is running and includes a valid Anthropic or OpenAI API key in its .env file
522
+ `;
523
+ await fs.writeFile('README.md', readme);
524
+ }
351
525
  async function installDependencies() {
352
526
  await execAsync('pnpm install');
353
527
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/create-agents",
3
- "version": "0.0.0-dev-20250916184039",
3
+ "version": "0.0.0-dev-20250916190005",
4
4
  "description": "Create an Inkeep Agent Framework project",
5
5
  "type": "module",
6
6
  "bin": {