@inkeep/agents-sdk 0.16.3 → 0.18.0

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/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { MCPToolConfig as MCPToolConfig$1, ArtifactComponentInsert, CredentialReferenceApiInsert, DataComponentInsert, CredentialReferenceSelect, FunctionToolConfig, AgentApiInsert, ModelSettings, AgentStopWhen, DataComponentApiInsert, ArtifactComponentApiInsert, AgentConversationHistoryConfig, GraphStopWhen, StatusUpdateSettings, FullGraphDefinition, ToolInsert, McpTransportConfig, StopWhen, SandboxConfig, FullProjectDefinition } from '@inkeep/agents-core';
1
+ import { MCPToolConfig as MCPToolConfig$1, ArtifactComponentInsert, CredentialReferenceApiInsert, DataComponentInsert, CredentialReferenceSelect, FunctionToolConfig, SubAgentApiInsert, DataComponentApiInsert, ArtifactComponentApiInsert, AgentConversationHistoryConfig, GraphStopWhen, ModelSettings, StatusUpdateSettings, FullGraphDefinition, ToolInsert, McpTransportConfig, StopWhen, SandboxConfig, FullProjectDefinition } from '@inkeep/agents-core';
2
2
  export { FunctionToolConfig, ModelSettings, SandboxConfig } from '@inkeep/agents-core';
3
3
  import { z } from 'zod';
4
4
 
@@ -120,7 +120,7 @@ type AgentMcpConfig = {
120
120
  * );
