Skip to Content
ReferenceAgentsgetAgent()

getAgent()

Retrieve an agent based on the provided configuration

async function getAgent({ connectionId, agent, apis, logger, }: { connectionId: string; agent: Record<string, any>; apis: Record<string, IntegrationApi>; logger: any; }): Promise<(props: { prompt: string }) => Promise<any>> { return async (props: { prompt: string }) => { return { message: "Hello, world!" }; }; }

API Signature

Parameters

connectionId:

string
The connection ID to use for the agent's API calls.

agent:

Record<string, any>
The agent configuration object.

apis:

Record<string, IntegrationAPI>
A map of API names to their respective API objects.

Returns