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 .md to its URL, or by requesting it with Accept: 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.

Loading…
<AgentProvider agentRegistry="eip155:8453:0x8004...a432" agentId={888}>
  <div className="flex items-center gap-3">
    <AgentName />
    <LastActivity />
  </div>
  <ActivityLog pageSize={5} />
</AgentProvider>

API Reference

agentRegistryoptional
type: string

Agent registry in the format "eip155:{chainId}:{contractAddress}". Required unless inside an <AgentProvider>.

agentIdoptional
type: number

ERC-721 token ID of the agent. Required unless inside an <AgentProvider>.

classNameoptional
type: string

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.