121
121
  * ```
122
122
  */
123
- declare function transfer(targetAgent: Agent, description?: string, condition?: TransferConditionFunction): TransferConfig;
123
+ declare function transfer(targetAgent: SubAgent, description?: string, condition?: TransferConditionFunction): TransferConfig;
124
124
 
125
125
  interface DataComponentInterface {
126
126
  config: Omit<DataComponentInsert, 'tenantId' | 'projectId'>;
@@ -289,23 +289,13 @@ interface ToolResult {
289
289
  result: any;
290
290
  error?: string;
291
291
  }
292
- type AllAgentInterface = AgentInterface | ExternalAgentInterface;
293
- type AgentCanUseType = Tool | AgentMcpConfig | FunctionTool;
294
- interface AgentConfig extends Omit<AgentApiInsert, 'projectId'> {
292
+ type AllSubAgentInterface = SubAgentInterface | ExternalAgentInterface;
293
+ type SubAgentCanUseType = Tool | AgentMcpConfig | FunctionTool;
294
+ interface SubAgentConfig extends Omit<SubAgentApiInsert, 'projectId'> {
295
295
  type?: 'internal';
296
- canUse?: () => AgentCanUseType[];
297
- canTransferTo?: () => AgentInterface[];
298
- canDelegateTo?: () => AllAgentInterface[];
299
- models?: {
300
- base?: ModelSettings;
301
- structuredOutput?: ModelSettings;
302
- summarizer?: ModelSettings;
303
- };
304
- stopWhen?: AgentStopWhen;
305
- memory?: {
306
- type: 'conversation' | 'episodic' | 'short_term';
307
- capacity?: number;
308
- };
296
+ canUse?: () => SubAgentCanUseType[];
297
+ canTransferTo?: () => SubAgentInterface[];
298
+ canDelegateTo?: () => AllSubAgentInterface[];
309
299
  dataComponents?: () => (DataComponentApiInsert | DataComponentInterface | DataComponentWithZodProps)[];
310
300
  artifactComponents?: () => (ArtifactComponentApiInsert | ArtifactComponentInterface | ArtifactComponentWithZodProps)[];
311
301
  conversationHistoryConfig?: AgentConversationHistoryConfig;
@@ -360,7 +350,7 @@ interface RequestSchemaConfig {
360
350
  optional?: ('body' | 'headers' | 'query' | 'params')[];
361
351
  }
362
352
  interface TransferConfig {
363
- agent: AgentInterface;
353
+ agent: SubAgentInterface;
364
354
  description?: string;
365
355
  condition?: (context: any) => boolean;
366
356
  }
@@ -398,7 +388,7 @@ interface StreamEvent {
398
388
  }
399
389
  interface RunResult {
400
390
  finalOutput: string;
401
- agent: AgentInterface;
391
+ agent: SubAgentInterface;
402
392
  turnCount: number;
403
393
  usage?: {
404
394
  inputTokens: number;
@@ -414,8 +404,8 @@ interface GraphConfig {
414
404
  id: string;
415
405
  name?: string;
416
406
  description?: string;
417
- defaultAgent?: AgentInterface;
418
- agents?: () => AllAgentInterface[];
407
+ defaultSubAgent?: SubAgentInterface;
408
+ subAgents?: () => AllSubAgentInterface[];
419
409
  contextConfig?: any;
420
410
  credentials?: () => CredentialReferenceApiInsert[];
421
411
  stopWhen?: GraphStopWhen;
@@ -441,8 +431,8 @@ declare class ToolExecutionError extends AgentError {
441
431
  declare class TransferError extends AgentError {
442
432
  constructor(sourceAgent: string, targetAgent: string, reason: string);
443
433
  }
444
- interface AgentInterface {
445
- config: AgentConfig;
434
+ interface SubAgentInterface {
435
+ config: SubAgentConfig;
446
436
  type: 'internal';
447
437
  init(): Promise<void>;
448
438
  getId(): string;
@@ -450,14 +440,14 @@ interface AgentInterface {
450
440
  getDescription(): string;
451
441
  getInstructions(): string;
452
442
  getTools(): Record<string, AgentTool>;
453
- getTransfers(): AgentInterface[];
454
- getDelegates(): AllAgentInterface[];
443
+ getTransfers(): SubAgentInterface[];
444
+ getDelegates(): AllSubAgentInterface[];
455
445
  getDataComponents(): DataComponentApiInsert[];
456
446
  getArtifactComponents(): ArtifactComponentApiInsert[];
457
447
  setContext(tenantId: string, projectId: string, baseURL?: string): void;
458
448
  addTool(name: string, tool: any): void;
459
- addTransfer(...agents: AgentInterface[]): void;
460
- addDelegate(...agents: AgentInterface[]): void;
449
+ addTransfer(...agents: SubAgentInterface[]): void;
450
+ addDelegate(...agents: SubAgentInterface[]): void;
461
451
  }
462
452
  interface ExternalAgentInterface {
463
453
  config: ExternalAgentConfig;
@@ -481,9 +471,9 @@ interface GraphInterface {
481
471
  generate(input: MessageInput, options?: GenerateOptions): Promise<string>;
482
472
  stream(input: MessageInput, options?: GenerateOptions): Promise<StreamResponse>;
483
473
  generateStream(input: MessageInput, options?: GenerateOptions): Promise<StreamResponse>;
484
- getDefaultAgent(): AgentInterface | undefined;
485
- getAgent(name: string): AllAgentInterface | undefined;
486
- getAgents(): AllAgentInterface[];
474
+ getdefaultSubAgent(): SubAgentInterface | undefined;
475
+ getAgent(name: string): AllSubAgentInterface | undefined;
476
+ getSubAgents(): AllSubAgentInterface[];
487
477
  toFullGraphDefinition(): Promise<FullGraphDefinition>;
488
478
  }
489
479
  interface BuilderToolConfig {
@@ -511,16 +501,15 @@ interface BuilderAgentConfig {
511
501
  relations?: BuilderRelationConfig[];
512
502
  }
513
503
 
514
- declare class Agent implements AgentInterface {
515
- config: AgentConfig;
504
+ declare class SubAgent implements SubAgentInterface {
505
+ config: SubAgentConfig;
516
506
  readonly type: "internal";
517
507
  private baseURL;
518
508
  private tenantId;
519
509
  private projectId;
520
- private graphId;
521
510
  private initialized;
522
- constructor(config: AgentConfig);
523
- setContext(tenantId: string, projectId: string, graphId: string, baseURL?: string): void;
511
+ constructor(config: SubAgentConfig);
512
+ setContext(tenantId: string, projectId: string, baseURL?: string): void;
524
513
  getId(): string;
525
514
  getName(): string;
526
515
  getInstructions(): string;
@@ -531,13 +520,13 @@ declare class Agent implements AgentInterface {
531
520
  getTools(): Record<string, AgentTool>;
532
521
  getModels(): typeof this$1.config.models;
533
522
  setModels(models: typeof this$1.config.models): void;
534
- getTransfers(): AgentInterface[];
535
- getDelegates(): AllAgentInterface[];
523
+ getTransfers(): SubAgentInterface[];
524
+ getDelegates(): AllSubAgentInterface[];
536
525
  getDataComponents(): DataComponentApiInsert[];
537
526
  getArtifactComponents(): ArtifactComponentApiInsert[];
538
527
  addTool(_name: string, tool: Tool): void;
539
- addTransfer(...agents: AgentInterface[]): void;
540
- addDelegate(...agents: AllAgentInterface[]): void;
528
+ addTransfer(...agents: SubAgentInterface[]): void;
529
+ addDelegate(...agents: AllSubAgentInterface[]): void;
541
530
  init(): Promise<void>;
542
531
  private upsertAgent;
543
532
  private saveToolsAndRelations;
@@ -555,9 +544,9 @@ declare class Agent implements AgentInterface {
555
544
  }
556
545
 
557
546
  declare class AgentGraph implements GraphInterface {
558
- private agents;
547
+ private subAgents;
559
548
  private agentMap;
560
- private defaultAgent?;
549
+ private defaultSubAgent?;
561
550
  private baseURL;
562
551
  private tenantId;
563
552
  private projectId;
@@ -610,35 +599,35 @@ declare class AgentGraph implements GraphInterface {
610
599
  /**
611
600
  * Run with a specific agent from the graph
612
601
  */
613
- runWith(agentId: string, input: MessageInput, options?: GenerateOptions): Promise<RunResult>;
602
+ runWith(subAgentId: string, input: MessageInput, options?: GenerateOptions): Promise<RunResult>;
614
603
  /**
615
604
  * Get an agent by name (unified method for all agent types)
616
605
  */
617
- getAgent(name: string): AllAgentInterface | undefined;
606
+ getAgent(name: string): AllSubAgentInterface | undefined;
618
607
  /**
619
608
  * Add an agent to the graph
620
609
  */
621
- addAgent(agent: AgentInterface): void;
610
+ addSubAgent(agent: SubAgentInterface): void;
622
611
  /**
623
612
  * Remove an agent from the graph
624
613
  */
625
- removeAgent(id: string): boolean;
614
+ removeSubAgent(id: string): boolean;
626
615
  /**
627
616
  * Get all agents in the graph
628
617
  */
629
- getAgents(): AllAgentInterface[];
618
+ getSubAgents(): AllSubAgentInterface[];
630
619
  /**
631
620
  * Get all agent ids (unified method for all agent types)
632
621
  */
633
- getAgentIds(): string[];
622
+ getSubAgentIds(): string[];
634
623
  /**
635
624
  * Set the default agent
636
625
  */
637
- setDefaultAgent(agent: AgentInterface): void;
626
+ setdefaultSubAgent(agent: SubAgentInterface): void;
638
627
  /**
639
628
  * Get the default agent
640
629
  */
641
- getDefaultAgent(): AgentInterface | undefined;
630
+ getdefaultSubAgent(): SubAgentInterface | undefined;
642
631
  /**
643
632
  * Get the graph ID
644
633
  */
@@ -675,7 +664,7 @@ declare class AgentGraph implements GraphInterface {
675
664
  */
676
665
  getStats(): {
677
666
  agentCount: number;
678
- defaultAgent: string | null;
667
+ defaultSubAgent: string | null;
679
668
  initialized: boolean;
680
669
  graphId: string;
681
670
  tenantId: string;
@@ -691,7 +680,7 @@ declare class AgentGraph implements GraphInterface {
691
680
  /**
692
681
  * Type guard to check if an agent is an internal AgentInterface
693
682
  */
694
- isInternalAgent(agent: AllAgentInterface): agent is AgentInterface;
683
+ isInternalAgent(agent: AllSubAgentInterface): agent is SubAgentInterface;
695
684
  /**
696
685
  * Get project-level model settingsuration defaults
697
686
  */
@@ -719,7 +708,7 @@ declare class AgentGraph implements GraphInterface {
719
708
  /**
720
709
  * Type guard to check if an agent is an external AgentInterface
721
710
  */
722
- isExternalAgent(agent: AllAgentInterface): agent is ExternalAgentInterface;
711
+ isExternalAgent(agent: AllSubAgentInterface): agent is ExternalAgentInterface;
723
712
  /**
724
713
  * Execute agent using the backend system instead of local runner
725
714
  */
@@ -985,7 +974,7 @@ declare function project(config: ProjectConfig): Project;
985
974
  * });
986
975
  * ```
