alita-sdk 0.3.257__py3-none-any.whl → 0.3.584__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of alita-sdk might be problematic. Click here for more details.
- alita_sdk/cli/__init__.py +10 -0
- alita_sdk/cli/__main__.py +17 -0
- alita_sdk/cli/agent/__init__.py +5 -0
- alita_sdk/cli/agent/default.py +258 -0
- alita_sdk/cli/agent_executor.py +155 -0
- alita_sdk/cli/agent_loader.py +215 -0
- alita_sdk/cli/agent_ui.py +228 -0
- alita_sdk/cli/agents.py +3794 -0
- alita_sdk/cli/callbacks.py +647 -0
- alita_sdk/cli/cli.py +168 -0
- alita_sdk/cli/config.py +306 -0
- alita_sdk/cli/context/__init__.py +30 -0
- alita_sdk/cli/context/cleanup.py +198 -0
- alita_sdk/cli/context/manager.py +731 -0
- alita_sdk/cli/context/message.py +285 -0
- alita_sdk/cli/context/strategies.py +289 -0
- alita_sdk/cli/context/token_estimation.py +127 -0
- alita_sdk/cli/formatting.py +182 -0
- alita_sdk/cli/input_handler.py +419 -0
- alita_sdk/cli/inventory.py +1073 -0
- alita_sdk/cli/mcp_loader.py +315 -0
- alita_sdk/cli/toolkit.py +327 -0
- alita_sdk/cli/toolkit_loader.py +85 -0
- alita_sdk/cli/tools/__init__.py +43 -0
- alita_sdk/cli/tools/approval.py +224 -0
- alita_sdk/cli/tools/filesystem.py +1751 -0
- alita_sdk/cli/tools/planning.py +389 -0
- alita_sdk/cli/tools/terminal.py +414 -0
- alita_sdk/community/__init__.py +72 -12
- alita_sdk/community/inventory/__init__.py +236 -0
- alita_sdk/community/inventory/config.py +257 -0
- alita_sdk/community/inventory/enrichment.py +2137 -0
- alita_sdk/community/inventory/extractors.py +1469 -0
- alita_sdk/community/inventory/ingestion.py +3172 -0
- alita_sdk/community/inventory/knowledge_graph.py +1457 -0
- alita_sdk/community/inventory/parsers/__init__.py +218 -0
- alita_sdk/community/inventory/parsers/base.py +295 -0
- alita_sdk/community/inventory/parsers/csharp_parser.py +907 -0
- alita_sdk/community/inventory/parsers/go_parser.py +851 -0
- alita_sdk/community/inventory/parsers/html_parser.py +389 -0
- alita_sdk/community/inventory/parsers/java_parser.py +593 -0
- alita_sdk/community/inventory/parsers/javascript_parser.py +629 -0
- alita_sdk/community/inventory/parsers/kotlin_parser.py +768 -0
- alita_sdk/community/inventory/parsers/markdown_parser.py +362 -0
- alita_sdk/community/inventory/parsers/python_parser.py +604 -0
- alita_sdk/community/inventory/parsers/rust_parser.py +858 -0
- alita_sdk/community/inventory/parsers/swift_parser.py +832 -0
- alita_sdk/community/inventory/parsers/text_parser.py +322 -0
- alita_sdk/community/inventory/parsers/yaml_parser.py +370 -0
- alita_sdk/community/inventory/patterns/__init__.py +61 -0
- alita_sdk/community/inventory/patterns/ast_adapter.py +380 -0
- alita_sdk/community/inventory/patterns/loader.py +348 -0
- alita_sdk/community/inventory/patterns/registry.py +198 -0
- alita_sdk/community/inventory/presets.py +535 -0
- alita_sdk/community/inventory/retrieval.py +1403 -0
- alita_sdk/community/inventory/toolkit.py +173 -0
- alita_sdk/community/inventory/toolkit_utils.py +176 -0
- alita_sdk/community/inventory/visualize.py +1370 -0
- alita_sdk/configurations/__init__.py +11 -0
- alita_sdk/configurations/ado.py +148 -2
- alita_sdk/configurations/azure_search.py +1 -1
- alita_sdk/configurations/bigquery.py +1 -1
- alita_sdk/configurations/bitbucket.py +94 -2
- alita_sdk/configurations/browser.py +18 -0
- alita_sdk/configurations/carrier.py +19 -0
- alita_sdk/configurations/confluence.py +130 -1
- alita_sdk/configurations/delta_lake.py +1 -1
- alita_sdk/configurations/figma.py +76 -5
- alita_sdk/configurations/github.py +65 -1
- alita_sdk/configurations/gitlab.py +81 -0
- alita_sdk/configurations/google_places.py +17 -0
- alita_sdk/configurations/jira.py +103 -0
- alita_sdk/configurations/openapi.py +323 -0
- alita_sdk/configurations/postman.py +1 -1
- alita_sdk/configurations/qtest.py +72 -3
- alita_sdk/configurations/report_portal.py +115 -0
- alita_sdk/configurations/salesforce.py +19 -0
- alita_sdk/configurations/service_now.py +1 -12
- alita_sdk/configurations/sharepoint.py +167 -0
- alita_sdk/configurations/sonar.py +18 -0
- alita_sdk/configurations/sql.py +20 -0
- alita_sdk/configurations/testio.py +101 -0
- alita_sdk/configurations/testrail.py +88 -0
- alita_sdk/configurations/xray.py +94 -1
- alita_sdk/configurations/zephyr_enterprise.py +94 -1
- alita_sdk/configurations/zephyr_essential.py +95 -0
- alita_sdk/runtime/clients/artifact.py +21 -4
- alita_sdk/runtime/clients/client.py +458 -67
- alita_sdk/runtime/clients/mcp_discovery.py +342 -0
- alita_sdk/runtime/clients/mcp_manager.py +262 -0
- alita_sdk/runtime/clients/sandbox_client.py +352 -0
- alita_sdk/runtime/langchain/_constants_bkup.py +1318 -0
- alita_sdk/runtime/langchain/assistant.py +183 -43
- alita_sdk/runtime/langchain/constants.py +647 -1
- alita_sdk/runtime/langchain/document_loaders/AlitaDocxMammothLoader.py +315 -3
- alita_sdk/runtime/langchain/document_loaders/AlitaExcelLoader.py +209 -31
- alita_sdk/runtime/langchain/document_loaders/AlitaImageLoader.py +1 -1
- alita_sdk/runtime/langchain/document_loaders/AlitaJSONLinesLoader.py +77 -0
- alita_sdk/runtime/langchain/document_loaders/AlitaJSONLoader.py +10 -3
- alita_sdk/runtime/langchain/document_loaders/AlitaMarkdownLoader.py +66 -0
- alita_sdk/runtime/langchain/document_loaders/AlitaPDFLoader.py +79 -10
- alita_sdk/runtime/langchain/document_loaders/AlitaPowerPointLoader.py +52 -15
- alita_sdk/runtime/langchain/document_loaders/AlitaPythonLoader.py +9 -0
- alita_sdk/runtime/langchain/document_loaders/AlitaTableLoader.py +1 -4
- alita_sdk/runtime/langchain/document_loaders/AlitaTextLoader.py +15 -2
- alita_sdk/runtime/langchain/document_loaders/ImageParser.py +30 -0
- alita_sdk/runtime/langchain/document_loaders/constants.py +189 -41
- alita_sdk/runtime/langchain/interfaces/llm_processor.py +4 -2
- alita_sdk/runtime/langchain/langraph_agent.py +493 -105
- alita_sdk/runtime/langchain/utils.py +118 -8
- alita_sdk/runtime/llms/preloaded.py +2 -6
- alita_sdk/runtime/models/mcp_models.py +61 -0
- alita_sdk/runtime/skills/__init__.py +91 -0
- alita_sdk/runtime/skills/callbacks.py +498 -0
- alita_sdk/runtime/skills/discovery.py +540 -0
- alita_sdk/runtime/skills/executor.py +610 -0
- alita_sdk/runtime/skills/input_builder.py +371 -0
- alita_sdk/runtime/skills/models.py +330 -0
- alita_sdk/runtime/skills/registry.py +355 -0
- alita_sdk/runtime/skills/skill_runner.py +330 -0
- alita_sdk/runtime/toolkits/__init__.py +28 -0
- alita_sdk/runtime/toolkits/application.py +14 -4
- alita_sdk/runtime/toolkits/artifact.py +25 -9
- alita_sdk/runtime/toolkits/datasource.py +13 -6
- alita_sdk/runtime/toolkits/mcp.py +782 -0
- alita_sdk/runtime/toolkits/planning.py +178 -0
- alita_sdk/runtime/toolkits/skill_router.py +238 -0
- alita_sdk/runtime/toolkits/subgraph.py +11 -6
- alita_sdk/runtime/toolkits/tools.py +314 -70
- alita_sdk/runtime/toolkits/vectorstore.py +11 -5
- alita_sdk/runtime/tools/__init__.py +24 -0
- alita_sdk/runtime/tools/application.py +16 -4
- alita_sdk/runtime/tools/artifact.py +367 -33
- alita_sdk/runtime/tools/data_analysis.py +183 -0
- alita_sdk/runtime/tools/function.py +100 -4
- alita_sdk/runtime/tools/graph.py +81 -0
- alita_sdk/runtime/tools/image_generation.py +218 -0
- alita_sdk/runtime/tools/llm.py +1032 -177
- alita_sdk/runtime/tools/loop.py +3 -1
- alita_sdk/runtime/tools/loop_output.py +3 -1
- alita_sdk/runtime/tools/mcp_inspect_tool.py +284 -0
- alita_sdk/runtime/tools/mcp_remote_tool.py +181 -0
- alita_sdk/runtime/tools/mcp_server_tool.py +3 -1
- alita_sdk/runtime/tools/planning/__init__.py +36 -0
- alita_sdk/runtime/tools/planning/models.py +246 -0
- alita_sdk/runtime/tools/planning/wrapper.py +607 -0
- alita_sdk/runtime/tools/router.py +2 -1
- alita_sdk/runtime/tools/sandbox.py +375 -0
- alita_sdk/runtime/tools/skill_router.py +776 -0
- alita_sdk/runtime/tools/tool.py +3 -1
- alita_sdk/runtime/tools/vectorstore.py +69 -65
- alita_sdk/runtime/tools/vectorstore_base.py +163 -90
- alita_sdk/runtime/utils/AlitaCallback.py +137 -21
- alita_sdk/runtime/utils/constants.py +5 -1
- alita_sdk/runtime/utils/mcp_client.py +492 -0
- alita_sdk/runtime/utils/mcp_oauth.py +361 -0
- alita_sdk/runtime/utils/mcp_sse_client.py +434 -0
- alita_sdk/runtime/utils/mcp_tools_discovery.py +124 -0
- alita_sdk/runtime/utils/streamlit.py +41 -14
- alita_sdk/runtime/utils/toolkit_utils.py +28 -9
- alita_sdk/runtime/utils/utils.py +48 -0
- alita_sdk/tools/__init__.py +135 -37
- alita_sdk/tools/ado/__init__.py +2 -2
- alita_sdk/tools/ado/repos/__init__.py +16 -19
- alita_sdk/tools/ado/repos/repos_wrapper.py +12 -20
- alita_sdk/tools/ado/test_plan/__init__.py +27 -8
- alita_sdk/tools/ado/test_plan/test_plan_wrapper.py +56 -28
- alita_sdk/tools/ado/wiki/__init__.py +28 -12
- alita_sdk/tools/ado/wiki/ado_wrapper.py +114 -40
- alita_sdk/tools/ado/work_item/__init__.py +28 -12
- alita_sdk/tools/ado/work_item/ado_wrapper.py +95 -11
- alita_sdk/tools/advanced_jira_mining/__init__.py +13 -8
- alita_sdk/tools/aws/delta_lake/__init__.py +15 -11
- alita_sdk/tools/aws/delta_lake/tool.py +5 -1
- alita_sdk/tools/azure_ai/search/__init__.py +14 -8
- alita_sdk/tools/base/tool.py +5 -1
- alita_sdk/tools/base_indexer_toolkit.py +454 -110
- alita_sdk/tools/bitbucket/__init__.py +28 -19
- alita_sdk/tools/bitbucket/api_wrapper.py +285 -27
- alita_sdk/tools/bitbucket/cloud_api_wrapper.py +5 -5
- alita_sdk/tools/browser/__init__.py +41 -16
- alita_sdk/tools/browser/crawler.py +3 -1
- alita_sdk/tools/browser/utils.py +15 -6
- alita_sdk/tools/carrier/__init__.py +18 -17
- alita_sdk/tools/carrier/backend_reports_tool.py +8 -4
- alita_sdk/tools/carrier/excel_reporter.py +8 -4
- alita_sdk/tools/chunkers/__init__.py +3 -1
- alita_sdk/tools/chunkers/code/codeparser.py +1 -1
- alita_sdk/tools/chunkers/sematic/json_chunker.py +2 -1
- alita_sdk/tools/chunkers/sematic/markdown_chunker.py +97 -6
- alita_sdk/tools/chunkers/sematic/proposal_chunker.py +1 -1
- alita_sdk/tools/chunkers/universal_chunker.py +270 -0
- alita_sdk/tools/cloud/aws/__init__.py +12 -7
- alita_sdk/tools/cloud/azure/__init__.py +12 -7
- alita_sdk/tools/cloud/gcp/__init__.py +12 -7
- alita_sdk/tools/cloud/k8s/__init__.py +12 -7
- alita_sdk/tools/code/linter/__init__.py +10 -8
- alita_sdk/tools/code/loaders/codesearcher.py +3 -2
- alita_sdk/tools/code/sonar/__init__.py +21 -13
- alita_sdk/tools/code_indexer_toolkit.py +199 -0
- alita_sdk/tools/confluence/__init__.py +22 -14
- alita_sdk/tools/confluence/api_wrapper.py +197 -58
- alita_sdk/tools/confluence/loader.py +14 -2
- alita_sdk/tools/custom_open_api/__init__.py +12 -5
- alita_sdk/tools/elastic/__init__.py +11 -8
- alita_sdk/tools/elitea_base.py +546 -64
- alita_sdk/tools/figma/__init__.py +60 -11
- alita_sdk/tools/figma/api_wrapper.py +1400 -167
- alita_sdk/tools/figma/figma_client.py +73 -0
- alita_sdk/tools/figma/toon_tools.py +2748 -0
- alita_sdk/tools/github/__init__.py +18 -17
- alita_sdk/tools/github/api_wrapper.py +9 -26
- alita_sdk/tools/github/github_client.py +81 -12
- alita_sdk/tools/github/schemas.py +2 -1
- alita_sdk/tools/github/tool.py +5 -1
- alita_sdk/tools/gitlab/__init__.py +19 -13
- alita_sdk/tools/gitlab/api_wrapper.py +256 -80
- alita_sdk/tools/gitlab_org/__init__.py +14 -10
- alita_sdk/tools/google/bigquery/__init__.py +14 -13
- alita_sdk/tools/google/bigquery/tool.py +5 -1
- alita_sdk/tools/google_places/__init__.py +21 -11
- alita_sdk/tools/jira/__init__.py +22 -11
- alita_sdk/tools/jira/api_wrapper.py +315 -168
- alita_sdk/tools/keycloak/__init__.py +11 -8
- alita_sdk/tools/localgit/__init__.py +9 -3
- alita_sdk/tools/localgit/local_git.py +62 -54
- alita_sdk/tools/localgit/tool.py +5 -1
- alita_sdk/tools/memory/__init__.py +38 -14
- alita_sdk/tools/non_code_indexer_toolkit.py +7 -2
- alita_sdk/tools/ocr/__init__.py +11 -8
- alita_sdk/tools/openapi/__init__.py +491 -106
- alita_sdk/tools/openapi/api_wrapper.py +1357 -0
- alita_sdk/tools/openapi/tool.py +20 -0
- alita_sdk/tools/pandas/__init__.py +20 -12
- alita_sdk/tools/pandas/api_wrapper.py +40 -45
- alita_sdk/tools/pandas/dataframe/generator/base.py +3 -1
- alita_sdk/tools/postman/__init__.py +11 -11
- alita_sdk/tools/postman/api_wrapper.py +19 -8
- alita_sdk/tools/postman/postman_analysis.py +8 -1
- alita_sdk/tools/pptx/__init__.py +11 -10
- alita_sdk/tools/qtest/__init__.py +22 -14
- alita_sdk/tools/qtest/api_wrapper.py +1784 -88
- alita_sdk/tools/rally/__init__.py +13 -10
- alita_sdk/tools/report_portal/__init__.py +23 -16
- alita_sdk/tools/salesforce/__init__.py +22 -16
- alita_sdk/tools/servicenow/__init__.py +21 -16
- alita_sdk/tools/servicenow/api_wrapper.py +1 -1
- alita_sdk/tools/sharepoint/__init__.py +17 -14
- alita_sdk/tools/sharepoint/api_wrapper.py +179 -39
- alita_sdk/tools/sharepoint/authorization_helper.py +191 -1
- alita_sdk/tools/sharepoint/utils.py +8 -2
- alita_sdk/tools/slack/__init__.py +13 -8
- alita_sdk/tools/sql/__init__.py +22 -19
- alita_sdk/tools/sql/api_wrapper.py +71 -23
- alita_sdk/tools/testio/__init__.py +21 -13
- alita_sdk/tools/testrail/__init__.py +13 -11
- alita_sdk/tools/testrail/api_wrapper.py +214 -46
- alita_sdk/tools/utils/__init__.py +28 -4
- alita_sdk/tools/utils/content_parser.py +241 -55
- alita_sdk/tools/utils/text_operations.py +254 -0
- alita_sdk/tools/vector_adapters/VectorStoreAdapter.py +83 -27
- alita_sdk/tools/xray/__init__.py +18 -14
- alita_sdk/tools/xray/api_wrapper.py +58 -113
- alita_sdk/tools/yagmail/__init__.py +9 -3
- alita_sdk/tools/zephyr/__init__.py +12 -7
- alita_sdk/tools/zephyr_enterprise/__init__.py +16 -9
- alita_sdk/tools/zephyr_enterprise/api_wrapper.py +30 -15
- alita_sdk/tools/zephyr_essential/__init__.py +16 -10
- alita_sdk/tools/zephyr_essential/api_wrapper.py +297 -54
- alita_sdk/tools/zephyr_essential/client.py +6 -4
- alita_sdk/tools/zephyr_scale/__init__.py +13 -8
- alita_sdk/tools/zephyr_scale/api_wrapper.py +39 -31
- alita_sdk/tools/zephyr_squad/__init__.py +12 -7
- {alita_sdk-0.3.257.dist-info → alita_sdk-0.3.584.dist-info}/METADATA +184 -37
- alita_sdk-0.3.584.dist-info/RECORD +452 -0
- alita_sdk-0.3.584.dist-info/entry_points.txt +2 -0
- alita_sdk/tools/bitbucket/tools.py +0 -304
- alita_sdk-0.3.257.dist-info/RECORD +0 -343
- {alita_sdk-0.3.257.dist-info → alita_sdk-0.3.584.dist-info}/WHEEL +0 -0
- {alita_sdk-0.3.257.dist-info → alita_sdk-0.3.584.dist-info}/licenses/LICENSE +0 -0
- {alita_sdk-0.3.257.dist-info → alita_sdk-0.3.584.dist-info}/top_level.txt +0 -0
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
import json
|
|
2
2
|
import logging
|
|
3
3
|
import re
|
|
4
|
-
from typing import Any, Optional, List, Dict, Tuple, Union, Generator
|
|
4
|
+
from typing import Any, Optional, List, Dict, Tuple, Union, Generator, Literal
|
|
5
5
|
|
|
6
6
|
from pydantic import model_validator, BaseModel, SecretStr
|
|
7
7
|
from langchain_core.tools import ToolException
|
|
8
8
|
from pydantic import create_model, PrivateAttr
|
|
9
9
|
from pydantic.fields import Field
|
|
10
10
|
|
|
11
|
-
from ..elitea_base import BaseVectorStoreToolApiWrapper, BaseIndexParams, extend_with_vector_tools
|
|
12
11
|
from langchain_core.documents import Document
|
|
12
|
+
|
|
13
|
+
from ..non_code_indexer_toolkit import NonCodeIndexerToolkit
|
|
14
|
+
from ..utils.available_tools_decorator import extend_with_parent_available_tools
|
|
15
|
+
from ..utils.content_parser import file_extension_by_chunker
|
|
16
|
+
from ...runtime.utils.utils import IndexerKeywords
|
|
17
|
+
|
|
13
18
|
try:
|
|
14
19
|
from alita_sdk.runtime.langchain.interfaces.llm_processor import get_embeddings
|
|
15
20
|
except ImportError:
|
|
@@ -249,7 +254,7 @@ ZephyrUpdateTestSteps = create_model(
|
|
|
249
254
|
)
|
|
250
255
|
|
|
251
256
|
|
|
252
|
-
class ZephyrScaleApiWrapper(
|
|
257
|
+
class ZephyrScaleApiWrapper(NonCodeIndexerToolkit):
|
|
253
258
|
# url for a Zephyr server
|
|
254
259
|
base_url: Optional[str] = ""
|
|
255
260
|
# auth with Jira token (cloud & server)
|
|
@@ -296,7 +301,7 @@ class ZephyrScaleApiWrapper(BaseVectorStoreToolApiWrapper):
|
|
|
296
301
|
# else:
|
|
297
302
|
# Cloud version is enabled for now
|
|
298
303
|
cls._api = ZephyrScale(token=values['token']).api
|
|
299
|
-
return values
|
|
304
|
+
return super().validate_toolkit(values)
|
|
300
305
|
|
|
301
306
|
def get_tests(self, project_key: str = None, folder_id: str = None, maxResults: Optional[int] = 10, startAt: Optional[int] = 0):
|
|
302
307
|
"""Retrieves all test cases. Query parameters can be used to filter the results.
|
|
@@ -1193,6 +1198,7 @@ class ZephyrScaleApiWrapper(BaseVectorStoreToolApiWrapper):
|
|
|
1193
1198
|
Returns a list of fields for index_data args schema.
|
|
1194
1199
|
"""
|
|
1195
1200
|
return {
|
|
1201
|
+
"chunking_tool": (Literal['json', ''], Field(description="Name of chunking tool", default='json')),
|
|
1196
1202
|
"project_key": (str, Field(description="Jira project key filter")),
|
|
1197
1203
|
"jql":(str, Field(description="""JQL-like query for searching test cases.
|
|
1198
1204
|
Supported fields:
|
|
@@ -1210,10 +1216,11 @@ class ZephyrScaleApiWrapper(BaseVectorStoreToolApiWrapper):
|
|
|
1210
1216
|
|
|
1211
1217
|
Example:
|
|
1212
1218
|
'folder = "Authentication" AND label in ("Smoke", "Critical") AND text ~ "login" AND orderBy = "name" AND orderDirection = "ASC"'
|
|
1213
|
-
"""))
|
|
1219
|
+
""")),
|
|
1214
1220
|
}
|
|
1215
1221
|
|
|
1216
1222
|
def _base_loader(self, project_key: str, jql: str, **kwargs) -> Generator[Document, None, None]:
|
|
1223
|
+
self._chunking_tool = kwargs.get('chunking_tool', None)
|
|
1217
1224
|
for test_case_doc in self._get_test_cases_docs(project_key, jql):
|
|
1218
1225
|
yield test_case_doc
|
|
1219
1226
|
for folder_doc in self._get_folders_docs(project_key):
|
|
@@ -1250,8 +1257,8 @@ class ZephyrScaleApiWrapper(BaseVectorStoreToolApiWrapper):
|
|
|
1250
1257
|
for key, value in folder.items():
|
|
1251
1258
|
if value is not None:
|
|
1252
1259
|
metadata[key] = value
|
|
1253
|
-
|
|
1254
|
-
yield Document(page_content=
|
|
1260
|
+
metadata['type'] = "FOLDER"
|
|
1261
|
+
yield Document(page_content="", metadata=metadata)
|
|
1255
1262
|
|
|
1256
1263
|
def _get_test_cases_docs(self, project_key: str, jql: str) -> Generator[Document, None, None]:
|
|
1257
1264
|
try:
|
|
@@ -1269,31 +1276,32 @@ class ZephyrScaleApiWrapper(BaseVectorStoreToolApiWrapper):
|
|
|
1269
1276
|
metadata['updated_on'] = last_version['createdOn']
|
|
1270
1277
|
else:
|
|
1271
1278
|
metadata['updated_on'] = case['createdOn']
|
|
1279
|
+
metadata['type'] = "TEST_CASE"
|
|
1272
1280
|
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
yield Document(page_content=json.dumps(case), metadata=metadata)
|
|
1276
|
-
|
|
1277
|
-
def _process_document(self, document: Document) -> Generator[Document, None, None]:
|
|
1278
|
-
try:
|
|
1279
|
-
base_data = json.loads(document.page_content)
|
|
1280
|
-
|
|
1281
|
-
if base_data['type'] and base_data['type'] == "TEST_CASE":
|
|
1282
|
-
additional_content = self._process_test_case(base_data)
|
|
1283
|
-
base_data['test_case_content'] = additional_content
|
|
1281
|
+
yield Document(page_content="", metadata=metadata)
|
|
1284
1282
|
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1283
|
+
def _extend_data(self, documents: Generator[Document, None, None]) -> Generator[Document, None, None]:
|
|
1284
|
+
for document in documents:
|
|
1285
|
+
try:
|
|
1286
|
+
if 'type' in document.metadata and document.metadata['type'] == "TEST_CASE":
|
|
1287
|
+
additional_content = self._process_test_case(document.metadata['key'])
|
|
1288
|
+
for steps_type, content in additional_content.items():
|
|
1289
|
+
if content:
|
|
1290
|
+
page_content = json.dumps(content)
|
|
1291
|
+
document.metadata[IndexerKeywords.CONTENT_IN_BYTES.value] = page_content.encode('utf-8')
|
|
1292
|
+
document.metadata["steps_type"] = steps_type
|
|
1293
|
+
except Exception as e:
|
|
1294
|
+
logging.error(f"Failed to process document: {e}")
|
|
1295
|
+
yield document
|
|
1296
|
+
|
|
1297
|
+
def _process_test_case(self, key):
|
|
1298
|
+
steps = self.get_test_steps(key, return_list=True)
|
|
1299
|
+
if steps and not isinstance(steps, ToolException):
|
|
1300
|
+
return {"steps": steps}
|
|
1301
|
+
script = self.get_test_script(key, return_only_script=True)
|
|
1302
|
+
if script and not isinstance(script, ToolException):
|
|
1303
|
+
return {"script": script}
|
|
1304
|
+
return {"empty": ""}
|
|
1297
1305
|
|
|
1298
1306
|
def get_tests_recursive(self, project_key: str = None, folder_id: str = None, maxResults: Optional[int] = 100, startAt: Optional[int] = 0):
|
|
1299
1307
|
"""Retrieves all test cases recursively from a folder and all its subfolders.
|
|
@@ -1552,7 +1560,7 @@ class ZephyrScaleApiWrapper(BaseVectorStoreToolApiWrapper):
|
|
|
1552
1560
|
except Exception as e:
|
|
1553
1561
|
return ToolException(f"Error updating test steps for test case {test_case_key}: {str(e)}")
|
|
1554
1562
|
|
|
1555
|
-
@
|
|
1563
|
+
@extend_with_parent_available_tools
|
|
1556
1564
|
def get_available_tools(self):
|
|
1557
1565
|
return [
|
|
1558
1566
|
{
|
|
@@ -5,7 +5,9 @@ from pydantic import create_model, BaseModel, Field, SecretStr
|
|
|
5
5
|
|
|
6
6
|
from .api_wrapper import ZephyrSquadApiWrapper
|
|
7
7
|
from ..base.tool import BaseAction
|
|
8
|
-
from ..
|
|
8
|
+
from ..elitea_base import filter_missconfigured_index_tools
|
|
9
|
+
from ..utils import clean_string, get_max_toolkit_length
|
|
10
|
+
from ...runtime.utils.constants import TOOLKIT_NAME_META, TOOL_NAME_META, TOOLKIT_TYPE_META
|
|
9
11
|
|
|
10
12
|
name = "zephyr_squad"
|
|
11
13
|
|
|
@@ -20,12 +22,10 @@ def get_tools(tool):
|
|
|
20
22
|
|
|
21
23
|
class ZephyrSquadToolkit(BaseToolkit):
|
|
22
24
|
tools: List[BaseTool] = []
|
|
23
|
-
toolkit_max_length: int = 0
|
|
24
25
|
|
|
25
26
|
@staticmethod
|
|
26
27
|
def toolkit_config_schema() -> BaseModel:
|
|
27
28
|
selected_tools = {x['name']: x['args_schema'].schema() for x in ZephyrSquadApiWrapper.model_construct().get_available_tools()}
|
|
28
|
-
ZephyrSquadToolkit.toolkit_max_length = get_max_toolkit_length(selected_tools)
|
|
29
29
|
return create_model(
|
|
30
30
|
name,
|
|
31
31
|
account_id=(str, Field(description="AccountID for the user that is going to be authenticating")),
|
|
@@ -39,20 +39,25 @@ class ZephyrSquadToolkit(BaseToolkit):
|
|
|
39
39
|
)
|
|
40
40
|
|
|
41
41
|
@classmethod
|
|
42
|
+
@filter_missconfigured_index_tools
|
|
42
43
|
def get_toolkit(cls, selected_tools: list[str] | None = None, toolkit_name: Optional[str] = None, **kwargs):
|
|
43
44
|
zephyr_api_wrapper = ZephyrSquadApiWrapper(**kwargs)
|
|
44
|
-
prefix = clean_string(toolkit_name, cls.toolkit_max_length) + TOOLKIT_SPLITTER if toolkit_name else ''
|
|
45
45
|
available_tools = zephyr_api_wrapper.get_available_tools()
|
|
46
46
|
tools = []
|
|
47
47
|
for tool in available_tools:
|
|
48
48
|
if selected_tools:
|
|
49
49
|
if tool["name"] not in selected_tools:
|
|
50
50
|
continue
|
|
51
|
+
description = tool["description"]
|
|
52
|
+
if toolkit_name:
|
|
53
|
+
description = f"Toolkit: {toolkit_name}\n{description}"
|
|
54
|
+
description = description[:1000]
|
|
51
55
|
tools.append(BaseAction(
|
|
52
56
|
api_wrapper=zephyr_api_wrapper,
|
|
53
|
-
name=
|
|
54
|
-
description=
|
|
55
|
-
args_schema=tool["args_schema"]
|
|
57
|
+
name=tool["name"],
|
|
58
|
+
description=description,
|
|
59
|
+
args_schema=tool["args_schema"],
|
|
60
|
+
metadata={TOOLKIT_NAME_META: toolkit_name, TOOLKIT_TYPE_META: name, TOOL_NAME_META: tool["name"]} if toolkit_name else {TOOL_NAME_META: tool["name"]}
|
|
56
61
|
))
|
|
57
62
|
return cls(tools=tools)
|
|
58
63
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: alita_sdk
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.584
|
|
4
4
|
Summary: SDK for building langchain agents using resources from Alita
|
|
5
|
-
Author-email: Artem Rozumenko <artyom.rozumenko@gmail.com>, Mikalai Biazruchka <mikalai_biazruchka@epam.com>, Roman Mitusov <roman_mitusov@epam.com>, Ivan Krakhmaliuk <
|
|
5
|
+
Author-email: Artem Rozumenko <artyom.rozumenko@gmail.com>, Mikalai Biazruchka <mikalai_biazruchka@epam.com>, Roman Mitusov <roman_mitusov@epam.com>, Ivan Krakhmaliuk <lifedj27@gmail.com>, Artem Dubrovskiy <ad13box@gmail.com>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
7
7
|
Project-URL: Homepage, https://projectalita.ai
|
|
8
8
|
Project-URL: Issues, https://github.com/ProjectAlita/alita-sdk/issues
|
|
@@ -18,67 +18,72 @@ Requires-Dist: python-dotenv~=1.0.1
|
|
|
18
18
|
Requires-Dist: jinja2~=3.1.3
|
|
19
19
|
Requires-Dist: pillow~=11.1.0
|
|
20
20
|
Requires-Dist: requests~=2.3
|
|
21
|
-
Requires-Dist: pydantic~=2.
|
|
21
|
+
Requires-Dist: pydantic~=2.12.0
|
|
22
22
|
Requires-Dist: chardet==5.2.0
|
|
23
23
|
Requires-Dist: fastapi==0.115.9
|
|
24
24
|
Requires-Dist: httpcore==1.0.7
|
|
25
25
|
Requires-Dist: urllib3>=2
|
|
26
26
|
Requires-Dist: certifi==2024.8.30
|
|
27
|
+
Requires-Dist: aiohttp>=3.9.0
|
|
27
28
|
Provides-Extra: runtime
|
|
28
|
-
Requires-Dist:
|
|
29
|
-
Requires-Dist:
|
|
30
|
-
Requires-Dist:
|
|
31
|
-
Requires-Dist:
|
|
29
|
+
Requires-Dist: streamlit>=1.28.0; extra == "runtime"
|
|
30
|
+
Requires-Dist: langchain_core<0.4.0,>=0.3.76; extra == "runtime"
|
|
31
|
+
Requires-Dist: langchain<0.4.0,>=0.3.22; extra == "runtime"
|
|
32
|
+
Requires-Dist: langchain_community<0.4.0,>=0.3.7; extra == "runtime"
|
|
33
|
+
Requires-Dist: langchain-openai<0.4.0,>=0.3.0; extra == "runtime"
|
|
34
|
+
Requires-Dist: langchain-anthropic<0.4.0,>=0.3.20; extra == "runtime"
|
|
35
|
+
Requires-Dist: anthropic>=0.57.0; extra == "runtime"
|
|
36
|
+
Requires-Dist: langgraph<0.5,>=0.4.8; extra == "runtime"
|
|
37
|
+
Requires-Dist: langgraph-prebuilt==0.5.2; extra == "runtime"
|
|
32
38
|
Requires-Dist: langgraph-checkpoint-sqlite~=2.0.0; extra == "runtime"
|
|
33
39
|
Requires-Dist: langgraph-checkpoint-postgres==2.0.21; extra == "runtime"
|
|
34
40
|
Requires-Dist: langsmith>=0.3.45; extra == "runtime"
|
|
35
|
-
Requires-Dist:
|
|
36
|
-
Requires-Dist:
|
|
41
|
+
Requires-Dist: langchain_chroma<0.3.0,>=0.2.2; extra == "runtime"
|
|
42
|
+
Requires-Dist: chromadb==0.5.20; extra == "runtime"
|
|
43
|
+
Requires-Dist: pgvector==0.2.5; extra == "runtime"
|
|
37
44
|
Requires-Dist: langchain-unstructured~=0.1.6; extra == "runtime"
|
|
38
45
|
Requires-Dist: langchain-postgres~=0.0.13; extra == "runtime"
|
|
39
|
-
Requires-Dist: keybert==0.8.3; extra == "runtime"
|
|
40
|
-
Requires-Dist: charset_normalizer==3.3.2; extra == "runtime"
|
|
41
46
|
Requires-Dist: unstructured[local-inference]==0.16.23; extra == "runtime"
|
|
42
47
|
Requires-Dist: unstructured_pytesseract==0.3.13; extra == "runtime"
|
|
43
48
|
Requires-Dist: unstructured_inference==0.8.7; extra == "runtime"
|
|
44
49
|
Requires-Dist: python-pptx==1.0.2; extra == "runtime"
|
|
45
|
-
Requires-Dist: pdf2image==1.16.3; extra == "runtime"
|
|
46
|
-
Requires-Dist: pikepdf==8.7.1; extra == "runtime"
|
|
47
|
-
Requires-Dist: pypdf==4.3.1; extra == "runtime"
|
|
48
|
-
Requires-Dist: pdfminer.six==20240706; extra == "runtime"
|
|
49
|
-
Requires-Dist: opencv-python==4.11.0.86; extra == "runtime"
|
|
50
50
|
Requires-Dist: python-docx==1.1.2; extra == "runtime"
|
|
51
51
|
Requires-Dist: openpyxl==3.1.2; extra == "runtime"
|
|
52
|
-
Requires-Dist:
|
|
53
|
-
Requires-Dist:
|
|
54
|
-
Requires-Dist:
|
|
55
|
-
Requires-Dist:
|
|
56
|
-
Requires-Dist:
|
|
57
|
-
Requires-Dist:
|
|
58
|
-
Requires-Dist: pytesseract==0.3.13; extra == "runtime"
|
|
52
|
+
Requires-Dist: pypdf==4.3.1; extra == "runtime"
|
|
53
|
+
Requires-Dist: pdfminer.six==20240706; extra == "runtime"
|
|
54
|
+
Requires-Dist: pdf2image==1.16.3; extra == "runtime"
|
|
55
|
+
Requires-Dist: pikepdf==8.7.1; extra == "runtime"
|
|
56
|
+
Requires-Dist: docx2txt==0.8; extra == "runtime"
|
|
57
|
+
Requires-Dist: mammoth==1.9.0; extra == "runtime"
|
|
59
58
|
Requires-Dist: reportlab==4.2.5; extra == "runtime"
|
|
60
59
|
Requires-Dist: svglib==1.5.1; extra == "runtime"
|
|
61
|
-
Requires-Dist: rlpycairo==0.3.0; extra == "runtime"
|
|
62
60
|
Requires-Dist: cairocffi==1.7.1; extra == "runtime"
|
|
63
|
-
Requires-Dist:
|
|
64
|
-
Requires-Dist:
|
|
65
|
-
Requires-Dist: opentelemetry-exporter-otlp-proto-grpc==1.25.0; extra == "runtime"
|
|
66
|
-
Requires-Dist: opentelemetry_api==1.25.0; extra == "runtime"
|
|
67
|
-
Requires-Dist: opentelemetry_instrumentation==0.46b0; extra == "runtime"
|
|
68
|
-
Requires-Dist: grpcio_status==1.63.0rc1; extra == "runtime"
|
|
69
|
-
Requires-Dist: protobuf==4.25.7; extra == "runtime"
|
|
61
|
+
Requires-Dist: rlpycairo==0.3.0; extra == "runtime"
|
|
62
|
+
Requires-Dist: keybert==0.8.3; extra == "runtime"
|
|
70
63
|
Requires-Dist: sentence-transformers==2.7.0; extra == "runtime"
|
|
64
|
+
Requires-Dist: gensim==4.3.3; extra == "runtime"
|
|
65
|
+
Requires-Dist: scipy==1.13.1; extra == "runtime"
|
|
66
|
+
Requires-Dist: opencv-python==4.11.0.86; extra == "runtime"
|
|
67
|
+
Requires-Dist: pytesseract==0.3.13; extra == "runtime"
|
|
68
|
+
Requires-Dist: markdown==3.5.1; extra == "runtime"
|
|
69
|
+
Requires-Dist: beautifulsoup4==4.12.2; extra == "runtime"
|
|
70
|
+
Requires-Dist: charset_normalizer==3.3.2; extra == "runtime"
|
|
71
|
+
Requires-Dist: opentelemetry-exporter-otlp-proto-grpc>=1.25.0; extra == "runtime"
|
|
72
|
+
Requires-Dist: opentelemetry_api>=1.25.0; extra == "runtime"
|
|
73
|
+
Requires-Dist: opentelemetry_instrumentation>=0.46b0; extra == "runtime"
|
|
74
|
+
Requires-Dist: grpcio_status>=1.63.0rc1; extra == "runtime"
|
|
75
|
+
Requires-Dist: protobuf>=4.25.7; extra == "runtime"
|
|
76
|
+
Requires-Dist: langchain-sandbox>=0.0.6; extra == "runtime"
|
|
71
77
|
Provides-Extra: tools
|
|
72
78
|
Requires-Dist: dulwich==0.21.6; extra == "tools"
|
|
73
79
|
Requires-Dist: paramiko==3.3.1; extra == "tools"
|
|
74
80
|
Requires-Dist: pygithub==2.3.0; extra == "tools"
|
|
75
81
|
Requires-Dist: python-gitlab==4.5.0; extra == "tools"
|
|
76
82
|
Requires-Dist: gitpython==3.1.43; extra == "tools"
|
|
77
|
-
Requires-Dist: atlassian-python-api~=
|
|
78
|
-
Requires-Dist: atlassian_python_api==3.41.16; extra == "tools"
|
|
83
|
+
Requires-Dist: atlassian-python-api~=4.0.7; extra == "tools"
|
|
79
84
|
Requires-Dist: jira==3.8.0; extra == "tools"
|
|
80
85
|
Requires-Dist: qtest-swagger-client==0.0.3; extra == "tools"
|
|
81
|
-
Requires-Dist: testrail-api==1.13.
|
|
86
|
+
Requires-Dist: testrail-api==1.13.4; extra == "tools"
|
|
82
87
|
Requires-Dist: azure-devops==7.1.0b4; extra == "tools"
|
|
83
88
|
Requires-Dist: msrest==0.7.1; extra == "tools"
|
|
84
89
|
Requires-Dist: python-graphql-client~=0.4.3; extra == "tools"
|
|
@@ -97,8 +102,6 @@ Requires-Dist: azure-search-documents==11.5.2; extra == "tools"
|
|
|
97
102
|
Requires-Dist: PyMySQL==1.1.1; extra == "tools"
|
|
98
103
|
Requires-Dist: psycopg2-binary==2.9.10; extra == "tools"
|
|
99
104
|
Requires-Dist: Office365-REST-Python-Client==2.5.14; extra == "tools"
|
|
100
|
-
Requires-Dist: python-docx==1.1.2; extra == "tools"
|
|
101
|
-
Requires-Dist: python-pptx==1.0.2; extra == "tools"
|
|
102
105
|
Requires-Dist: pypdf2~=3.0.1; extra == "tools"
|
|
103
106
|
Requires-Dist: FigmaPy==2018.1.0; extra == "tools"
|
|
104
107
|
Requires-Dist: pandas==2.2.3; extra == "tools"
|
|
@@ -115,7 +118,6 @@ Requires-Dist: playwright>=1.52.0; extra == "tools"
|
|
|
115
118
|
Requires-Dist: google-api-python-client==2.154.0; extra == "tools"
|
|
116
119
|
Requires-Dist: wikipedia==1.4.0; extra == "tools"
|
|
117
120
|
Requires-Dist: lxml==5.2.2; extra == "tools"
|
|
118
|
-
Requires-Dist: beautifulsoup4; extra == "tools"
|
|
119
121
|
Requires-Dist: pymupdf==1.24.9; extra == "tools"
|
|
120
122
|
Requires-Dist: googlemaps==4.10.0; extra == "tools"
|
|
121
123
|
Requires-Dist: yagmail==0.15.293; extra == "tools"
|
|
@@ -127,10 +129,12 @@ Requires-Dist: textract-py3==2.1.1; extra == "tools"
|
|
|
127
129
|
Requires-Dist: slack_sdk==3.35.0; extra == "tools"
|
|
128
130
|
Requires-Dist: deltalake==1.0.2; extra == "tools"
|
|
129
131
|
Requires-Dist: google_cloud_bigquery==3.34.0; extra == "tools"
|
|
132
|
+
Requires-Dist: python-calamine==0.5.3; extra == "tools"
|
|
130
133
|
Provides-Extra: community
|
|
131
134
|
Requires-Dist: retry-extended==0.2.3; extra == "community"
|
|
132
135
|
Requires-Dist: pyobjtojson==0.3; extra == "community"
|
|
133
136
|
Requires-Dist: elitea-analyse==0.1.2; extra == "community"
|
|
137
|
+
Requires-Dist: networkx>=3.0; extra == "community"
|
|
134
138
|
Provides-Extra: all
|
|
135
139
|
Requires-Dist: alita-sdk[runtime]; extra == "all"
|
|
136
140
|
Requires-Dist: alita-sdk[tools]; extra == "all"
|
|
@@ -141,6 +145,11 @@ Requires-Dist: pytest-cov; extra == "dev"
|
|
|
141
145
|
Requires-Dist: black; extra == "dev"
|
|
142
146
|
Requires-Dist: flake8; extra == "dev"
|
|
143
147
|
Requires-Dist: mypy; extra == "dev"
|
|
148
|
+
Provides-Extra: cli
|
|
149
|
+
Requires-Dist: click>=8.1.0; extra == "cli"
|
|
150
|
+
Requires-Dist: rich>=13.0.0; extra == "cli"
|
|
151
|
+
Requires-Dist: pyyaml>=6.0; extra == "cli"
|
|
152
|
+
Requires-Dist: langchain-mcp-adapters; extra == "cli"
|
|
144
153
|
Dynamic: license-file
|
|
145
154
|
|
|
146
155
|
Alita SDK
|
|
@@ -198,6 +207,144 @@ PROJECT_ID=<your_project_id>
|
|
|
198
207
|
NOTE: these variables can be grabbed from your Elitea platform configuration page.
|
|
199
208
|

|
|
200
209
|
|
|
210
|
+
### Custom .env File Location
|
|
211
|
+
|
|
212
|
+
By default, the CLI looks for `.env` files in the following order:
|
|
213
|
+
1. `.alita/.env` (recommended)
|
|
214
|
+
2. `.env` in the current directory
|
|
215
|
+
|
|
216
|
+
You can override this by setting the `ALITA_ENV_FILE` environment variable:
|
|
217
|
+
|
|
218
|
+
```bash
|
|
219
|
+
export ALITA_ENV_FILE=/path/to/your/.env
|
|
220
|
+
alita-cli agent chat
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
Using the CLI for Interactive Chat
|
|
224
|
+
----------------------------------
|
|
225
|
+
|
|
226
|
+
The Alita SDK includes a powerful CLI for interactive agent chat sessions.
|
|
227
|
+
|
|
228
|
+
### Starting a Chat Session
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
# Interactive selection (shows all available agents + direct chat option)
|
|
232
|
+
alita-cli agent chat
|
|
233
|
+
|
|
234
|
+
# Chat with a specific local agent
|
|
235
|
+
alita-cli agent chat .alita/agents/my-agent.agent.md
|
|
236
|
+
|
|
237
|
+
# Chat with a platform agent
|
|
238
|
+
alita-cli agent chat my-agent-name
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
### Direct Chat Mode (No Agent)
|
|
242
|
+
|
|
243
|
+
You can start a chat session directly with the LLM without any agent configuration:
|
|
244
|
+
|
|
245
|
+
```bash
|
|
246
|
+
alita-cli agent chat
|
|
247
|
+
# Select option 1: "Direct chat with model (no agent)"
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
This is useful for quick interactions or testing without setting up an agent.
|
|
251
|
+
|
|
252
|
+
### Chat Commands
|
|
253
|
+
|
|
254
|
+
During a chat session, you can use the following commands:
|
|
255
|
+
|
|
256
|
+
| Command | Description |
|
|
257
|
+
|---------|-------------|
|
|
258
|
+
| `/help` | Show all available commands |
|
|
259
|
+
| `/model` | Switch to a different model (preserves chat history) |
|
|
260
|
+
| `/add_mcp` | Add an MCP server from your local mcp.json (preserves chat history) |
|
|
261
|
+
| `/add_toolkit` | Add a toolkit from $ALITA_DIR/tools (preserves chat history) |
|
|
262
|
+
| `/clear` | Clear conversation history |
|
|
263
|
+
| `/history` | Show conversation history |
|
|
264
|
+
| `/save` | Save conversation to file |
|
|
265
|
+
| `exit` | End conversation |
|
|
266
|
+
|
|
267
|
+
### Enhanced Input Features
|
|
268
|
+
|
|
269
|
+
The chat interface includes readline-based input enhancements:
|
|
270
|
+
|
|
271
|
+
| Feature | Key/Action |
|
|
272
|
+
|---------|------------|
|
|
273
|
+
| **Tab completion** | Press `Tab` to autocomplete commands (e.g., `/mo` → `/model`) |
|
|
274
|
+
| **Command history** | `↑` / `↓` arrows to navigate through previous messages |
|
|
275
|
+
| **Cursor movement** | `←` / `→` arrows to move within the current line |
|
|
276
|
+
| **Start of line** | `Ctrl+A` jumps to the beginning of the line |
|
|
277
|
+
| **End of line** | `Ctrl+E` jumps to the end of the line |
|
|
278
|
+
| **Delete word** | `Ctrl+W` deletes the word before cursor |
|
|
279
|
+
| **Clear line** | `Ctrl+U` clears from cursor to beginning of line |
|
|
280
|
+
|
|
281
|
+
### Dynamic Model Switching
|
|
282
|
+
|
|
283
|
+
Use `/model` to switch models on the fly:
|
|
284
|
+
|
|
285
|
+
```
|
|
286
|
+
> /model
|
|
287
|
+
|
|
288
|
+
🔧 Select a model:
|
|
289
|
+
|
|
290
|
+
# Model Type
|
|
291
|
+
1 gpt-4o openai
|
|
292
|
+
2 gpt-4o-mini openai
|
|
293
|
+
3 claude-3-sonnet anthropic
|
|
294
|
+
|
|
295
|
+
Select model number: 1
|
|
296
|
+
|
|
297
|
+
✓ Selected: gpt-4o
|
|
298
|
+
╭──────────────────────────────────────────────────────────────╮
|
|
299
|
+
│ ℹ Model switched to gpt-4o. Agent state reset, chat history │
|
|
300
|
+
│ preserved. │
|
|
301
|
+
╰──────────────────────────────────────────────────────────────╯
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
### Adding MCP Servers Dynamically
|
|
305
|
+
|
|
306
|
+
Use `/add_mcp` to add MCP servers during a chat session. Servers are loaded from your local `mcp.json` file (typically at `.alita/mcp.json`):
|
|
307
|
+
|
|
308
|
+
```
|
|
309
|
+
> /add_mcp
|
|
310
|
+
|
|
311
|
+
🔌 Select an MCP server to add:
|
|
312
|
+
|
|
313
|
+
# Server Type Command/URL
|
|
314
|
+
1 playwright stdio npx @playwright/mcp@latest
|
|
315
|
+
2 filesystem stdio npx @anthropic/mcp-fs
|
|
316
|
+
|
|
317
|
+
Select MCP server number: 1
|
|
318
|
+
|
|
319
|
+
✓ Selected: playwright
|
|
320
|
+
╭──────────────────────────────────────────────────────────────╮
|
|
321
|
+
│ ℹ Added MCP: playwright. Agent state reset, chat history │
|
|
322
|
+
│ preserved. │
|
|
323
|
+
╰──────────────────────────────────────────────────────────────╯
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
### Adding Toolkits Dynamically
|
|
327
|
+
|
|
328
|
+
Use `/add_toolkit` to add toolkits from your `$ALITA_DIR/tools` directory (default: `.alita/tools`):
|
|
329
|
+
|
|
330
|
+
```
|
|
331
|
+
> /add_toolkit
|
|
332
|
+
|
|
333
|
+
🧰 Select a toolkit to add:
|
|
334
|
+
|
|
335
|
+
# Toolkit Type File
|
|
336
|
+
1 jira jira jira-config.json
|
|
337
|
+
2 github github github-config.json
|
|
338
|
+
|
|
339
|
+
Select toolkit number: 1
|
|
340
|
+
|
|
341
|
+
✓ Selected: jira
|
|
342
|
+
╭──────────────────────────────────────────────────────────────╮
|
|
343
|
+
│ ℹ Added toolkit: jira. Agent state reset, chat history │
|
|
344
|
+
│ preserved. │
|
|
345
|
+
╰──────────────────────────────────────────────────────────────╯
|
|
346
|
+
```
|
|
347
|
+
|
|
201
348
|
|
|
202
349
|
|
|
203
350
|
Using SDK with Streamlit for Local Development
|