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.

AgentProvider

Optional convenience wrapper that sets a default agentRegistry and agentId for all child components. Eliminates prop repetition on profile pages. Components inside can still override with their own props.

Usage

import { AgentProvider } from "@p4n/erc8004-ui"
import { AgentProvider, AgentName, ReputationScore, FeedbackList } from "@p4n/erc8004-ui"

// Profile page — one agent, many components, no repetition:
<AgentProvider agentRegistry="eip155:8453:0x8004A169FB4a3325136EB29fA0ceB6D2e539a432" agentId={888}>
  <AgentName />
  <ReputationScore />
  <FeedbackList />
</AgentProvider>

// Override one component inside the provider:
<AgentProvider agentRegistry="eip155:8453:0x8004A169FB4a3325136EB29fA0ceB6D2e539a432" agentId={888}>
  <AgentName />
  <AgentName agentRegistry="eip155:1:0x999..." agentId={12} />
</AgentProvider>

API Reference

agentRegistryrequired
type: string

Agent registry identifier in the format "eip155:{chainId}:{contractAddress}".

agentIdrequired
type: number

ERC-721 token ID of the agent.

childrenrequired
type: ReactNode

Components that will inherit this agent identity.