New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@tangle-network/agent-embed

Package Overview
Dependencies
Maintainers
4
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tangle-network/agent-embed

Drop-in <tangle-agent> web component for embedding any Tangle-marketplace agent into any website.

latest
npmnpm
Version
0.1.0
Version published
Weekly downloads
1
Maintainers
4
Weekly downloads
 
Created
Source

@tangle-network/agent-embed

Drop-in <tangle-agent> web component for embedding any Tangle marketplace agent into any webpage.

Quick start — script tag (no build step)

<script src="https://unpkg.com/@tangle-network/agent-embed/dist/embed.js"></script>

<tangle-agent slug="tax-freelancer"></tangle-agent>

Quick start — npm

npm install @tangle-network/agent-embed
import '@tangle-network/agent-embed'
<tangle-agent slug="tax-freelancer"></tangle-agent>

Or call defineTangleAgent() explicitly with a custom tag name.

Attributes

AttributeRequiredDefaultPurpose
slugyes—Agent's marketplace slug
hostnohttps://<slug>.tangle.appOverride base host (BYO custom domain)
api-keyno—sk-tan-* key; pass or let UI prompt
modelnoanthropic/claude-sonnet-4-6Override default model
themenoautodark / light / auto
heightno560pxCSS height
welcomenoagent-specificOverride the welcome banner

Events

  • tangle-agent:ready — { slug, host } after the /health check passes
  • tangle-agent:message — { role, content } on each user / assistant message
  • tangle-agent:error — { error, status? } on any failure

Methods

  • el.send(text) — send a message programmatically
  • el.clear() — reset the conversation
  • el.setApiKey(key) — update the sk-tan-* key at runtime

Auth

The component validates the user's sk-tan-* key against the deployed agent's /v1/chat/completions endpoint, which in turn validates against id.tangle.tools. Keys are stored in localStorage per slug for convenience — pass api-key="..." instead if you don't want that.

Shadow DOM parts

Style from the outside via CSS ::part():

tangle-agent::part(header) { background: black; }
tangle-agent::part(send) { background: magenta; }

Parts available: root, header, title, status, key-input, messages, composer, input, send.

Keywords

tangle

FAQs

Package last updated on 21 Apr 2026

Related posts