AI Persona
Updated
The agent’s name, personality and instructions.
- Type
comp-ai-persona- Script class
AIPersonaComponent- Per entity
- One
- Version
- 1.0.0
Read about it in Creating an agent: what it does, how to use it from a script, and examples.
Live example
Section titled “Live example”Run it in the browser, read its scripts, and download it as an XR Creator project.
Live example
Read an agent's setupA script logs an AI agent's setup at startup, its display name and the provider and model that would answer it, by reading the AI Model and AI Persona props.
Read the agent's setup in the log. No conversation is started, so the example needs no AI service.
From a script
Section titled “From a script”#pragma lifecycle(startup)
function startup() { const component = self.parent.getComponent(AIPersonaComponent); if (component) log(component.props);}