@agentforce/adk
Version:
AgentForce Agent Development Kit - A powerful framework for building AI agents and servers
21 lines (18 loc) • 723 B
text/typescript
import type { AgentForceAgent } from "../../../agent";
import { execute } from "./execute";
/**
* Executes the agent's chain by making the actual API call to the configured provider (execution method)
* @param this - The AgentForceAgent instance (bound context)
* @returns {Promise<AgentForceAgent>} Returns the agent instance for method chaining
*/
export async function run(this: AgentForceAgent): Promise<AgentForceAgent> {
try {
// Use the execute function to handle the provider call
await execute.call(this);
} catch {
// Error handling is already done in execute function
// Just continue with the chain
}
// Return 'this' for method chaining
return this;
}