Dependency injection container for the AI crew orchestration system. KataRuntime provides centralized access to core services (OpenAI client, logger, memory) and ensures consistent configuration across all components.

Example

const runtime = new KataRuntime(openai, logger, memory);

// Use runtime to create components
const kata = new Kata(runtime, kataConfig);
const shinobi = new Shinobi(runtime, shinobiConfig);

Constructors

Accessors

Methods

  • Create a contextual logger for a specific Kata. The logger will include the Kata's context in all log messages.

    Parameters

    • kataTitle: string

      The title/name of the Kata

    Returns Logger

    A new Logger instance with Kata context

  • Create a contextual logger with specific IDs for tracking. This enables detailed tracking of execution across the crew hierarchy.

    Parameters

    • context: string

      The context name for this logger

    • ids: {
          shinobi_id?: string;
          kata_id?: string;
          shuriken_id?: string;
      }

      Object containing shinobi_id, kata_id, and/or shuriken_id for tracking

      • Optional shinobi_id?: string
      • Optional kata_id?: string
      • Optional shuriken_id?: string

    Returns Logger

    A new Logger instance with tracking IDs

    Example

    const logger = runtime.createTrackedLogger('WeatherAnalyst', {
    shinobi_id: 'shinobi-uuid',
    kata_id: 'kata-uuid'
    });