The AgentData subsystem manages agent-specific data persistence and state.
Role: Local agent data storage
Summary: Stores agent data on the local filesystem with JSON serialization and file-based organization.
| Setting | Type | Required | Default | Description |
|---|---|---|---|---|
devDir |
string | Yes | - | Directory path for development agent data |
prodDir |
string | Yes | - | Directory path for production agent data |
Example Configuration:
import { SRE } from '@smythos/sre';
SRE.init({
AgentData: {
Connector: 'Local',
Settings: {
devDir: './agents/dev',
prodDir: './agents/prod',
},
},
});
Use Cases:
Role: SQLite-based agent data storage
Summary: Stores agent data in a local SQLite database using Node.js built-in SQLite module (v22.5.0+). Agent data is serialized as JSON and stored with version tracking and deployment status.
| Setting | Type | Required | Default | Description |
|---|---|---|---|---|
databasePath |
string | Yes | - | Path to SQLite database file |
tableName |
string | No | 'AiAgentData' | Name of the table for agent data |
Example Configuration:
import { SRE } from '@smythos/sre';
SRE.init({
AgentData: {
Connector: 'SQLite',
Settings: {
databasePath: '~/.smyth/.sre/agents.db',
tableName: 'AiAgentData', // optional
},
},
});
Features:
Role: Command-line agent data provider
Summary: Provides agent data integration for CLI applications with interactive prompts and file-based workflows.
| Setting | Type | Required | Default | Description |
|---|---|---|---|---|
args |
Record<string, any> | Yes | - | Command-line arguments object |
Example Configuration:
import { SRE } from '@smythos/sre';
SRE.init({
AgentData: {
Connector: 'CLI',
Settings: {
args: process.argv, // or custom args object
},
},
});
Use Cases:
Role: No-operation agent data connector
Summary: Provides a null implementation for agent data operations. Used when agent persistence is not required.
| Setting | Type | Required | Default | Description |
|---|---|---|---|---|
args |
Record<string, any> | Yes | - | Arguments object (ignored but required) |
Example Configuration:
import { SRE } from '@smythos/sre';
SRE.init({
AgentData: {
Connector: 'NullAgentData',
Settings: {
args: {},
},
},
});
Use Cases:
Agent data files should be in .smyth format (JSON) and contain:
id: Agent identifiercomponents: Component configuration