Overview
TheECA class is the primary entry point for interacting with the AveniECA API. It handles authentication and provides access to all API clients including ESS, Sequence, Cortex, Document, Embedding, Retrieval, and Response APIs.
Initialization
Constructor
ECA(config: Config)
Initializes the ECA client and performs authentication.
Configuration object containing authentication credentials and API endpoint
Exception: If login fails when using username/password authentication
Available API Clients
Once initialized, theECA instance provides access to the following API clients:
eca.ess
Type: ESS
Client for interacting with the ESS (Embodied State Space) API. Manages twins and aggregates.
View ESS API documentation →
eca.sequence
Type: Sequence
Client for managing sequences of twins and aggregates over time.
View Sequence API documentation →
eca.cortex
Type: Cortex
Client for making predictions using the Cortex engine.
View Cortex API documentation →
eca.document
Type: Document
Client for managing documents for retrieval and embedding.
View Document API documentation →
eca.embedding
Type: Embedding
Client for managing embedding inputs that map states to human-readable values.
View Embedding API documentation →
eca.retrieval
Type: Retrieval
Client for natural language retrieval queries.
View Retrieval API documentation →
eca.response
Type: ECAResponse
Client for retrieving stored prediction responses.
View Response API documentation →
Example Usage
Authentication
TheECA client supports two authentication methods:
Username/Password
Provideusername and password in the Config. The client will automatically perform login and store the session token.
API Token
Provide a pre-existingapi_token to skip the login step.