987
976
  */
988
- declare function agent(config: AgentConfig): Agent;
977
+ declare function subAgent(config: SubAgentConfig): SubAgent;
989
978
  /**
990
979
  * Creates a credential reference for authentication.
991
980
  *
@@ -1275,11 +1264,11 @@ declare class Runner {
1275
1264
  estimatedTurns: number;
1276
1265
  estimatedTokens: number;
1277
1266
  agentCount: number;
1278
- defaultAgent: string | undefined;
1267
+ defaultSubAgent: string | undefined;
1279
1268
  }>;
1280
1269
  }
1281
1270
  declare const run: typeof Runner.run;
1282
1271
  declare const stream: typeof Runner.stream;
1283
1272
  declare const raceGraphs: typeof Runner.raceGraphs;
1284
1273
 
1285
- export { Agent, type AgentCanUseType, type AgentConfig, AgentError, type AgentInterface, type AgentResponse, type AgentTool, type AllAgentInterface, ArtifactComponent, type ArtifactComponentInterface, type ArtifactComponentWithZodProps, type AssistantMessage, type BuilderAgentConfig, type BuilderRelationConfig, type BuilderToolConfig, type CredentialReference, DataComponent, type DataComponentInterface, type DataComponentWithZodProps, ExternalAgent, type ExternalAgentInterface, type ExtractCredentialIds, type FetchDefinitionConfig, FunctionTool, type GenerateOptions, type GraphConfig, type GraphInterface, type MCPToolConfig, MaxTurnsExceededError, type Message, type MessageInput, Project, type RequestSchemaConfig, type RequestSchemaDefinition, type RunResult, Runner, type ServerConfig, type StreamEvent, type StreamResponse, type SystemMessage, Tool, type ToolCall, type ToolConfig, ToolExecutionError, type ToolMessage, type ToolResult, type TransferConfig, TransferError, type UnionCredentialIds, type UserMessage, agent, agentGraph, agentMcp, artifactComponent, createEnvironmentSettings, createFullProjectViaAPI, credential, credentialRef, dataComponent, deleteFullProjectViaAPI, externalAgent, externalAgents, functionTool, getFullProjectViaAPI, isCredentialReference, mcpServer, mcpTool, project, raceGraphs, registerEnvironmentSettings, run, stream, transfer, updateFullProjectViaAPI };
1274
+ export { SubAgent as Agent, AgentError, type AgentResponse, type AgentTool, type AllSubAgentInterface, ArtifactComponent, type ArtifactComponentInterface, type ArtifactComponentWithZodProps, type AssistantMessage, type BuilderAgentConfig, type BuilderRelationConfig, type BuilderToolConfig, type CredentialReference, DataComponent, type DataComponentInterface, type DataComponentWithZodProps, ExternalAgent, type ExternalAgentInterface, type ExtractCredentialIds, type FetchDefinitionConfig, FunctionTool, type GenerateOptions, type GraphConfig, type GraphInterface, type MCPToolConfig, MaxTurnsExceededError, type Message, type MessageInput, Project, type RequestSchemaConfig, type RequestSchemaDefinition, type RunResult, Runner, type ServerConfig, type StreamEvent, type StreamResponse, type SubAgentCanUseType, type SubAgentConfig, type SubAgentInterface, type SystemMessage, Tool, type ToolCall, type ToolConfig, ToolExecutionError, type ToolMessage, type ToolResult, type TransferConfig, TransferError, type UnionCredentialIds, type UserMessage, subAgent as agent, agentGraph, agentMcp, artifactComponent, createEnvironmentSettings, createFullProjectViaAPI, credential, credentialRef, dataComponent, deleteFullProjectViaAPI, externalAgent, externalAgents, functionTool, getFullProjectViaAPI, isCredentialReference, mcpServer, mcpTool, project, raceGraphs, registerEnvironmentSettings, run, stream, transfer, updateFullProjectViaAPI };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { MCPToolConfig as MCPToolConfig$1, ArtifactComponentInsert, CredentialReferenceApiInsert, DataComponentInsert, CredentialReferenceSelect, FunctionToolConfig, AgentApiInsert, ModelSettings, AgentStopWhen, DataComponentApiInsert, ArtifactComponentApiInsert, AgentConversationHistoryConfig, GraphStopWhen, StatusUpdateSettings, FullGraphDefinition, ToolInsert, McpTransportConfig, StopWhen, SandboxConfig, FullProjectDefinition } from '@inkeep/agents-core';
1
+ import { MCPToolConfig as MCPToolConfig$1, ArtifactComponentInsert, CredentialReferenceApiInsert, DataComponentInsert, CredentialReferenceSelect, FunctionToolConfig, SubAgentApiInsert, DataComponentApiInsert, ArtifactComponentApiInsert, AgentConversationHistoryConfig, GraphStopWhen, ModelSettings, StatusUpdateSettings, FullGraphDefinition, ToolInsert, McpTransportConfig, StopWhen, SandboxConfig, FullProjectDefinition } from '@inkeep/agents-core';
2
2
  export { FunctionToolConfig, ModelSettings, SandboxConfig } from '@inkeep/agents-core';
3
3
  import { z } from 'zod';
4
4
 
@@ -120,7 +120,7 @@ type AgentMcpConfig = {
120
120
  * );
121
121
  * ```
122
122
  */
