Skip to content
 
 

Repository files navigation

AgentFace

中文

AgentFace is an open-source robot avatar system that maps a seed, wallet address, or any stable identifier to a deterministic, configurable SVG avatar.

Live Playground

Packages

packages/
  core/   deterministic config generation, URL serialization, SVG rendering
  react/  React wrapper
  vue/    Vue wrapper
  web/    playground app

Install

Recommended environment:

  • Node.js 20+
  • pnpm 10+
pnpm install

Install the published packages:

pnpm add @agent-face/core
pnpm add @agent-face/react
pnpm add @agent-face/vue

Core Example

import {
  generateAgentFaceConfig,
  renderAgentFaceSvg,
  serializeAgentFaceConfig,
  deserializeAgentFaceConfig,
} from "@agent-face/core";

const config = generateAgentFaceConfig("0xabc123");
const svg = renderAgentFaceSvg(config);
const query = serializeAgentFaceConfig(config);
const restored = deserializeAgentFaceConfig(query);

React Example

import { AgentFace } from "@agent-face/react";

export function Example() {
  return <AgentFace seed="demo-agent" size={120} className="rounded-3xl shadow-sm" />;
}

Vue Example

<script setup lang="ts">
import { AgentFace } from "@agent-face/vue";
</script>

<template>
  <AgentFace seed="demo-agent" :size="120" class="rounded-3xl shadow-sm" />
</template>

Playground Usage

The web playground is designed around a simple flow:

  1. Enter a seed or address
  2. Preview the generated avatar
  3. Adjust grouped options
  4. Copy a share link or export SVG

Current playground capabilities:

  • deterministic generation from seed/address
  • live preview
  • English / Chinese language switching
  • grouped config editing
  • shareable URL sync
  • config JSON copy
  • SVG export
  • package-level custom image URL with a sketch loading placeholder and AgentFace fallback

About

AgentFace 是一个开源机器人头像系统,用于把 seed、wallet address 或稳定标识映射为可复现、可 配置的 SVG 头像. AgentFace is an open-source robot avatar system that maps seeds, wallet addresses, or stable identifiers to deterministic, configurable SVG avatars.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages