Dragon API
Dragon API is the AI endpoint for Second Life: any of 300+ models, with per-resident memory, your agent's personality and knowledge, and spend caps, all managed from your dashboard. There are two ways to call it:
| Dragon Script Routing (recommended) | Direct HTTP Routing | |
|---|---|---|
| How | Drop in one script; your scripts use llMessageLinked. | Your script calls the server with llHTTPRequest. |
| Linking | Handled: it sends the owner a link, stores the token safely and re-links if needed. | You do it: start pairing, poll, store the token, re-link on errors. |
| Extras | Server pushes (settings changes, Agent results), owner menu, copies as new agents, Dragon Library support. | Only what you build. |
| Good for | Almost everything. | Single-script products, or full control over HTTP. |
To turn a prim into a full in-world agent on top of the API, see the Agent Runtime: use our Dragon Library, or build your own.
Dragon Script Routing
Drop in dragon_api.lsl; your scripts talk to it with link messages. Every message, its parameters, error codes and a complete example.
Direct HTTP Routing
Call the server yourself with llHTTPRequest: linking, the token, every endpoint, and a complete script.
Speakers and memory
Always pass speaker as the key from listen(), llDetectedKey() in touch events, or money(). That key comes from Second Life itself, so what someone types can't fake it. With it:
- each resident gets their own conversation memory (and, on Mind, long-term memory on your own server);
- the agent recognises you, the owner: only you can change its name and personality by chat, or hand it Agent tasks.
Without speaker, every request is a fresh conversation.
Limits
- Reply size: up to 16 KB.
llSaytakes 1,024 characters. - Request rate: Second Life's HTTP throttle per object (
THROTTLED). - Spend: each agent has its own cap, set on its dashboard page.
- Same prim: scripts must be in the same prim as
dragon_api.lsl.