clinkclang-docs
Agent Progress
Last updated: 3/6/2025
A simple agent progress component that displays the current state of the agent
Agent 1
Agent 1
This is a description of the agent
Done
None
"use client";
import React from "react";
import { AgentProgress } from "lib/ai/components/AgentProgressAug";
async function handleStart() {
return {
status: "Running",
currentAction: "Initializing",
totalSteps: 4,
};
}
async function handleStop() {
console.log("Stopped");
}
async function handleResume(currentAction: string) {
return {
status: "Running",
currentAction,
totalSteps: 4,
};
}
async function handleProgress(step: number) {
return {
status: "Running",
currentAction: `Step ${step}`,
progress: step + 1,
totalSteps: 5,
};
}
export default function Page() {
return (
<AgentProgress
agentName="Agent 1"
description="This is a description of the agent"
onStop={handleStop}
onStart={handleStart}
onResume={handleResume}
updateProgress={handleProgress}
imgLink="brainthrust.png"
pollRateMs={500}
/>
);
}
<script lang="ts">
import AgentProgressAug from '$lib/components/ai/agent-progress/agent-progress-aug.svelte';
async function handleStart() {
return {
status: 'Running',
currentAction: 'Initializing',
totalSteps: 4
};
}
async function handleStop() {
console.log('Stopped');
}
async function handleResume(currentAction: string) {
return {
status: 'Running',
currentAction,
totalSteps: 4
};
}
async function handleProgress(step: number) {
return {
status: 'Running',
currentAction: `Step ${step}`,
progress: step + 1,
totalSteps: 5
};
}
</script>
<AgentProgressAug
agentName="Agent 1"
description="This is a description of the agent"
imgLink="brainthrust.png"
onStart={handleStart}
onStop={handleStop}
onResume={handleResume}
updateProgress={handleProgress}
pollRateMs={500}
/>
Installation
# Install the react component
pnpm dlx clinkclang@latest add agent-progress
# Install the svelte component
pnpm dlx shadcn-svelte@next add avatar
pnpm dlx shadcn-svelte@next add card
pnpm dlx shadcn-svelte@next add progress
pnpm dlx clinkclang@latest add agent-progress-svelte