For the complete documentation index, see /llms.txt. A single-fetch full bundle is at /llms-full.txt. Every docs page is also available as Markdown by appending.mdto its URL, or by requesting it withAccept: text/markdown.
LastActivity
Cross-registry relative timestamp showing when the agent was last active (e.g. "Active 3 hours ago"). Reflects the most recent event across all registries.
Preview
Usage
import { LastActivity } from "@p4n/erc8004-ui"<LastActivity agentRegistry="eip155:8453:0x8004A169FB4a3325136EB29fA0ceB6D2e539a432" agentId={888} />Examples
Inside AgentProvider
Renders the last activity timestamp without repeating identity props.
<AgentProvider agentRegistry="eip155:8453:0x8004...a432" agentId={888}>
<LastActivity />
</AgentProvider>As Status Indicator
Combine with a live dot and muted styling to show agent presence in a header.
<div className="flex items-center gap-2 text-xs text-erc8004-muted-fg">
<span className="h-1.5 w-1.5 rounded-full bg-erc8004-positive" />
<LastActivity agentRegistry="eip155:8453:0x8004...a432" agentId={888} />
</div>In Context
LastActivity in a sidebar showing agent status alongside the activity log.
<AgentProvider agentRegistry="eip155:8453:0x8004...a432" agentId={888}>
<div className="flex items-center gap-3">
<AgentName />
<LastActivity />
</div>
<ActivityLog pageSize={5} />
</AgentProvider>API Reference
agentRegistryoptionalAgent registry in the format "eip155:{chainId}:{contractAddress}". Required unless inside an <AgentProvider>.
agentIdoptionalERC-721 token ID of the agent. Required unless inside an <AgentProvider>.
classNameoptionalOptional CSS classes merged onto the component root for layout, spacing, or custom styling (e.g. Tailwind).
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
agentRegistry | string | No | — | Agent registry in the format "eip155:{chainId}:{contractAddress}". Required unless inside an <AgentProvider>. |
agentId | number | No | — | ERC-721 token ID of the agent. Required unless inside an <AgentProvider>. |
className | string | No | — | Optional CSS classes merged onto the component root for layout, spacing, or custom styling (e.g. Tailwind). |
States
This component handles loading and error states internally with inline placeholders. No configuration needed.