export default interface AgentWork { run: () => Promise; conclude: () => Promise; next: () => AgentWork | undefined; onError: (e: unknown) => boolean; // Handles errors and returns whether to continue retrying }