Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>API Reference — three.ws</title>
<meta
name="description"
content="API Reference for three.ws — the open-source platform for 3D AI agents."
/>
<link rel="icon" href="/favicon.ico" />
<link rel="stylesheet" href="/fonts/fonts.css" />
<link rel="stylesheet" href="/style.css" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/atom-one-dark.min.css"
/>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/marked.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
<style>
:root {
--sidebar-w: 268px;
--header-h: 52px;
--docs-accent: #8b5cf6;
--docs-accent-soft: rgba(139, 92, 246, 0.12);
--docs-bg: #09090f;
--sidebar-bg: #0c0c13;
--border: rgba(255, 255, 255, 0.07);
/* 0.62 alpha, not 0.5: composited on the near-black docs bg that's
6.1:1 contrast (axe AA needs 4.5:1; 0.5 measured 4.32 and failed). */
--text-muted: rgba(224, 224, 224, 0.62);
--text-body: rgba(224, 224, 224, 0.85);
}
*,
*::before,
*::after {
box-sizing: border-box;
}
html,
body {
margin: 0;
padding: 0;
height: auto;
overflow: visible;
}
body {
background: var(--docs-bg);
color: #e0e0e0;
font-family: var(--font-body);
font-size: var(--text-base);
line-height: 1.65;
display: block;
}
.docs-header {
position: fixed;
top: 0;
left: 0;
right: 0;
height: var(--header-h);
background: rgba(9, 9, 15, 0.88);
backdrop-filter: blur(16px);
-webkit-backdrop-filter: blur(16px);
border-bottom: 1px solid var(--border);
display: flex;
align-items: center;
padding: 0 var(--space-lg);
gap: var(--space-md);
z-index: 100;
}
.docs-logo {
font-family: var(--font-display);
font-size: var(--text-lg);
font-weight: 600;
color: #fff;
text-decoration: none;
display: flex;
align-items: center;
gap: 7px;
flex-shrink: 0;
}
.docs-logo-dot {
width: 9px;
height: 9px;
border-radius: 50%;
background: linear-gradient(135deg, #a78bfa 0%, #6366f1 100%);
flex-shrink: 0;
}
.docs-logo-mark {
width: 24px;
height: 24px;
flex-shrink: 0;
filter: grayscale(1) contrast(1.05) brightness(1.08)
drop-shadow(0 0 5px rgba(139, 92, 246, 0.45))
drop-shadow(0 0 1px rgba(99, 102, 241, 0.55));
}
.docs-header-sep {
width: 1px;
height: 18px;
background: var(--border);
flex-shrink: 0;
}
.docs-header-label {
font-size: var(--text-sm);
color: var(--text-muted);
font-family: var(--font-body);
}
.docs-header-right {
margin-left: auto;
display: flex;
align-items: center;
gap: var(--space-sm);
}
.docs-header-right a {
font-size: var(--text-sm);
color: var(--text-muted);
text-decoration: none;
padding: 4px 10px;
border-radius: var(--radius-md);
transition: color 0.15s, background 0.15s;
}
.docs-header-right a:hover {
color: #fff;
background: rgba(255, 255, 255, 0.05);
}
.docs-header-right .btn-primary {
background: var(--docs-accent-soft);
color: #c4b5fd;
border: 1px solid rgba(139, 92, 246, 0.25);
}
.docs-header-right .btn-primary:hover {
background: rgba(139, 92, 246, 0.2);
color: #ddd6fe;
}
.docs-shell {
display: flex;
padding-top: var(--header-h);
min-height: 100vh;
}
.docs-sidebar {
position: fixed;
top: var(--header-h);
left: 0;
bottom: 0;
width: var(--sidebar-w);
background: var(--sidebar-bg);
border-right: 1px solid var(--border);
overflow-y: auto;
padding: var(--space-md) 0 var(--space-2xl);
scrollbar-width: thin;
scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}
.docs-sidebar::-webkit-scrollbar {
width: 3px;
}
.docs-sidebar::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.08);
border-radius: 2px;
}
.sidebar-search {
margin: 0 var(--space-sm) var(--space-md);
position: relative;
}
.sidebar-search input {
width: 100%;
background: rgba(255, 255, 255, 0.04);
border: 1px solid var(--border);
border-radius: var(--radius-md);
padding: 7px 10px 7px 32px;
font-size: var(--text-sm);
color: #ccc;
outline: none;
font-family: var(--font-body);
transition: border-color 0.15s, background 0.15s;
}
.sidebar-search input::placeholder {
color: rgba(255, 255, 255, 0.25);
}
.sidebar-search input:focus {
border-color: rgba(139, 92, 246, 0.5);
background: rgba(139, 92, 246, 0.05);
}
.sidebar-search-icon {
position: absolute;
left: 9px;
top: 50%;
transform: translateY(-50%);
pointer-events: none;
opacity: 0.35;
}
.sidebar-section {
margin-bottom: var(--space-md);
}
.sidebar-section-title {
display: block;
font-size: 10px;
font-weight: 700;
letter-spacing: 0.1em;
text-transform: uppercase;
/* 0.55 alpha, not 0.28: on the dark sidebar bg that's 6.3:1 (axe AA
needs 4.5:1 even for bold text this small; 0.28 measured 2.43). */
color: rgba(255, 255, 255, 0.55);
padding: 0 var(--space-sm) 5px var(--space-md);
}
.sidebar-link {
display: block;
padding: 5px var(--space-sm) 5px var(--space-md);
font-size: 13.5px;
color: rgba(255, 255, 255, 0.52);
text-decoration: none;
border-left: 2px solid transparent;
transition: color 0.12s, background 0.12s, border-color 0.12s;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
line-height: 1.5;
}
.sidebar-link:hover {
color: rgba(255, 255, 255, 0.9);
background: rgba(255, 255, 255, 0.035);
}
.sidebar-link.active {
color: #c4b5fd;
border-left-color: var(--docs-accent);
background: var(--docs-accent-soft);
font-weight: 500;
}
.sidebar-link.external::after {
content: '↗';
font-size: 10px;
margin-left: 4px;
opacity: 0.5;
}
.docs-main {
flex: 1;
margin-left: var(--sidebar-w);
padding: var(--space-2xl) clamp(var(--space-lg), 5vw, var(--space-2xl)) 100px;
}
.docs-content {
max-width: 728px;
}
.docs-content h1 {
font-family: var(--font-display);
font-weight: 500;
font-size: clamp(var(--text-xl), 3vw, var(--text-2xl));
letter-spacing: -0.03em;
margin: 0 0 var(--space-sm);
color: #fff;
line-height: 1.2;
}
.docs-content h2 {
font-family: var(--font-display);
font-weight: 500;
font-size: var(--text-xl);
letter-spacing: -0.02em;
margin: var(--space-2xl) 0 var(--space-sm);
padding-bottom: var(--space-xs);
border-bottom: 1px solid var(--border);
color: #fff;
line-height: 1.3;
}
.docs-content h2:first-child {
margin-top: 0;
}
.docs-content h3 {
font-weight: 600;
font-size: var(--text-lg);
margin: var(--space-xl) 0 var(--space-xs);
color: #f0f0f0;
}
.docs-content h4 {
font-weight: 600;
font-size: var(--text-base);
margin: var(--space-lg) 0 var(--space-xs);
color: #ddd;
}
.docs-content p {
color: var(--text-body);
margin: 0 0 var(--space-md);
}
.docs-content ul,
.docs-content ol {
padding-left: var(--space-lg);
margin: 0 0 var(--space-md);
}
.docs-content li {
color: var(--text-body);
margin-bottom: 4px;
}
.docs-content li > ul,
.docs-content li > ol {
margin-top: 4px;
margin-bottom: 4px;
}
.docs-content a {
color: #a78bfa;
text-decoration: none;
border-bottom: 1px solid rgba(167, 139, 250, 0.25);
transition: color 0.12s, border-color 0.12s;
}
.docs-content a:hover {
color: #c4b5fd;
border-bottom-color: rgba(196, 181, 253, 0.5);
}
.docs-content strong {
color: #fff;
font-weight: 600;
}
.docs-content em {
color: rgba(224, 224, 224, 0.75);
}
.docs-content code {
font-family: var(--font-mono);
font-size: 0.875em;
background: rgba(139, 92, 246, 0.1);
border: 1px solid rgba(139, 92, 246, 0.18);
padding: 1px 5px;
border-radius: 3px;
color: #c4b5fd;
}
.docs-content pre {
background: #0d0d18;
border: 1px solid rgba(255, 255, 255, 0.07);
border-radius: var(--radius-md);
padding: var(--space-md);
overflow-x: auto;
margin: 0 0 var(--space-md);
position: relative;
}
.docs-content pre code {
background: transparent;
border: none;
padding: 0;
color: inherit;
font-size: var(--text-sm);
line-height: 1.6;
}
.docs-content blockquote {
border-left: 3px solid var(--docs-accent);
margin: 0 0 var(--space-md);
padding: var(--space-xs) var(--space-md);
background: rgba(139, 92, 246, 0.06);
border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.docs-content blockquote p {
color: rgba(224, 224, 224, 0.7);
margin: 0;
}
.docs-content table {
width: 100%;
border-collapse: collapse;
margin: 0 0 var(--space-md);
font-size: 13.5px;
}
.docs-content th {
text-align: left;
padding: 8px var(--space-sm);
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
color: rgba(255, 255, 255, 0.45);
font-weight: 600;
font-size: 11px;
letter-spacing: 0.06em;
text-transform: uppercase;
}
.docs-content td {
padding: 9px var(--space-sm);
border-bottom: 1px solid rgba(255, 255, 255, 0.04);
color: var(--text-body);
vertical-align: top;
}
.docs-content tr:last-child td {
border-bottom: none;
}
.docs-content hr {
border: none;
border-top: 1px solid var(--border);
margin: var(--space-xl) 0;
}
.docs-content img {
max-width: 100%;
border-radius: var(--radius-md);
border: 1px solid var(--border);
}
.docs-loading {
display: flex;
align-items: center;
gap: var(--space-sm);
color: var(--text-muted);
font-size: var(--text-sm);
padding: var(--space-2xl) 0;
}
.docs-loading-dot {
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--docs-accent);
animation: blink 1s ease-in-out infinite;
}
@keyframes blink {
0%,
100% {
opacity: 0.15;
}
50% {
opacity: 1;
}
}
.docs-pager {
display: grid;
grid-template-columns: 1fr 1fr;
gap: var(--space-sm);
margin-top: var(--space-2xl);
padding-top: var(--space-xl);
border-top: 1px solid var(--border);
}
.docs-pager-btn {
display: flex;
flex-direction: column;
gap: 3px;
padding: var(--space-sm) var(--space-md);
background: rgba(255, 255, 255, 0.025);
border: 1px solid var(--border);
border-radius: var(--radius-md);
text-decoration: none;
transition: background 0.15s, border-color 0.15s;
color: inherit;
}
.docs-pager-btn:hover {
background: rgba(255, 255, 255, 0.05);
border-color: rgba(255, 255, 255, 0.12);
border-bottom-color: rgba(255, 255, 255, 0.12);
}
.docs-pager-btn .pager-dir {
font-size: 10px;
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--text-muted);
}
.docs-pager-btn .pager-title {
font-size: var(--text-sm);
font-weight: 500;
color: #e0e0e0;
}
.docs-pager-btn.next {
text-align: right;
}
.docs-pager-btn.placeholder {
visibility: hidden;
}
.sidebar-fab {
display: none;
position: fixed;
bottom: 22px;
right: 22px;
z-index: 200;
background: var(--docs-accent);
color: #fff;
border: none;
border-radius: 50%;
width: 46px;
height: 46px;
cursor: pointer;
align-items: center;
justify-content: center;
box-shadow: 0 4px 24px rgba(139, 92, 246, 0.45);
transition: transform 0.15s;
}
.sidebar-fab:hover {
transform: scale(1.06);
}
.sidebar-overlay {
display: none;
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.6);
z-index: 140;
}
@media (max-width: 860px) {
.docs-sidebar {
transform: translateX(-100%);
transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
z-index: 150;
box-shadow: 4px 0 32px rgba(0, 0, 0, 0.5);
}
}
</style>
</head>
<body>
<div class="docs-shell">
<aside class="docs-sidebar" id="docs-sidebar"></aside>
<main class="docs-main">
<div class="docs-content" id="docs-content">
<div class="docs-loading">
<span class="docs-loading-dot"></span>
<span>Loading...</span>
</div>
</div>
<nav class="docs-pager" id="docs-pager"></nav>
</main>
</div>
<script>
const navConfig = [
{
title: 'Getting Started',
links: [
{ title: 'Introduction', file: 'introduction.md' },
{ title: 'Quick Start', file: 'quick-start.md' },
{ title: 'Architecture', file: 'architecture.md' },
],
},
{
title: 'Core Concepts',
links: [
{ title: 'Agent System', file: 'agent-system.md' },
{ title: 'Skills', file: 'skills.md' },
{ title: 'Memory', file: 'memory.md' },
{ title: 'Permissions', file: 'permissions.md' },
],
},
{
title: 'API Reference',
links: [
{ title: 'REST API', file: 'api-reference.md' },
{ title: 'JS API', file: 'js-api.md' },
],
},
];
function renderSidebar() {
const sidebar = document.getElementById('docs-sidebar');
sidebar.innerHTML = '';
const currentFile = getCurrentFile();
for (const section of navConfig) {
const sectionEl = document.createElement('div');
sectionEl.className = 'sidebar-section';
const sectionTitle = document.createElement('span');
sectionTitle.className = 'sidebar-section-title';
sectionTitle.textContent = section.title;
sectionEl.appendChild(sectionTitle);
for (const link of section.links) {
const linkEl = document.createElement('a');
linkEl.className = 'sidebar-link';
linkEl.href = `?page=${link.file}`;
linkEl.textContent = link.title;
if (link.file === currentFile) {
linkEl.classList.add('active');
}
sectionEl.appendChild(linkEl);
}
sidebar.appendChild(sectionEl);
}
}
function getCurrentFile() {
const urlParams = new URLSearchParams(window.location.search);
return urlParams.get('page') || 'introduction.md';
}
async function loadContent() {
const contentEl = document.getElementById('docs-content');
const file = getCurrentFile();
try {
const response = await fetch(file);
if (!response.ok) {
throw new Error('Could not load documentation file.');
}
const markdown = await response.text();
contentEl.innerHTML = marked.parse(markdown);
hljs.highlightAll();
} catch (error) {
contentEl.innerHTML = `<p>Error loading content: ${error.message}</p>`;
}
}
function handleNav() {
renderSidebar();
loadContent();
}
window.addEventListener('popstate', handleNav);
document.addEventListener('DOMContentLoaded', () => {
const docsShell = document.querySelector('.docs-shell');
docsShell.addEventListener('click', (e) => {
if (e.target.matches('.sidebar-link')) {
e.preventDefault();
const url = new URL(e.target.href);
history.pushState({}, '', url.search);
handleNav();
}
});
handleNav();
});
</script>
</body>
</html>