veadk-python 0.2.16__tar.gz → 0.2.17__tar.gz
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 veadk-python might be problematic. Click here for more details.
- {veadk_python-0.2.16 → veadk_python-0.2.17}/PKG-INFO +1 -1
- {veadk_python-0.2.16 → veadk_python-0.2.17}/pyproject.toml +1 -1
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/a2a/remote_ve_agent.py +56 -1
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/agent.py +79 -26
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/agents/loop_agent.py +22 -9
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/agents/parallel_agent.py +21 -9
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/agents/sequential_agent.py +18 -9
- veadk_python-0.2.17/veadk/auth/veauth/apmplus_veauth.py +58 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/auth/veauth/ark_veauth.py +3 -1
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/auth/veauth/utils.py +12 -0
- veadk_python-0.2.17/veadk/auth/veauth/viking_mem0_veauth.py +91 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/cli/cli.py +5 -1
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/cli/cli_create.py +62 -1
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/cli/cli_deploy.py +36 -1
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/cli/cli_eval.py +55 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/cli/cli_init.py +44 -3
- veadk_python-0.2.17/veadk/cli/cli_kb.py +110 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/cli/cli_pipeline.py +66 -1
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/cli/cli_prompt.py +16 -1
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/cli/cli_uploadevalset.py +15 -1
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/cli/cli_web.py +35 -4
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/cloud/cloud_agent_engine.py +142 -25
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/cloud/cloud_app.py +219 -12
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/configs/database_configs.py +4 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/configs/model_configs.py +5 -1
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/configs/tracing_configs.py +2 -2
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/evaluation/adk_evaluator/adk_evaluator.py +77 -17
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/evaluation/base_evaluator.py +219 -3
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/evaluation/deepeval_evaluator/deepeval_evaluator.py +116 -1
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/evaluation/eval_set_file_loader.py +20 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/evaluation/eval_set_recorder.py +54 -0
- veadk_python-0.2.17/veadk/evaluation/types.py +65 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/evaluation/utils/prometheus.py +61 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/knowledgebase/backends/base_backend.py +14 -1
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/knowledgebase/backends/in_memory_backend.py +10 -1
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/knowledgebase/backends/opensearch_backend.py +26 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/knowledgebase/backends/redis_backend.py +29 -2
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/knowledgebase/backends/vikingdb_knowledge_backend.py +43 -5
- veadk_python-0.2.17/veadk/knowledgebase/knowledgebase.py +307 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/memory/long_term_memory.py +148 -4
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/memory/long_term_memory_backends/mem0_backend.py +11 -0
- veadk_python-0.2.17/veadk/memory/short_term_memory.py +246 -0
- veadk_python-0.2.17/veadk/runner.py +813 -0
- veadk_python-0.2.17/veadk/tools/builtin_tools/llm_shield.py +381 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/tools/builtin_tools/mcp_router.py +9 -2
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/tools/builtin_tools/run_code.py +25 -5
- veadk_python-0.2.17/veadk/tools/builtin_tools/web_search.py +83 -0
- veadk_python-0.2.17/veadk/tracing/base_tracer.py +58 -0
- veadk_python-0.2.17/veadk/tracing/telemetry/attributes/extractors/common_attributes_extractors.py +180 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/tracing/telemetry/attributes/extractors/llm_attributes_extractors.py +260 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/tracing/telemetry/attributes/extractors/tool_attributes_extractors.py +69 -0
- veadk_python-0.2.17/veadk/tracing/telemetry/attributes/extractors/types.py +164 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/tracing/telemetry/exporters/apmplus_exporter.py +157 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/tracing/telemetry/exporters/base_exporter.py +8 -0
- veadk_python-0.2.17/veadk/tracing/telemetry/exporters/cozeloop_exporter.py +129 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/tracing/telemetry/exporters/inmemory_exporter.py +118 -1
- veadk_python-0.2.17/veadk/tracing/telemetry/exporters/tls_exporter.py +139 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/tracing/telemetry/opentelemetry_tracer.py +111 -1
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/tracing/telemetry/telemetry.py +118 -2
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/version.py +1 -1
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk_python.egg-info/PKG-INFO +1 -1
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk_python.egg-info/SOURCES.txt +2 -0
- veadk_python-0.2.16/veadk/auth/veauth/apmplus_veauth.py +0 -65
- veadk_python-0.2.16/veadk/cli/cli_kb.py +0 -75
- veadk_python-0.2.16/veadk/evaluation/types.py +0 -33
- veadk_python-0.2.16/veadk/knowledgebase/knowledgebase.py +0 -146
- veadk_python-0.2.16/veadk/memory/short_term_memory.py +0 -132
- veadk_python-0.2.16/veadk/runner.py +0 -402
- veadk_python-0.2.16/veadk/tools/builtin_tools/web_search.py +0 -199
- veadk_python-0.2.16/veadk/tracing/base_tracer.py +0 -31
- veadk_python-0.2.16/veadk/tracing/telemetry/attributes/extractors/common_attributes_extractors.py +0 -76
- veadk_python-0.2.16/veadk/tracing/telemetry/attributes/extractors/types.py +0 -86
- veadk_python-0.2.16/veadk/tracing/telemetry/exporters/cozeloop_exporter.py +0 -70
- veadk_python-0.2.16/veadk/tracing/telemetry/exporters/tls_exporter.py +0 -73
- {veadk_python-0.2.16 → veadk_python-0.2.17}/LICENSE +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/README.md +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/setup.cfg +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/tests/test_agent.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/tests/test_cloud.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/tests/test_evaluator.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/tests/test_knowledgebase.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/tests/test_long_term_memory.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/tests/test_multiple_agents.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/tests/test_runner.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/tests/test_runtime_data_collecting.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/tests/test_short_term_memory.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/tests/test_tracing.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/__init__.py +0 -0
- {veadk_python-0.2.16/veadk/utils → veadk_python-0.2.17/veadk/a2a}/__init__.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/a2a/agent_card.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/a2a/ve_a2a_server.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/a2a/ve_agent_executor.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/a2a/ve_task_store.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/agent_builder.py +0 -0
- {veadk_python-0.2.16/veadk/tracing/telemetry/exporters → veadk_python-0.2.17/veadk/auth}/__init__.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/auth/base_auth.py +0 -0
- {veadk_python-0.2.16/veadk/tracing/telemetry → veadk_python-0.2.17/veadk/auth/veauth}/__init__.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/auth/veauth/base_veauth.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/auth/veauth/cozeloop_veauth.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/auth/veauth/opensearch_veauth.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/auth/veauth/postgresql_veauth.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/auth/veauth/prompt_pilot_veauth.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/auth/veauth/vesearch_veauth.py +0 -0
- {veadk_python-0.2.16/veadk/tracing → veadk_python-0.2.17/veadk/cli}/__init__.py +0 -0
- {veadk_python-0.2.16/veadk/tools/sandbox → veadk_python-0.2.17/veadk/cloud}/__init__.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/config.py +0 -0
- {veadk_python-0.2.16/veadk/tools/builtin_tools → veadk_python-0.2.17/veadk/configs}/__init__.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/configs/tool_configs.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/consts.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/evaluation/__init__.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/evaluation/adk_evaluator/__init__.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/evaluation/deepeval_evaluator/__init__.py +0 -0
- {veadk_python-0.2.16/veadk/tools → veadk_python-0.2.17/veadk/integrations}/__init__.py +0 -0
- {veadk_python-0.2.16/veadk/prompts → veadk_python-0.2.17/veadk/integrations/ve_apig}/__init__.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/integrations/ve_apig/ve_apig.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/integrations/ve_apig/ve_apig_utils.py +0 -0
- {veadk_python-0.2.16/veadk/memory/short_term_memory_backends → veadk_python-0.2.17/veadk/integrations/ve_code_pipeline}/__init__.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/integrations/ve_code_pipeline/ve_code_pipeline.py +0 -0
- {veadk_python-0.2.16/veadk/memory/long_term_memory_backends → veadk_python-0.2.17/veadk/integrations/ve_cozeloop}/__init__.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/integrations/ve_cozeloop/ve_cozeloop.py +0 -0
- {veadk_python-0.2.16/veadk/knowledgebase/backends → veadk_python-0.2.17/veadk/integrations/ve_cr}/__init__.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/integrations/ve_cr/ve_cr.py +0 -0
- {veadk_python-0.2.16/veadk/integrations/ve_viking_db_memory → veadk_python-0.2.17/veadk/integrations/ve_faas}/__init__.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/integrations/ve_faas/template/cookiecutter.json +0 -0
- {veadk_python-0.2.16/veadk/integrations/ve_tls → veadk_python-0.2.17/veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}}/__init__.py +0 -0
- {veadk_python-0.2.16/veadk/integrations/ve_faas/web_template → veadk_python-0.2.17/veadk/integrations/ve_faas/template}/{{cookiecutter.local_dir_name}}/clean.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/config.yaml.example +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/deploy.py +0 -0
- {veadk_python-0.2.16/veadk/integrations/ve_prompt_pilot → veadk_python-0.2.17/veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/src}/__init__.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/src/agent.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/src/app.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/src/requirements.txt +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/src/run.sh +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/src/{{ cookiecutter.app_name }}/__init__.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/src/{{ cookiecutter.app_name }}/agent.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/integrations/ve_faas/ve_faas.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/integrations/ve_faas/ve_faas_utils.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/integrations/ve_faas/web_template/cookiecutter.json +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/__init__.py +0 -0
- {veadk_python-0.2.16/veadk/integrations/ve_faas/template → veadk_python-0.2.17/veadk/integrations/ve_faas/web_template}/{{cookiecutter.local_dir_name}}/clean.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/config.yaml.example +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/deploy.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/src/Dockerfile +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/src/app.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/src/init_db.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/src/models.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/src/requirements.txt +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/src/run.sh +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/src/static/css/style.css +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/src/static/js/admin.js +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/src/templates/admin/dashboard.html +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/src/templates/admin/edit_post.html +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/src/templates/admin/login.html +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/src/templates/admin/posts.html +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/src/templates/base.html +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/src/templates/index.html +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/src/templates/post.html +0 -0
- {veadk_python-0.2.16/veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/src → veadk_python-0.2.17/veadk/integrations/ve_prompt_pilot}/__init__.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/integrations/ve_prompt_pilot/ve_prompt_pilot.py +0 -0
- {veadk_python-0.2.16/veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}} → veadk_python-0.2.17/veadk/integrations/ve_tls}/__init__.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/integrations/ve_tls/utils.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/integrations/ve_tls/ve_tls.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/integrations/ve_tos/ve_tos.py +0 -0
- {veadk_python-0.2.16/veadk/integrations/ve_faas → veadk_python-0.2.17/veadk/integrations/ve_viking_db_memory}/__init__.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/integrations/ve_viking_db_memory/ve_viking_db_memory.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/knowledgebase/__init__.py +0 -0
- {veadk_python-0.2.16/veadk/integrations/ve_cr → veadk_python-0.2.17/veadk/knowledgebase/backends}/__init__.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/knowledgebase/backends/utils.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/knowledgebase/entry.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/memory/__init__.py +0 -0
- {veadk_python-0.2.16/veadk/integrations/ve_cozeloop → veadk_python-0.2.17/veadk/memory/long_term_memory_backends}/__init__.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/memory/long_term_memory_backends/base_backend.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/memory/long_term_memory_backends/in_memory_backend.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/memory/long_term_memory_backends/opensearch_backend.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/memory/long_term_memory_backends/redis_backend.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/memory/long_term_memory_backends/vikingdb_memory_backend.py +0 -0
- {veadk_python-0.2.16/veadk/integrations/ve_code_pipeline → veadk_python-0.2.17/veadk/memory/short_term_memory_backends}/__init__.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/memory/short_term_memory_backends/base_backend.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/memory/short_term_memory_backends/mysql_backend.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/memory/short_term_memory_backends/postgresql_backend.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/memory/short_term_memory_backends/sqlite_backend.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/memory/short_term_memory_processor.py +0 -0
- {veadk_python-0.2.16/veadk/integrations/ve_apig → veadk_python-0.2.17/veadk/prompts}/__init__.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/prompts/agent_default_prompt.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/prompts/prompt_evaluator.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/prompts/prompt_memory_processor.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/prompts/prompt_optimization.py +0 -0
- {veadk_python-0.2.16/veadk/integrations → veadk_python-0.2.17/veadk/tools}/__init__.py +0 -0
- {veadk_python-0.2.16/veadk/configs → veadk_python-0.2.17/veadk/tools/builtin_tools}/__init__.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/tools/builtin_tools/generate_image.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/tools/builtin_tools/image_edit.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/tools/builtin_tools/image_generate.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/tools/builtin_tools/lark.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/tools/builtin_tools/las.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/tools/builtin_tools/load_knowledgebase.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/tools/builtin_tools/vesearch.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/tools/builtin_tools/video_generate.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/tools/builtin_tools/web_scraper.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/tools/demo_tools.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/tools/load_knowledgebase_tool.py +0 -0
- {veadk_python-0.2.16/veadk/cloud → veadk_python-0.2.17/veadk/tools/sandbox}/__init__.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/tools/sandbox/browser_sandbox.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/tools/sandbox/code_sandbox.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/tools/sandbox/computer_sandbox.py +0 -0
- {veadk_python-0.2.16/veadk/cli → veadk_python-0.2.17/veadk/tracing}/__init__.py +0 -0
- {veadk_python-0.2.16/veadk/auth/veauth → veadk_python-0.2.17/veadk/tracing/telemetry}/__init__.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/tracing/telemetry/attributes/attributes.py +0 -0
- {veadk_python-0.2.16/veadk/auth → veadk_python-0.2.17/veadk/tracing/telemetry/exporters}/__init__.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/types.py +0 -0
- {veadk_python-0.2.16/veadk/a2a → veadk_python-0.2.17/veadk/utils}/__init__.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/utils/logger.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/utils/mcp_utils.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/utils/misc.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/utils/patches.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk/utils/volcengine_sign.py +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk_python.egg-info/dependency_links.txt +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk_python.egg-info/entry_points.txt +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk_python.egg-info/requires.txt +0 -0
- {veadk_python-0.2.16 → veadk_python-0.2.17}/veadk_python.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: veadk-python
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.17
|
|
4
4
|
Summary: Volcengine agent development kit, integrations with Volcengine cloud services.
|
|
5
5
|
Author-email: Yaozheng Fang <fangyozheng@gmail.com>, Guodong Li <cu.eric.lee@gmail.com>, Zhi Han <sliverydayday@gmail.com>, Meng Wang <mengwangwm@gmail.com>
|
|
6
6
|
License: Apache License
|
|
@@ -34,7 +34,62 @@ def _convert_agent_card_dict_to_obj(agent_card_dict: dict) -> AgentCard:
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
class RemoteVeAgent(RemoteA2aAgent):
|
|
37
|
-
"""Connect to remote agent on VeFaaS platform.
|
|
37
|
+
"""Connect to a remote agent on the VeFaaS platform.
|
|
38
|
+
|
|
39
|
+
This class provides an interface to remotely connect with an agent deployed on the VeFaaS platform. It automatically fetches the agent card (metadata) and configures an HTTP client for secure communication. Authentication can be handled either via a bearer token in the HTTP header or via a query string parameter.
|
|
40
|
+
|
|
41
|
+
The class extends `RemoteA2aAgent` to provide compatibility with the A2A (Agent-to-Agent) communication layer.
|
|
42
|
+
|
|
43
|
+
This constructor connects to a remote VeFaaS agent endpoint, retrieves its metadata (`agent_card`), and sets up an asynchronous HTTP client (`httpx.AsyncClient`) for subsequent communication. Depending on the provided authentication parameters, it supports three connection modes:
|
|
44
|
+
- **No authentication:** Directly fetches the agent card.
|
|
45
|
+
- **Header authentication:** Sends a bearer token in the `Authorization` header.
|
|
46
|
+
- **Query string authentication:** Appends the token to the URL query.
|
|
47
|
+
|
|
48
|
+
Attributes:
|
|
49
|
+
name (str):
|
|
50
|
+
A unique name identifying this remote agent instance.
|
|
51
|
+
url (str):
|
|
52
|
+
The base URL of the remote agent on the VeFaaS platform.
|
|
53
|
+
auth_token (str | None):
|
|
54
|
+
Optional authentication token used for secure access.
|
|
55
|
+
If not provided, the agent will be accessed without authentication.
|
|
56
|
+
auth_method (Literal["header", "querystring"] | None):
|
|
57
|
+
The method of attaching the authentication token.
|
|
58
|
+
- `"header"`: Token is passed via HTTP `Authorization` header.
|
|
59
|
+
- `"querystring"`: Token is passed as a query parameter.
|
|
60
|
+
- `None`: No authentication used.
|
|
61
|
+
|
|
62
|
+
Raises:
|
|
63
|
+
ValueError:
|
|
64
|
+
If an unsupported `auth_method` is provided when `auth_token` is set.
|
|
65
|
+
requests.RequestException:
|
|
66
|
+
If fetching the agent card from the remote URL fails.
|
|
67
|
+
|
|
68
|
+
Examples:
|
|
69
|
+
```python
|
|
70
|
+
# Example 1: No authentication
|
|
71
|
+
agent = RemoteVeAgent(
|
|
72
|
+
name="public_agent",
|
|
73
|
+
url="https://vefaas.example.com/agents/public"
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
# Example 2: Using Bearer token in header
|
|
77
|
+
agent = RemoteVeAgent(
|
|
78
|
+
name="secured_agent",
|
|
79
|
+
url="https://vefaas.example.com/agents/secure",
|
|
80
|
+
auth_token="my_secret_token",
|
|
81
|
+
auth_method="header"
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
# Example 3: Using token in query string
|
|
85
|
+
agent = RemoteVeAgent(
|
|
86
|
+
name="query_agent",
|
|
87
|
+
url="https://vefaas.example.com/agents/query",
|
|
88
|
+
auth_token="my_secret_token",
|
|
89
|
+
auth_method="querystring"
|
|
90
|
+
)
|
|
91
|
+
```
|
|
92
|
+
"""
|
|
38
93
|
|
|
39
94
|
def __init__(
|
|
40
95
|
self,
|
|
@@ -47,55 +47,108 @@ logger = get_logger(__name__)
|
|
|
47
47
|
|
|
48
48
|
|
|
49
49
|
class Agent(LlmAgent):
|
|
50
|
-
"""LLM-based Agent with Volcengine capabilities.
|
|
50
|
+
"""LLM-based Agent with Volcengine capabilities.
|
|
51
|
+
|
|
52
|
+
This class represents an intelligent agent powered by LLMs (Large Language Models),
|
|
53
|
+
integrated with Volcengine's AI framework. It supports memory modules, sub-agents,
|
|
54
|
+
tracers, knowledge bases, and other advanced features for A2A (Agent-to-Agent)
|
|
55
|
+
or user-facing scenarios.
|
|
56
|
+
|
|
57
|
+
Attributes:
|
|
58
|
+
name (str): The name of the agent.
|
|
59
|
+
description (str): A description of the agent, useful in A2A scenarios.
|
|
60
|
+
instruction (Union[str, InstructionProvider]): The instruction or instruction provider.
|
|
61
|
+
model_name (str): Name of the model used by the agent.
|
|
62
|
+
model_provider (str): Provider of the model (e.g., openai).
|
|
63
|
+
model_api_base (str): The base URL of the model API.
|
|
64
|
+
model_api_key (str): The API key for accessing the model.
|
|
65
|
+
model_extra_config (dict): Extra configurations to include in model requests.
|
|
66
|
+
tools (list[ToolUnion]): Tools available to the agent.
|
|
67
|
+
sub_agents (list[BaseAgent]): Sub-agents managed by this agent.
|
|
68
|
+
knowledgebase (Optional[KnowledgeBase]): Knowledge base attached to the agent.
|
|
69
|
+
short_term_memory (Optional[ShortTermMemory]): Session-based memory for temporary context.
|
|
70
|
+
long_term_memory (Optional[LongTermMemory]): Cross-session memory for persistent user context.
|
|
71
|
+
tracers (list[BaseTracer]): List of tracers used for telemetry and monitoring.
|
|
72
|
+
|
|
73
|
+
Notes:
|
|
74
|
+
Before creating your agent, you should get the API Key for your model.
|
|
75
|
+
|
|
76
|
+
Examples:
|
|
77
|
+
### Simple agent
|
|
78
|
+
|
|
79
|
+
Create a simplest agent without any extra settings. All agent attributes are come from environment variables and default values. Like:
|
|
80
|
+
|
|
81
|
+
```python
|
|
82
|
+
import asyncio
|
|
83
|
+
|
|
84
|
+
from veadk import Agent, Runner
|
|
85
|
+
|
|
86
|
+
root_agent = Agent()
|
|
87
|
+
|
|
88
|
+
runner = Runner(agent=root_agent)
|
|
89
|
+
|
|
90
|
+
response = asyncio.run(runner.run("hello"))
|
|
91
|
+
print(response)
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
You can set some agent metadata attributes by the following code:
|
|
95
|
+
|
|
96
|
+
```python
|
|
97
|
+
from veadk import Agent
|
|
98
|
+
|
|
99
|
+
from veadk import Agent, Runner
|
|
100
|
+
|
|
101
|
+
root_agent = Agent(
|
|
102
|
+
name="meeting_assistant",
|
|
103
|
+
description="An assistant that helps user to make meetings.",
|
|
104
|
+
# system prompt
|
|
105
|
+
instruction="First learn about user's meeting time, location, and other key informations, and give out a meeting plan.",
|
|
106
|
+
)
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Or, once you want to use your local-serving model or models from other provider, you can specify some model-related configurations in initiation arguments:
|
|
110
|
+
|
|
111
|
+
```python
|
|
112
|
+
agent = Agent(model_name="", model_api_key="", model_api_base="")
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Besides, you can specify some extra options by ARK requirements, such as:
|
|
116
|
+
|
|
117
|
+
```python
|
|
118
|
+
# disable thinking
|
|
119
|
+
model_extra_config = {}
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
In some systems, mulitple-agent based design is necessary, you can implement a multiple-agent system by `sub_agent` argument:
|
|
123
|
+
|
|
124
|
+
```python
|
|
125
|
+
from veadk import Agent
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
"""
|
|
51
129
|
|
|
52
130
|
model_config = ConfigDict(arbitrary_types_allowed=True, extra="allow")
|
|
53
|
-
"""The model config"""
|
|
54
131
|
|
|
55
132
|
name: str = DEFAULT_AGENT_NAME
|
|
56
|
-
"""The name of the agent."""
|
|
57
|
-
|
|
58
133
|
description: str = DEFAULT_DESCRIPTION
|
|
59
|
-
"""The description of the agent. This will be helpful in A2A scenario."""
|
|
60
|
-
|
|
61
134
|
instruction: Union[str, InstructionProvider] = DEFAULT_INSTRUCTION
|
|
62
|
-
"""The instruction for the agent."""
|
|
63
135
|
|
|
64
136
|
model_name: str = Field(default_factory=lambda: settings.model.name)
|
|
65
|
-
"""The name of the model for agent running."""
|
|
66
|
-
|
|
67
137
|
model_provider: str = Field(default_factory=lambda: settings.model.provider)
|
|
68
|
-
"""The provider of the model for agent running."""
|
|
69
|
-
|
|
70
138
|
model_api_base: str = Field(default_factory=lambda: settings.model.api_base)
|
|
71
|
-
"""The api base of the model for agent running."""
|
|
72
|
-
|
|
73
139
|
model_api_key: str = Field(default_factory=lambda: settings.model.api_key)
|
|
74
|
-
"""The api key of the model for agent running."""
|
|
75
|
-
|
|
76
140
|
model_extra_config: dict = Field(default_factory=dict)
|
|
77
|
-
"""The extra config to include in the model requests."""
|
|
78
141
|
|
|
79
142
|
tools: list[ToolUnion] = []
|
|
80
|
-
"""The tools provided to agent."""
|
|
81
143
|
|
|
82
144
|
sub_agents: list[BaseAgent] = Field(default_factory=list, exclude=True)
|
|
83
|
-
"""The sub agents provided to agent."""
|
|
84
145
|
|
|
85
146
|
knowledgebase: Optional[KnowledgeBase] = None
|
|
86
|
-
"""The knowledgebase provided to agent."""
|
|
87
147
|
|
|
88
148
|
short_term_memory: Optional[ShortTermMemory] = None
|
|
89
|
-
"""The short term memory provided to agent."""
|
|
90
|
-
|
|
91
149
|
long_term_memory: Optional[LongTermMemory] = None
|
|
92
|
-
"""The long term memory provided to agent.
|
|
93
|
-
|
|
94
|
-
In VeADK, the `long_term_memory` refers to cross-session memory under the same user.
|
|
95
|
-
"""
|
|
96
150
|
|
|
97
151
|
tracers: list[BaseTracer] = []
|
|
98
|
-
"""The tracers provided to agent."""
|
|
99
152
|
|
|
100
153
|
def model_post_init(self, __context: Any) -> None:
|
|
101
154
|
super().model_post_init(None) # for sub_agents init
|
|
@@ -29,25 +29,38 @@ logger = get_logger(__name__)
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
class LoopAgent(GoogleADKLoopAgent):
|
|
32
|
-
"""Loop Agent with
|
|
32
|
+
"""Loop Agent with several sub agents.
|
|
33
|
+
|
|
34
|
+
This agent is capable of looping through and executing all sub-agents sequentially
|
|
35
|
+
or based on specific conditions. It is designed to operate in environments where
|
|
36
|
+
multiple agents need to work together in a looped execution flow, such as handling
|
|
37
|
+
complex, multi-step tasks or workflows. The agent integrates Volcengine’s AI
|
|
38
|
+
capabilities and supports a variety of tools and tracers for enhanced functionality
|
|
39
|
+
and performance monitoring.
|
|
40
|
+
|
|
41
|
+
Attributes:
|
|
42
|
+
model_config (ConfigDict): Configuration dictionary for the model.
|
|
43
|
+
name (str): The name of the agent, default is "veLoopAgent".
|
|
44
|
+
description (str): A description of the agent, helpful in A2A scenarios.
|
|
45
|
+
instruction (str): Instructions or principles for function calling and agent execution.
|
|
46
|
+
sub_agents (list[BaseAgent]): A list of sub-agents managed by the loop agent. Each sub-agent
|
|
47
|
+
is executed in a looped sequence based on the agent's logic.
|
|
48
|
+
tracers (list[BaseTracer]): A list of tracers used for monitoring the agent's performance
|
|
49
|
+
and behavior during execution.
|
|
50
|
+
|
|
51
|
+
Examples:
|
|
52
|
+
|
|
53
|
+
"""
|
|
33
54
|
|
|
34
55
|
model_config = ConfigDict(arbitrary_types_allowed=True, extra="allow")
|
|
35
|
-
"""The model config"""
|
|
36
56
|
|
|
37
57
|
name: str = "veLoopAgent"
|
|
38
|
-
"""The name of the agent."""
|
|
39
|
-
|
|
40
58
|
description: str = DEFAULT_DESCRIPTION
|
|
41
|
-
"""The description of the agent. This will be helpful in A2A scenario."""
|
|
42
|
-
|
|
43
59
|
instruction: str = DEFAULT_INSTRUCTION
|
|
44
|
-
"""The instruction for the agent, such as principles of function calling."""
|
|
45
60
|
|
|
46
61
|
sub_agents: list[BaseAgent] = Field(default_factory=list, exclude=True)
|
|
47
|
-
"""The sub agents provided to agent."""
|
|
48
62
|
|
|
49
63
|
tracers: list[BaseTracer] = []
|
|
50
|
-
"""The tracers provided to agent."""
|
|
51
64
|
|
|
52
65
|
def model_post_init(self, __context: Any) -> None:
|
|
53
66
|
super().model_post_init(None) # for sub_agents init
|
|
@@ -29,25 +29,37 @@ logger = get_logger(__name__)
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
class ParallelAgent(GoogleADKParallelAgent):
|
|
32
|
-
"""LLM-based Agent
|
|
32
|
+
"""LLM-based Agent that can execute sub-agents in parallel.
|
|
33
|
+
|
|
34
|
+
This agent is capable of executing multiple sub-agents concurrently, making it suitable
|
|
35
|
+
for scenarios that require parallel execution of multiple tasks or operations. By leveraging
|
|
36
|
+
parallelism, the agent can handle more complex workflows and improve efficiency by performing
|
|
37
|
+
independent tasks simultaneously. This design is ideal for scenarios where tasks are independent
|
|
38
|
+
and can benefit from reduced execution time.
|
|
39
|
+
|
|
40
|
+
Attributes:
|
|
41
|
+
model_config (ConfigDict): Configuration dictionary for the model.
|
|
42
|
+
name (str): The name of the agent, default is "veParallelAgent".
|
|
43
|
+
description (str): A description of the agent, useful in A2A scenarios.
|
|
44
|
+
instruction (str): Instructions or principles for function calling and agent execution.
|
|
45
|
+
sub_agents (list[BaseAgent]): A list of sub-agents managed by the parallel agent.
|
|
46
|
+
Each sub-agent is executed concurrently.
|
|
47
|
+
tracers (list[BaseTracer]): A list of tracers used for monitoring the agent's performance
|
|
48
|
+
and behavior during parallel execution.
|
|
49
|
+
|
|
50
|
+
Examples:
|
|
51
|
+
|
|
52
|
+
"""
|
|
33
53
|
|
|
34
54
|
model_config = ConfigDict(arbitrary_types_allowed=True, extra="allow")
|
|
35
|
-
"""The model config"""
|
|
36
55
|
|
|
37
56
|
name: str = "veParallelAgent"
|
|
38
|
-
"""The name of the agent."""
|
|
39
|
-
|
|
40
57
|
description: str = DEFAULT_DESCRIPTION
|
|
41
|
-
"""The description of the agent. This will be helpful in A2A scenario."""
|
|
42
|
-
|
|
43
58
|
instruction: str = DEFAULT_INSTRUCTION
|
|
44
|
-
"""The instruction for the agent, such as principles of function calling."""
|
|
45
59
|
|
|
46
60
|
sub_agents: list[BaseAgent] = Field(default_factory=list, exclude=True)
|
|
47
|
-
"""The sub agents provided to agent."""
|
|
48
61
|
|
|
49
62
|
tracers: list[BaseTracer] = []
|
|
50
|
-
"""The tracers provided to agent."""
|
|
51
63
|
|
|
52
64
|
def model_post_init(self, __context: Any) -> None:
|
|
53
65
|
super().model_post_init(None) # for sub_agents init
|
|
@@ -29,25 +29,34 @@ logger = get_logger(__name__)
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
class SequentialAgent(GoogleADKSequentialAgent):
|
|
32
|
-
"""Sequential Agent
|
|
32
|
+
"""Sequential Agent that executes sub-agents sequentially.
|
|
33
|
+
|
|
34
|
+
This agent is designed to execute multiple sub-agents in a predefined sequential order.
|
|
35
|
+
It ensures that each sub-agent is executed one after the other, making it suitable for
|
|
36
|
+
workflows where the output of one sub-agent is needed as input for the next. The agent
|
|
37
|
+
is well-suited for tasks that require a linear progression of steps or operations, ensuring
|
|
38
|
+
that the execution flow is maintained.
|
|
39
|
+
|
|
40
|
+
Attributes:
|
|
41
|
+
model_config (ConfigDict): Configuration dictionary for the model.
|
|
42
|
+
name (str): The name of the agent, default is "veSequentialAgent".
|
|
43
|
+
description (str): A description of the agent, useful in A2A scenarios.
|
|
44
|
+
instruction (str): Instructions or principles for function calling and agent execution.
|
|
45
|
+
sub_agents (list[BaseAgent]): A list of sub-agents managed by the sequential agent.
|
|
46
|
+
Each sub-agent is executed in the order they are listed.
|
|
47
|
+
tracers (list[BaseTracer]): A list of tracers used for monitoring the agent's performance
|
|
48
|
+
and behavior during sequential execution.
|
|
49
|
+
"""
|
|
33
50
|
|
|
34
51
|
model_config = ConfigDict(arbitrary_types_allowed=True, extra="allow")
|
|
35
|
-
"""The model config"""
|
|
36
52
|
|
|
37
53
|
name: str = "veSequentialAgent"
|
|
38
|
-
"""The name of the agent."""
|
|
39
|
-
|
|
40
54
|
description: str = DEFAULT_DESCRIPTION
|
|
41
|
-
"""The description of the agent. This will be helpful in A2A scenario."""
|
|
42
|
-
|
|
43
55
|
instruction: str = DEFAULT_INSTRUCTION
|
|
44
|
-
"""The instruction for the agent, such as principles of function calling."""
|
|
45
56
|
|
|
46
57
|
sub_agents: list[BaseAgent] = Field(default_factory=list, exclude=True)
|
|
47
|
-
"""The sub agents provided to agent."""
|
|
48
58
|
|
|
49
59
|
tracers: list[BaseTracer] = []
|
|
50
|
-
"""The tracers provided to agent."""
|
|
51
60
|
|
|
52
61
|
def model_post_init(self, __context: Any) -> None:
|
|
53
62
|
super().model_post_init(None) # for sub_agents init
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
import os
|
|
16
|
+
|
|
17
|
+
from veadk.auth.veauth.utils import get_credential_from_vefaas_iam
|
|
18
|
+
from veadk.utils.logger import get_logger
|
|
19
|
+
from veadk.utils.volcengine_sign import ve_request
|
|
20
|
+
|
|
21
|
+
logger = get_logger(__name__)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def get_apmplus_token(region: str = "cn-beijing") -> str:
|
|
25
|
+
logger.info("Fetching APMPlus token...")
|
|
26
|
+
|
|
27
|
+
access_key = os.getenv("VOLCENGINE_ACCESS_KEY")
|
|
28
|
+
secret_key = os.getenv("VOLCENGINE_SECRET_KEY")
|
|
29
|
+
session_token = ""
|
|
30
|
+
|
|
31
|
+
if not (access_key and secret_key):
|
|
32
|
+
# try to get from vefaas iam
|
|
33
|
+
cred = get_credential_from_vefaas_iam()
|
|
34
|
+
access_key = cred.access_key_id
|
|
35
|
+
secret_key = cred.secret_access_key
|
|
36
|
+
session_token = cred.session_token
|
|
37
|
+
|
|
38
|
+
res = ve_request(
|
|
39
|
+
request_body={},
|
|
40
|
+
header={
|
|
41
|
+
"X-Security-Token": session_token,
|
|
42
|
+
# APMPlus frontend required
|
|
43
|
+
"X-Apmplus-Region": region.replace("-", "_"),
|
|
44
|
+
},
|
|
45
|
+
action="GetAppKey",
|
|
46
|
+
ak=access_key,
|
|
47
|
+
sk=secret_key,
|
|
48
|
+
service="apmplus_server",
|
|
49
|
+
version="2024-07-30",
|
|
50
|
+
region=region,
|
|
51
|
+
host="open.volcengineapi.com",
|
|
52
|
+
)
|
|
53
|
+
try:
|
|
54
|
+
api_key = res["data"]["app_key"]
|
|
55
|
+
logger.info("Successfully fetching APMPlus API Key.")
|
|
56
|
+
return api_key
|
|
57
|
+
except KeyError:
|
|
58
|
+
raise ValueError(f"Failed to get APMPlus token: {res}")
|
|
@@ -64,6 +64,8 @@ def get_ark_token(region: str = "cn-beijing") -> str:
|
|
|
64
64
|
host="open.volcengineapi.com",
|
|
65
65
|
)
|
|
66
66
|
try:
|
|
67
|
-
|
|
67
|
+
api_key = res["Result"]["ApiKey"]
|
|
68
|
+
logger.info("Successfully fetching ARK API Key.")
|
|
69
|
+
return api_key
|
|
68
70
|
except KeyError:
|
|
69
71
|
raise ValueError(f"Failed to get ARK api key: {res}")
|
|
@@ -50,8 +50,20 @@ def get_credential_from_vefaas_iam() -> VeIAMCredential:
|
|
|
50
50
|
access_key = cred_dict["access_key_id"]
|
|
51
51
|
secret_key = cred_dict["secret_access_key"]
|
|
52
52
|
session_token = cred_dict["session_token"]
|
|
53
|
+
|
|
54
|
+
logger.info("Get credential from IAM file successfully.")
|
|
55
|
+
|
|
53
56
|
return VeIAMCredential(
|
|
54
57
|
access_key_id=access_key,
|
|
55
58
|
secret_access_key=secret_key,
|
|
56
59
|
session_token=session_token,
|
|
57
60
|
)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def refresh_ak_sk(access_key: str, secret_key: str) -> VeIAMCredential:
|
|
64
|
+
if access_key and secret_key:
|
|
65
|
+
return VeIAMCredential(
|
|
66
|
+
access_key_id=access_key, secret_access_key=secret_key, session_token=""
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
return get_credential_from_vefaas_iam()
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
import os
|
|
16
|
+
|
|
17
|
+
from veadk.auth.veauth.utils import get_credential_from_vefaas_iam
|
|
18
|
+
from veadk.utils.logger import get_logger
|
|
19
|
+
from veadk.utils.volcengine_sign import ve_request
|
|
20
|
+
|
|
21
|
+
logger = get_logger(__name__)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def _get_api_key_id_by_project_id(
|
|
25
|
+
project_id: str, access_key: str, secret_key: str, session_token: str, region: str
|
|
26
|
+
):
|
|
27
|
+
res = ve_request(
|
|
28
|
+
request_body={"MemoryProjectId": project_id},
|
|
29
|
+
header={"X-Security-Token": session_token},
|
|
30
|
+
action="DescribeMemoryProjectDetail",
|
|
31
|
+
ak=access_key,
|
|
32
|
+
sk=secret_key,
|
|
33
|
+
service="mem0",
|
|
34
|
+
version="2025-10-10",
|
|
35
|
+
region=region,
|
|
36
|
+
host="open.volcengineapi.com",
|
|
37
|
+
)
|
|
38
|
+
try:
|
|
39
|
+
api_key_id = res["Result"]["APIKeyInfos"]["APIKeyId"]
|
|
40
|
+
except KeyError:
|
|
41
|
+
raise ValueError(f"Failed to get mem0 api key id: {res}")
|
|
42
|
+
|
|
43
|
+
return api_key_id
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def _get_api_key_by_api_key_id(
|
|
47
|
+
api_key_id: str, access_key: str, secret_key: str, session_token: str, region: str
|
|
48
|
+
) -> str:
|
|
49
|
+
res = ve_request(
|
|
50
|
+
request_body={"APIKeyId": api_key_id},
|
|
51
|
+
header={"X-Security-Token": session_token},
|
|
52
|
+
action="DescribeAPIKeyDetail",
|
|
53
|
+
ak=access_key,
|
|
54
|
+
sk=secret_key,
|
|
55
|
+
service="mem0",
|
|
56
|
+
version="2025-10-10",
|
|
57
|
+
region=region,
|
|
58
|
+
host="open.volcengineapi.com",
|
|
59
|
+
)
|
|
60
|
+
try:
|
|
61
|
+
api_key = res["Result"]["APIKeyValue"]
|
|
62
|
+
except KeyError:
|
|
63
|
+
raise ValueError(f"Failed to get mem0 api key: {res}")
|
|
64
|
+
|
|
65
|
+
return api_key
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def get_viking_mem0_token(
|
|
69
|
+
api_key_id: str, memory_project_id: str, region: str = "cn-beijing"
|
|
70
|
+
) -> str:
|
|
71
|
+
logger.info("Fetching Viking mem0 token...")
|
|
72
|
+
|
|
73
|
+
access_key = os.getenv("VOLCENGINE_ACCESS_KEY")
|
|
74
|
+
secret_key = os.getenv("VOLCENGINE_SECRET_KEY")
|
|
75
|
+
session_token = ""
|
|
76
|
+
|
|
77
|
+
if not (access_key and secret_key):
|
|
78
|
+
# try to get from vefaas iam
|
|
79
|
+
cred = get_credential_from_vefaas_iam()
|
|
80
|
+
access_key = cred.access_key_id
|
|
81
|
+
secret_key = cred.secret_access_key
|
|
82
|
+
session_token = cred.session_token
|
|
83
|
+
|
|
84
|
+
if not api_key_id:
|
|
85
|
+
api_key_id = _get_api_key_id_by_project_id(
|
|
86
|
+
memory_project_id, access_key, secret_key, session_token, region
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
return _get_api_key_by_api_key_id(
|
|
90
|
+
api_key_id, access_key, secret_key, session_token, region
|
|
91
|
+
)
|
|
@@ -32,7 +32,11 @@ from veadk.version import VERSION
|
|
|
32
32
|
version=VERSION, prog_name="Volcengine Agent Development Kit (VeADK)"
|
|
33
33
|
)
|
|
34
34
|
def veadk():
|
|
35
|
-
"""Volcengine
|
|
35
|
+
"""Volcengine Agent Development Kit (VeADK) command line interface.
|
|
36
|
+
|
|
37
|
+
This is the main entry point for all VeADK CLI commands. VeADK provides
|
|
38
|
+
tools for developing, deploying, and managing AI agents on the Volcengine platform.
|
|
39
|
+
"""
|
|
36
40
|
pass
|
|
37
41
|
|
|
38
42
|
|
|
@@ -46,6 +46,16 @@ You can run the agent by executing: veadk web
|
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
def _prompt_for_ark_api_key() -> str:
|
|
49
|
+
"""Prompt user to enter ARK API key with guidance and options.
|
|
50
|
+
|
|
51
|
+
Displays instructions for obtaining an ARK API key and provides the user
|
|
52
|
+
with two options: enter the key immediately or configure it later in the
|
|
53
|
+
generated .env file. Includes helpful documentation links and clear choices.
|
|
54
|
+
|
|
55
|
+
Returns:
|
|
56
|
+
str: The ARK API key entered by the user, or empty string if they
|
|
57
|
+
choose to configure it later
|
|
58
|
+
"""
|
|
49
59
|
click.secho(
|
|
50
60
|
"An API key is required to run the agent. See https://www.volcengine.com/docs/82379/1541594 for details.",
|
|
51
61
|
fg="green",
|
|
@@ -62,6 +72,30 @@ def _prompt_for_ark_api_key() -> str:
|
|
|
62
72
|
|
|
63
73
|
|
|
64
74
|
def _generate_files(ark_api_key: str, target_dir_path: Path) -> None:
|
|
75
|
+
"""Generate agent project files from templates in the target directory.
|
|
76
|
+
|
|
77
|
+
Creates the essential files for a new VeADK agent project including
|
|
78
|
+
environment configuration, Python package initialization, and the main
|
|
79
|
+
agent definition file. Uses predefined templates to ensure consistent
|
|
80
|
+
project structure and proper configuration.
|
|
81
|
+
|
|
82
|
+
Args:
|
|
83
|
+
ark_api_key: ARK API key to be written to the .env file for
|
|
84
|
+
model authentication. Can be empty string if not provided
|
|
85
|
+
target_dir_path: Path object pointing to the target directory
|
|
86
|
+
where files should be created
|
|
87
|
+
|
|
88
|
+
Files Created:
|
|
89
|
+
- .env: Environment file with ARK API key configuration
|
|
90
|
+
- __init__.py: Python package initialization file
|
|
91
|
+
- agent.py: Main agent definition with default configuration
|
|
92
|
+
|
|
93
|
+
Note:
|
|
94
|
+
- Creates target directory if it doesn't exist
|
|
95
|
+
- Overwrites existing files without warning
|
|
96
|
+
- Uses template formatting to inject API key into .env file
|
|
97
|
+
- Displays success message with project location after completion
|
|
98
|
+
"""
|
|
65
99
|
target_dir_path.mkdir(exist_ok=True)
|
|
66
100
|
env_path = target_dir_path / ".env"
|
|
67
101
|
init_file_path = target_dir_path / "__init__.py"
|
|
@@ -82,7 +116,34 @@ def _generate_files(ark_api_key: str, target_dir_path: Path) -> None:
|
|
|
82
116
|
@click.argument("agent_name", required=False)
|
|
83
117
|
@click.option("--ark-api-key", help="The ARK API key.")
|
|
84
118
|
def create(agent_name: str, ark_api_key: str) -> None:
|
|
85
|
-
"""
|
|
119
|
+
"""Create a new VeADK agent project with prepopulated template files.
|
|
120
|
+
|
|
121
|
+
This command creates a new agent project directory with all necessary
|
|
122
|
+
files to get started with VeADK agent development. It sets up a complete
|
|
123
|
+
project structure including environment configuration, agent definition,
|
|
124
|
+
and package initialization.
|
|
125
|
+
|
|
126
|
+
The command handles interactive prompts for missing parameters and provides
|
|
127
|
+
safety checks for existing directories to prevent accidental overwrites.
|
|
128
|
+
|
|
129
|
+
Project Structure Created:
|
|
130
|
+
agent_name/
|
|
131
|
+
├── .env # Environment configuration with API key
|
|
132
|
+
├── __init__.py # Python package initialization
|
|
133
|
+
└── agent.py # Main agent definition with default settings
|
|
134
|
+
|
|
135
|
+
Args:
|
|
136
|
+
agent_name: Name of the agent and directory to create. If not provided
|
|
137
|
+
as an argument, the user will be prompted to enter it interactively
|
|
138
|
+
ark_api_key: ARK API key for model authentication. If not provided,
|
|
139
|
+
the user will be prompted with options to enter it or configure later
|
|
140
|
+
|
|
141
|
+
Note:
|
|
142
|
+
- Agent name becomes both the directory name and project identifier
|
|
143
|
+
- API key can be configured later by editing the .env file
|
|
144
|
+
- Generated agent is immediately runnable with 'veadk web' command
|
|
145
|
+
- Template includes comments guiding users to customize model settings
|
|
146
|
+
"""
|
|
86
147
|
if not agent_name:
|
|
87
148
|
agent_name = click.prompt("Enter the agent name")
|
|
88
149
|
if not ark_api_key:
|