Documentation Index
Fetch the complete documentation index at: https://docs.xhipai.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Agent serialization lets you save agent configurations as JSON and reconstruct them later. Useful for persisting agent configs in databases, transferring between services, or version-controlling agent definitions.Serialize
Deserialize
SerializedAgent Schema
| Field | Type | Description |
|---|---|---|
name | string | Agent name |
modelId | string | Model identifier |
providerId | string | Provider identifier |
instructions | string? | System instructions |
toolNames | string[] | Tool names (resolved from registry) |
temperature | number? | Temperature setting |
maxTokens | number? | Max output tokens |
reasoning | object? | Reasoning configuration |
Notes
- Function-based instructions are not serializable (only string instructions are saved)
- Runtime objects (EventBus, storage) are stripped during serialization
- Deserialized agents have
register: falseby default to avoid auto-registration