A comprehensive guide for naming conventions when generating TypeScript code from agent definitions.
import { NAMING_CONVENTION_RULES } from '@inkeep/agents-sdk';// Use in LLM prompts to ensure consistent namingconst prompt = `Generate TypeScript code following these rules:${NAMING_CONVENTION_RULES}`;
Key rules:
File names use the original ID exactly
Exported variable names use camelCase versions of IDs
Guidelines for import patterns and organization in generated TypeScript files.
import { IMPORT_INSTRUCTIONS } from '@inkeep/agents-sdk';// Use in LLM prompts to ensure correct import patternsconst prompt = `Generate imports following these patterns:${IMPORT_INSTRUCTIONS}`;
Key patterns:
Tools: import { toolName } from '../tools/{toolId}'
Data components: import { componentName } from '../data-components/{componentId}'
Artifact components: import { componentName } from '../artifact-components/{componentId}'
Agents: import { agentName } from './agent/{agentId}'
A complete example of a project JSON structure, useful for providing context to LLMs when generating project code.
import { PROJECT_JSON_EXAMPLE } from '@inkeep/agents-sdk';// Use in LLM prompts to provide structural examplesconst prompt = `Generate a project following this example:${PROJECT_JSON_EXAMPLE}`;
Reads and formats the complete TypeScript type definitions from the Agents SDK package.
import { getTypeDefinitions } from '@inkeep/agents-sdk';// Use in LLM prompts to provide full type contextconst typeInfo = getTypeDefinitions();const prompt = `Generate TypeScript code using these types:${typeInfo}`;
Features:
Automatically resolves SDK package location
Reads from dist/index.d.ts
Formats with clear boundaries for LLM parsing
Provides fallback message if types can't be loaded
import { getTypeDefinitions, NAMING_CONVENTION_RULES, IMPORT_INSTRUCTIONS,} from '@inkeep/agents-sdk';function createToolGenerationPrompt(toolData: any) { return `Generate a TypeScript file for an Inkeep tool.TOOL DATA:${JSON.stringify(toolData, null, 2)}TYPE DEFINITIONS:${getTypeDefinitions()}NAMING CONVENTIONS:${NAMING_CONVENTION_RULES}IMPORT PATTERNS:${IMPORT_INSTRUCTIONS}REQUIREMENTS:1. Import mcpTool from '@inkeep/agents-sdk'2. Use proper naming conventions for exports3. Follow import patterns for dependencies4. Generate clean, well-formatted TypeScriptGenerate ONLY the TypeScript code.`;}
These utilities are used internally by the inkeep pull command to generate TypeScript files from cloud-based agent definitions. You can use them to build similar code generation workflows.