Alita SDK

raw JSON →
0.5.18 verified Mon Apr 27 auth: no python

SDK for building LangChain agents using resources from Alita. Current version 0.5.18, requires Python >=3.10. Active development with frequent releases.

pip install alita-sdk
error ModuleNotFoundError: No module named 'alita'
cause Incorrect import path; module is named 'alita_sdk'.
fix
Install with 'pip install alita-sdk' and import as 'from alita_sdk import AlitaClient'.
error AttributeError: module 'alita_sdk' has no attribute 'Alita'
cause The class was renamed from 'Alita' to 'AlitaClient' in version 0.5.0.
fix
Use 'AlitaClient' instead of 'Alita'.
error TypeError: AlitaClient.__init__() missing 1 required positional argument: 'api_key'
cause API key not provided either as argument or environment variable.
fix
Set the ALITA_API_KEY environment variable or pass api_key='your-key' explicitly.
breaking Version 0.5.0 renamed the main class from 'Alita' to 'AlitaClient'. Old import 'from alita_sdk import Alita' will fail.
fix Use 'from alita_sdk import AlitaClient'
gotcha Module name is 'alita_sdk', not 'alita' or 'alitasdk'. Import errors are common with wrong module name.
fix Ensure pip install alita-sdk and use 'import alita_sdk'
deprecated The method 'get_agent' is deprecated in favor of 'create_agent'.
fix Use client.create_agent(...) instead of client.get_agent(...)

Initialize AlitaClient with API key from environment variable.

import os
from alita_sdk import AlitaClient

client = AlitaClient(api_key=os.environ.get('ALITA_API_KEY', ''))
# List available resources
resources = client.list_resources()
print(resources)