@promptbook/remote-client
Version:
Promptbook: Turn your company's scattered knowledge into AI ready books
45 lines (44 loc) • 2.17 kB
TypeScript
import type { AvailableModel } from '../../execution/AvailableModel';
import type { LlmExecutionTools } from '../../execution/LlmExecutionTools';
import type { string_model_name } from '../../types/typeAliases';
import type { AgentModelRequirements } from './AgentModelRequirements';
import type { string_book } from './string_book';
/**
* Creates model requirements for an agent based on its source
*
* There are 2 similar functions:
* - `parseAgentSource` which is a lightweight parser for agent source, it parses basic information and its purpose is to be quick and synchronous. The commitments there are hardcoded.
* - `createAgentModelRequirements` which is an asynchronous function that creates model requirements it applies each commitment one by one and works asynchronous.
*
* @public exported from `@promptbook/core`
*/
export declare function createAgentModelRequirements(agentSource: string_book, modelName?: string_model_name, availableModels?: readonly AvailableModel[], llmTools?: LlmExecutionTools): Promise<AgentModelRequirements>;
/**
* Extracts MCP servers from agent source
*
* @param agentSource The agent source string that may contain MCP lines
* @returns Array of MCP server identifiers
*
* @private TODO: [🧠] Maybe should be public
*/
export declare function extractMcpServers(agentSource: string_book): string[];
/**
* Creates a system message for an agent based on its source
* @deprecated Use createAgentModelRequirements instead
* @private
*/
export declare function createAgentSystemMessage(agentSource: string_book): Promise<string>;
/**
* Extracts the agent name from the first line of the agent source
* @deprecated Use parseAgentSource instead
* @private
*/
export declare function extractAgentName(agentSource: string_book): string;
/**
* Extracts the profile image URL from agent source or returns gravatar fallback
* @param agentSource The agent source string that may contain META IMAGE line
* @returns Profile image URL (from source or gravatar fallback)
* @deprecated Use parseAgentSource instead
* @private
*/
export declare function extractAgentProfileImage(agentSource: string_book): string;