123
- declare function transfer(targetAgent: Agent, description?: string, condition?: TransferConditionFunction): TransferConfig;
123
+ declare function transfer(targetAgent: SubAgent, description?: string, condition?: TransferConditionFunction): TransferConfig;
124
124
 
125
125
  interface DataComponentInterface {
126
126
  config: Omit<DataComponentInsert, 'tenantId' | 'projectId'>;
@@ -289,23 +289,13 @@ interface ToolResult {
289
289
  result: any;
290
290
  error?: string;
291
291
  }
292
- type AllAgentInterface = AgentInterface | ExternalAgentInterface;
293
- type AgentCanUseType = Tool | AgentMcpConfig | FunctionTool;
294
- interface AgentConfig extends Omit<AgentApiInsert, 'projectId'> {
292
+ type AllSubAgentInterface = SubAgentInterface | ExternalAgentInterface;
293
+ type SubAgentCanUseType = Tool | AgentMcpConfig | FunctionTool;
294
+ interface SubAgentConfig extends Omit<SubAgentApiInsert, 'projectId'> {
295
295
  type?: 'internal';
296
- canUse?: () => AgentCanUseType[];
297
- canTransferTo?: () => AgentInterface[];
298
- canDelegateTo?: () => AllAgentInterface[];
299
- models?: {
300
- base?: ModelSettings;
301
- structuredOutput?: ModelSettings;
302
- summarizer?: ModelSettings;
303
- };
304
- stopWhen?: AgentStopWhen;
305
- memory?: {
306
- type: 'conversation' | 'episodic' | 'short_term';
307
- capacity?: number;
308
- };
296
+ canUse?: () => SubAgentCanUseType[];
297
+ canTransferTo?: () => SubAgentInterface[];
298
+ canDelegateTo?: () => AllSubAgentInterface[];
309
299
  dataComponents?: () => (DataComponentApiInsert | DataComponentInterface | DataComponentWithZodProps)[];
310
300
  artifactComponents?: () => (ArtifactComponentApiInsert | ArtifactComponentInterface | ArtifactComponentWithZodProps)[];
311
301
  conversationHistoryConfig?: AgentConversationHistoryConfig;
@@ -360,7 +350,7 @@ interface RequestSchemaConfig {
360
350
  optional?: ('body' | 'headers' | 'query' | 'params')[];
361
351
  }
362
352
  interface TransferConfig {
363
- agent: AgentInterface;
353
+ agent: SubAgentInterface;
364
354
  description?: string;
365
355
  condition?: (context: any) => boolean;
366
356
  }
@@ -398,7 +388,7 @@ interface StreamEvent {
398
388
  }
399
389
  interface RunResult {
400
390
  finalOutput: string;
401
- agent: AgentInterface;
391
+ agent: SubAgentInterface;
402
392
  turnCount: number;
403
393
  usage?: {
404
394
  inputTokens: number;
@@ -414,8 +404,8 @@ interface GraphConfig {
414
404
  id: string;
415
405
  name?: string;
416
406
  description?: string;
417
- defaultAgent?: AgentInterface;
418
- agents?: () => AllAgentInterface[];
407
+ defaultSubAgent?: SubAgentInterface;
408
+ subAgents?: () => AllSubAgentInterface[];
419
409
  contextConfig?: any;
420
410
  credentials?: () => CredentialReferenceApiInsert[];
421
411
  stopWhen?: GraphStopWhen;
@@ -441,8 +431,8 @@ declare class ToolExecutionError extends AgentError {
441
431
  declare class TransferError extends AgentError {
442
432
  constructor(sourceAgent: string, targetAgent: string, reason: string);
443
433
  }
444
- interface AgentInterface {
445
- config: AgentConfig;
434
+ interface SubAgentInterface {
435
+ config: SubAgentConfig;
446
436
  type: 'internal';
447
437
  init(): Promise<void>;
448
438
  getId(): string;
@@ -450,14 +440,14 @@ interface AgentInterface {
450
440
  getDescription(): string;
451
441
  getInstructions(): string;
452
442
  getTools(): Record<string, AgentTool>;
453
- getTransfers(): AgentInterface[];
454
- getDelegates(): AllAgentInterface[];
443
+ getTransfers(): SubAgentInterface[];
444
+ getDelegates(): AllSubAgentInterface[];
455
445
  getDataComponents(): DataComponentApiInsert[];
456
446
  getArtifactComponents(): ArtifactComponentApiInsert[];
457
447
  setContext(tenantId: string, projectId: string, baseURL?: string): void;
458
448
  addTool(name: string, tool: any): void;
459
- addTransfer(...agents: AgentInterface[]): void;
460
- addDelegate(...agents: AgentInterface[]): void;
449
+ addTransfer(...agents: SubAgentInterface[]): void;
450
+ addDelegate(...agents: SubAgentInterface[]): void;
461
451
  }
462
452
  interface ExternalAgentInterface {
463
453
  config: ExternalAgentConfig;
@@ -481,9 +471,9 @@ interface GraphInterface {
481
471
  generate(input: MessageInput, options?: GenerateOptions): Promise<string>;
482
472
  stream(input: MessageInput, options?: GenerateOptions): Promise<StreamResponse>;
483
473
  generateStream(input: MessageInput, options?: GenerateOptions): Promise<StreamResponse>;
484
- getDefaultAgent(): AgentInterface | undefined;
485
- getAgent(name: string): AllAgentInterface | undefined;
486
- getAgents(): AllAgentInterface[];
474
+ getdefaultSubAgent(): SubAgentInterface | undefined;
475
+ getAgent(name: string): AllSubAgentInterface | undefined;
476
+ getSubAgents(): AllSubAgentInterface[];
487
477
  toFullGraphDefinition(): Promise<FullGraphDefinition>;
488
478
  }
489
479
  interface BuilderToolConfig {
@@ -511,16 +501,15 @@ interface BuilderAgentConfig {
511
501
  relations?: BuilderRelationConfig[];
512
502
  }
513
503
 
514
- declare class Agent implements AgentInterface {
515
- config: AgentConfig;
504
+ declare class SubAgent implements SubAgentInterface {
505
+ config: SubAgentConfig;
516
506
  readonly type: "internal";
517
507
  private baseURL;
518
508
  private tenantId;
519
509
  private projectId;
520
- private graphId;
521
510
  private initialized;
522
- constructor(config: AgentConfig);
523
- setContext(tenantId: string, projectId: string, graphId: string, baseURL?: string): void;
511
+ constructor(config: SubAgentConfig);
512
+ setContext(tenantId: string, projectId: string, baseURL?: string): void;
524
513
  getId(): string;
525
514
  getName(): string;
526
515
  getInstructions(): string;
@@ -531,13 +520,13 @@ declare class Agent implements AgentInterface {
531
520
  getTools(): Record<string, AgentTool>;
532
521
  getModels(): typeof this$1.config.models;
533
522
  setModels(models: typeof this$1.config.models): void;
534
- getTransfers(): AgentInterface[];
535
- getDelegates(): AllAgentInterface[];
523
+ getTransfers(): SubAgentInterface[];
524
+ getDelegates(): AllSubAgentInterface[];
536
525
  getDataComponents(): DataComponentApiInsert[];
537
526
  getArtifactComponents(): ArtifactComponentApiInsert[];
538
527
  addTool(_name: string, tool: Tool): void;
539
- addTransfer(...agents: AgentInterface[]): void;
540
- addDelegate(...agents: AllAgentInterface[]): void;
528
+ addTransfer(...agents: SubAgentInterface[]): void;
529
+ addDelegate(...agents: AllSubAgentInterface[]): void;
541
530
  init(): Promise<void>;
542
531
  private upsertAgent;
543
532
  private saveToolsAndRelations;
@@ -555,9 +544,9 @@ declare class Agent implements AgentInterface {
555
544
  }
556
545
 
557
546
  declare class AgentGraph implements GraphInterface {
558
- private agents;
547
+ private subAgents;
559
548
  private agentMap;
560
- private defaultAgent?;
549
+ private defaultSubAgent?;
561
550
  private baseURL;
562
551
  private tenantId;
563
552
  private projectId;
@@ -610,35 +599,35 @@ declare class AgentGraph implements GraphInterface {
610
599
  /**
611
600
  * Run with a specific agent from the graph
612
601
  */
613
- runWith(agentId: string, input: MessageInput, options?: GenerateOptions): Promise<RunResult>;
602
+ runWith(subAgentId: string, input: MessageInput, options?: GenerateOptions): Promise<RunResult>;
614
603
  /**
615
604
  * Get an agent by name (unified method for all agent types)
616
605
  */
617
- getAgent(name: string): AllAgentInterface | undefined;
606
+ getAgent(name: string): AllSubAgentInterface | undefined;
618
607
  /**
619
608
  * Add an agent to the graph
620
609
  */
621
- addAgent(agent: AgentInterface): void;
610
+ addSubAgent(agent: SubAgentInterface): void;
622
611
  /**
623
612
  * Remove an agent from the graph
624
613
  */
625
- removeAgent(id: string): boolean;
614
+ removeSubAgent(id: string): boolean;
626
615
  /**
627
616
  * Get all agents in the graph
628
617
  */
629
- getAgents(): AllAgentInterface[];
618
+ getSubAgents(): AllSubAgentInterface[];
630
619
  /**
631
620
  * Get all agent ids (unified method for all agent types)
632
621
  */
633
- getAgentIds(): string[];
622
+ getSubAgentIds(): string[];
634
623
  /**
635
624
  * Set the default agent
636
625
  */
637
- setDefaultAgent(agent: AgentInterface): void;
626
+ setdefaultSubAgent(agent: SubAgentInterface): void;
638
627
  /**
639
628
  * Get the default agent
640
629
  */
641
- getDefaultAgent(): AgentInterface | undefined;
630
+ getdefaultSubAgent(): SubAgentInterface | undefined;
642
631
  /**
643
632
  * Get the graph ID
644
633
  */
@@ -675,7 +664,7 @@ declare class AgentGraph implements GraphInterface {
675
664
  */
676
665
  getStats(): {
677
666
  agentCount: number;
678
- defaultAgent: string | null;
667
+ defaultSubAgent: string | null;
679
668
  initialized: boolean;
680
669
  graphId: string;
681
670
  tenantId: string;
@@ -691,7 +680,7 @@ declare class AgentGraph implements GraphInterface {
691
680
  /**
692
681
  * Type guard to check if an agent is an internal AgentInterface
693
682
  */
694
- isInternalAgent(agent: AllAgentInterface): agent is AgentInterface;
683
+ isInternalAgent(agent: AllSubAgentInterface): agent is SubAgentInterface;
695
684
  /**
696
685
  * Get project-level model settingsuration defaults
697
686
  */
@@ -719,7 +708,7 @@ declare class AgentGraph implements GraphInterface {
719
708
  /**
720
709
  * Type guard to check if an agent is an external AgentInterface
721
710
  */
722
- isExternalAgent(agent: AllAgentInterface): agent is ExternalAgentInterface;
711
+ isExternalAgent(agent: AllSubAgentInterface): agent is ExternalAgentInterface;
723
712
  /**
724
713
  * Execute agent using the backend system instead of local runner
725
714
  */
@@ -985,7 +974,7 @@ declare function project(config: ProjectConfig): Project;
985
974
  * });
986
975
  * ```
987
976
  */
988
- declare function agent(config: AgentConfig): Agent;
977
+ declare function subAgent(config: SubAgentConfig): SubAgent;
989
978
  /**
990
979
  * Creates a credential reference for authentication.
991
980
  *
@@ -1275,11 +1264,11 @@ declare class Runner {
1275
1264
  estimatedTurns: number;
1276
1265
  estimatedTokens: number;
1277
1266
  agentCount: number;
1278
- defaultAgent: string | undefined;
1267
+ defaultSubAgent: string | undefined;
1279
1268
  }>;
1280
1269
  }
1281
1270
  declare const run: typeof Runner.run;
1282
1271
  declare const stream: typeof Runner.stream;
1283
1272
  declare const raceGraphs: typeof Runner.raceGraphs;
1284
1273
 
1285
- export { Agent, type AgentCanUseType, type AgentConfig, AgentError, type AgentInterface, type AgentResponse, type AgentTool, type AllAgentInterface, ArtifactComponent, type ArtifactComponentInterface, type ArtifactComponentWithZodProps, type AssistantMessage, type BuilderAgentConfig, type BuilderRelationConfig, type BuilderToolConfig, type CredentialReference, DataComponent, type DataComponentInterface, type DataComponentWithZodProps, ExternalAgent, type ExternalAgentInterface, type ExtractCredentialIds, type FetchDefinitionConfig, FunctionTool, type GenerateOptions, type GraphConfig, type GraphInterface, type MCPToolConfig, MaxTurnsExceededError, type Message, type MessageInput, Project, type RequestSchemaConfig, type RequestSchemaDefinition, type RunResult, Runner, type ServerConfig, type StreamEvent, type StreamResponse, type SystemMessage, Tool, type ToolCall, type ToolConfig, ToolExecutionError, type ToolMessage, type ToolResult, type TransferConfig, TransferError, type UnionCredentialIds, type UserMessage, agent, agentGraph, agentMcp, artifactComponent, createEnvironmentSettings, createFullProjectViaAPI, credential, credentialRef, dataComponent, deleteFullProjectViaAPI, externalAgent, externalAgents, functionTool, getFullProjectViaAPI, isCredentialReference, mcpServer, mcpTool, project, raceGraphs, registerEnvironmentSettings, run, stream, transfer, updateFullProjectViaAPI };
1274
+ export { SubAgent as Agent, AgentError, type AgentResponse, type AgentTool, type AllSubAgentInterface, ArtifactComponent, type ArtifactComponentInterface, type ArtifactComponentWithZodProps, type AssistantMessage, type BuilderAgentConfig, type BuilderRelationConfig, type BuilderToolConfig, type CredentialReference, DataComponent, type DataComponentInterface, type DataComponentWithZodProps, ExternalAgent, type ExternalAgentInterface, type ExtractCredentialIds, type FetchDefinitionConfig, FunctionTool, type GenerateOptions, type GraphConfig, type GraphInterface, type MCPToolConfig, MaxTurnsExceededError, type Message, type MessageInput, Project, type RequestSchemaConfig, type RequestSchemaDefinition, type RunResult, Runner, type ServerConfig, type StreamEvent, type StreamResponse, type SubAgentCanUseType, type SubAgentConfig, type SubAgentInterface, type SystemMessage, Tool, type ToolCall, type ToolConfig, ToolExecutionError, type ToolMessage, type ToolResult, type TransferConfig, TransferError, type UnionCredentialIds, type UserMessage, subAgent as agent, agentGraph, agentMcp, artifactComponent, createEnvironmentSettings, createFullProjectViaAPI, credential, credentialRef, dataComponent, deleteFullProjectViaAPI, externalAgent, externalAgents, functionTool, getFullProjectViaAPI, isCredentialReference, mcpServer, mcpTool, project, raceGraphs, registerEnvironmentSettings, run, stream, transfer, updateFullProjectViaAPI };