agentkernel 0.7.0__tar.gz → 0.8.0__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.
- {agentkernel-0.7.0 → agentkernel-0.8.0}/PKG-INFO +19 -5
- {agentkernel-0.7.0 → agentkernel-0.8.0}/README.md +14 -4
- {agentkernel-0.7.0 → agentkernel-0.8.0}/pyproject.toml +9 -3
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/config.py +32 -3
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/deployment/azure/akfunction.py +2 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/sandbox/__init__.py +7 -5
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/sandbox/base.py +44 -2
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/sandbox/broker/__init__.py +2 -2
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/sandbox/broker/base.py +13 -13
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/sandbox/broker/embedded.py +7 -5
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/sandbox/broker/thread.py +11 -11
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/sandbox/broker/worker.py +32 -15
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/sandbox/errors.py +1 -1
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/sandbox/factory.py +67 -7
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/sandbox/hooks.py +8 -8
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/sandbox/manager.py +23 -16
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/sandbox/model.py +4 -2
- agentkernel-0.8.0/src/agentkernel/sandbox/providers/daytona.py +196 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/sandbox/providers/docker.py +1 -0
- agentkernel-0.8.0/src/agentkernel/sandbox/providers/e2b.py +138 -0
- agentkernel-0.8.0/src/agentkernel/sandbox/providers/ec2_ssm.py +234 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/sandbox/tools.py +28 -10
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/skills/ak-add-capabilities/SKILL.md +24 -23
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/skills/ak-add-capabilities/evals/evals.json +18 -1
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/skills/ak-add-integration/SKILL.md +8 -8
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/skills/ak-add-integration/evals/evals.json +1 -1
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/skills/ak-build/SKILL.md +1 -1
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/skills/ak-build/evals/evals.json +1 -1
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/skills/ak-cloud-deploy/SKILL.md +19 -19
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/skills/ak-cloud-deploy/evals/evals.json +1 -1
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/skills/ak-init/SKILL.md +2 -2
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/skills/ak-init/evals/evals.json +2 -2
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/skills/ak-test/SKILL.md +2 -2
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/skills/ak-test/evals/evals.json +1 -1
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/adk.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/api/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/api/a2a/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/api/a2a/a2a.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/api/a2a/handler.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/api/handler.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/api/http.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/api/mcp/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/api/mcp/akmcp.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/api/thread.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/auth/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/auth/handler.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/auth.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/aws.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/azure.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/cli/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/cli/ak.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/cli/cli.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/base.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/builder.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/chat_service.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/hooks.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/logger.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/model.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/module.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/multimodal/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/multimodal/factory.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/multimodal/hooks.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/multimodal/storage/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/multimodal/storage/base.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/multimodal/storage/dynamodb.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/multimodal/storage/in_memory.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/multimodal/storage/redis.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/multimodal/storage/session_cache.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/multimodal/storage/storage_manager.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/multimodal/tools.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/runtime.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/service.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/session/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/session/base.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/session/cosmosdb.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/session/dynamodb.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/session/firestore.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/session/in_memory.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/session/redis.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/session/serde.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/session/valkey.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/thread/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/thread/authoriser.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/thread/manager.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/thread/model.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/thread/naming.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/thread/store/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/thread/store/base.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/thread/store/cosmosdb.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/thread/store/dynamodb.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/thread/store/firestore.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/thread/store/in_memory.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/thread/store/redis.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/tool.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/util/config_yaml_util.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/util/driver/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/util/driver/base.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/util/driver/cosmosdb.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/util/driver/dynamodb.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/util/driver/firestore.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/util/driver/redis.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/util/driver/redis_like.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/util/driver/valkey.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/util/error_util.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/util/factory.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/core/util/key_value_cache.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/crewai.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/deployment/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/deployment/aws/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/deployment/aws/containerized/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/deployment/aws/containerized/akagentrunner.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/deployment/aws/containerized/akoutputconsumer.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/deployment/aws/containerized/core/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/deployment/aws/containerized/core/sqs_consumer.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/deployment/aws/containerized/ecs_io_handler.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/deployment/aws/containerized/ecs_queue_handler.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/deployment/aws/core/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/deployment/aws/core/response_store/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/deployment/aws/core/response_store/dynamodb.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/deployment/aws/core/response_store/handler.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/deployment/aws/core/response_store/redis.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/deployment/aws/core/response_store/valkey.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/deployment/aws/core/sqs_handler.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/deployment/aws/core/websocket_service.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/deployment/aws/serverless/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/deployment/aws/serverless/akagentrunner.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/deployment/aws/serverless/akauthorizer.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/deployment/aws/serverless/aklambda.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/deployment/aws/serverless/akresponsehandler.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/deployment/aws/serverless/akwsconnectionhandler.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/deployment/aws/serverless/core/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/deployment/aws/serverless/core/router/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/deployment/aws/serverless/core/router/common.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/deployment/aws/serverless/core/router/rest_lambda.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/deployment/aws/serverless/core/router/ws_lambda.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/deployment/aws/serverless/core/sqs_consumer.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/deployment/azure/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/deployment/common/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/deployment/common/queue_consumer.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/deployment/common/queue_handler.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/deployment/common/queue_request_handler.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/deployment/common/response_store.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/deployment/common/thread_runner.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/deployment/common/websocket_connection_store.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/deployment/gcp/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/deployment/gcp/akauthorizer.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/deployment/gcp/akcloudrun.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/framework/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/framework/adk/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/framework/adk/adk.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/framework/crewai/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/framework/crewai/crewai.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/framework/langgraph/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/framework/langgraph/langgraph.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/framework/openai/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/framework/openai/openai.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/framework/pydanticai/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/framework/pydanticai/pydanticai.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/framework/smolagents/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/framework/smolagents/smolagents.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/gcp.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/gmail.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/guardrail/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/guardrail/bedrock.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/guardrail/guardrail.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/guardrail/openai.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/guardrail/walledai.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/instagram.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/integration/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/integration/gmail/README.md +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/integration/gmail/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/integration/gmail/gmail_chat.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/integration/instagram/README.md +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/integration/instagram/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/integration/instagram/instagram_chat.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/integration/messenger/README.md +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/integration/messenger/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/integration/messenger/messenger_chat.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/integration/slack/README.md +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/integration/slack/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/integration/slack/slack_chat.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/integration/teams/README.md +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/integration/teams/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/integration/teams/teams_chat.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/integration/telegram/README.md +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/integration/telegram/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/integration/telegram/telegram_chat.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/integration/whatsapp/README.md +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/integration/whatsapp/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/integration/whatsapp/whatsapp_chat.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/knowledgebase/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/knowledgebase/base.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/knowledgebase/chroma.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/knowledgebase/knowledgebuilder.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/knowledgebase/neo4j.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/knowledgebase/starburst.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/langgraph.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/mcp.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/messenger.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/openai.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/pydanticai.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/sandbox/principal.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/sandbox/providers/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/sandbox/providers/local_subprocess.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/sandbox/testing.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/skills/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/skills/skills.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/slack.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/smolagents.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/teams.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/telegram.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/test/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/test/config.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/test/test.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/trace/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/trace/base.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/trace/langfuse/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/trace/langfuse/adk.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/trace/langfuse/crewai.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/trace/langfuse/langfuse.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/trace/langfuse/langgraph.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/trace/langfuse/openai.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/trace/langfuse/pydanticai.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/trace/langfuse/smolagents.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/trace/logfire/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/trace/logfire/adk.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/trace/logfire/crewai.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/trace/logfire/langgraph.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/trace/logfire/logfire.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/trace/logfire/openai.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/trace/logfire/pydanticai.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/trace/logfire/smolagents.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/trace/openllmetry/__init__.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/trace/openllmetry/adk.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/trace/openllmetry/crewai.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/trace/openllmetry/langgraph.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/trace/openllmetry/openai.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/trace/openllmetry/openllmetry.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/trace/openllmetry/pydanticai.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/trace/openllmetry/smolagents.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/trace/trace.py +0 -0
- {agentkernel-0.7.0 → agentkernel-0.8.0}/src/agentkernel/whatsapp.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: agentkernel
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.8.0
|
|
4
4
|
Summary: Agent Kernel - Unified AI Agents Runtime
|
|
5
5
|
Author: Yaala Labs
|
|
6
6
|
Author-email: Yaala Labs <agentkernel@yaalalabs.com>
|
|
@@ -26,6 +26,8 @@ Requires-Dist: chromadb>=0.4.0 ; extra == 'chromadb'
|
|
|
26
26
|
Requires-Dist: crewai>=1.15.0 ; extra == 'crewai'
|
|
27
27
|
Requires-Dist: openinference-instrumentation-crewai>=0.1.16 ; extra == 'crewai'
|
|
28
28
|
Requires-Dist: openinference-instrumentation-litellm>=0.1.28 ; extra == 'crewai'
|
|
29
|
+
Requires-Dist: daytona>=0.198.0,<0.199 ; extra == 'daytona'
|
|
30
|
+
Requires-Dist: e2b-code-interpreter>=2.8.0 ; extra == 'e2b'
|
|
29
31
|
Requires-Dist: google-cloud-firestore>=2.19.0 ; extra == 'gcp'
|
|
30
32
|
Requires-Dist: google-auth>=2.0.0 ; extra == 'gmail'
|
|
31
33
|
Requires-Dist: google-auth-oauthlib>=1.0.0 ; extra == 'gmail'
|
|
@@ -86,6 +88,8 @@ Provides-Extra: azure
|
|
|
86
88
|
Provides-Extra: chromadb
|
|
87
89
|
Provides-Extra: cli
|
|
88
90
|
Provides-Extra: crewai
|
|
91
|
+
Provides-Extra: daytona
|
|
92
|
+
Provides-Extra: e2b
|
|
89
93
|
Provides-Extra: gcp
|
|
90
94
|
Provides-Extra: gmail
|
|
91
95
|
Provides-Extra: instagram
|
|
@@ -126,7 +130,7 @@ Agent Kernel is a lightweight **AI agent runtime** and adapter layer for buildin
|
|
|
126
130
|
- **Multi-Framework Support**: OpenAI Agents SDK, CrewAI, LangGraph, Google ADK, Smolagents, and Pydantic AI
|
|
127
131
|
- **Session Management**: Built-in session abstraction with pluggable storage backends
|
|
128
132
|
- **Knowledge Bases**: Unified `KnowledgeBase` interface with ChromaDB, Neo4j, and Starburst/Trino backends via `KnowledgeBuilder`
|
|
129
|
-
- **Sandbox**: Execute agent-generated code and shell commands in an isolated, permission-bounded environment with pluggable providers (`local_subprocess`, `docker`), workload profiles, policy enforcement, and per-user identity
|
|
133
|
+
- **Sandbox**: Execute agent-generated code and shell commands in an isolated, permission-bounded environment with pluggable providers (`local_subprocess`, `docker`, `e2b`, `daytona`, `ec2_ssm`), workload profiles, policy enforcement, and per-user identity
|
|
130
134
|
- **Flexible Deployment**: Interactive CLI, REST API, serverless, or containerized deployment — see the "Multi-Cloud Deployment" section below
|
|
131
135
|
- **Pluggable Architecture**: Easy to extend with custom framework adapters
|
|
132
136
|
- **MCP Server**: Built-in Model Context Protocol server for exposing agents as MCP tools and exposing any custom tool
|
|
@@ -154,10 +158,14 @@ For LLM-based thread naming with Conversation Thread Support:
|
|
|
154
158
|
pip install "agentkernel[thread]"
|
|
155
159
|
```
|
|
156
160
|
|
|
157
|
-
For the
|
|
161
|
+
For the sandbox providers (the `local_subprocess` provider needs no extra; `ec2_ssm` rides
|
|
162
|
+
the `aws` extra):
|
|
158
163
|
|
|
159
164
|
```bash
|
|
160
|
-
pip install "agentkernel[sandbox-docker]"
|
|
165
|
+
pip install "agentkernel[sandbox-docker]" # docker provider
|
|
166
|
+
pip install "agentkernel[e2b]" # e2b cloud provider
|
|
167
|
+
pip install "agentkernel[daytona]" # daytona cloud provider
|
|
168
|
+
pip install "agentkernel[aws]" # ec2_ssm provider (boto3)
|
|
161
169
|
```
|
|
162
170
|
|
|
163
171
|
**Requirements:**
|
|
@@ -1124,9 +1132,15 @@ Key fields:
|
|
|
1124
1132
|
- **`enabled`** (`AK_SANDBOX__ENABLED`, default `false`) — master switch; inert when off.
|
|
1125
1133
|
- **`agents`** — agent names the tools/prompt attach to; omit for all agents.
|
|
1126
1134
|
- **`type`** (per profile) — `local_subprocess` (no isolation; dev/test), `docker`
|
|
1127
|
-
(container isolation; `sandbox-docker` extra),
|
|
1135
|
+
(container isolation; `sandbox-docker` extra), `e2b` (managed micro-VMs; `e2b` extra),
|
|
1136
|
+
`daytona` (cloud containers; `daytona` extra), `ec2_ssm` (attach to an existing EC2
|
|
1137
|
+
instance via SSM; `aws` extra), or a dotted path to your own `SandboxProvider`.
|
|
1128
1138
|
- **`scope`** — `per_call` (fresh per execution), `per_session` (persists across turns),
|
|
1129
1139
|
`per_runtime` (one shared sandbox per profile).
|
|
1140
|
+
- **`environment`** — `managed` (default; the provider creates and disposes sandboxes) or
|
|
1141
|
+
`attached` (deliberately connect to an existing environment the framework never owns,
|
|
1142
|
+
e.g. an EC2 instance via `ec2_ssm`; requires the provider's `attach_to` and is validated
|
|
1143
|
+
against the provider's lifecycle capabilities at startup).
|
|
1130
1144
|
- **`policy`** — network egress, filesystem paths, cpu/memory, timeout; enforced per provider,
|
|
1131
1145
|
fail-closed under `strict`.
|
|
1132
1146
|
- **`identity.mode`** + **`principal_resolver`** — run code under the agent's or the invoking
|
|
@@ -11,7 +11,7 @@ Agent Kernel is a lightweight **AI agent runtime** and adapter layer for buildin
|
|
|
11
11
|
- **Multi-Framework Support**: OpenAI Agents SDK, CrewAI, LangGraph, Google ADK, Smolagents, and Pydantic AI
|
|
12
12
|
- **Session Management**: Built-in session abstraction with pluggable storage backends
|
|
13
13
|
- **Knowledge Bases**: Unified `KnowledgeBase` interface with ChromaDB, Neo4j, and Starburst/Trino backends via `KnowledgeBuilder`
|
|
14
|
-
- **Sandbox**: Execute agent-generated code and shell commands in an isolated, permission-bounded environment with pluggable providers (`local_subprocess`, `docker`), workload profiles, policy enforcement, and per-user identity
|
|
14
|
+
- **Sandbox**: Execute agent-generated code and shell commands in an isolated, permission-bounded environment with pluggable providers (`local_subprocess`, `docker`, `e2b`, `daytona`, `ec2_ssm`), workload profiles, policy enforcement, and per-user identity
|
|
15
15
|
- **Flexible Deployment**: Interactive CLI, REST API, serverless, or containerized deployment — see the "Multi-Cloud Deployment" section below
|
|
16
16
|
- **Pluggable Architecture**: Easy to extend with custom framework adapters
|
|
17
17
|
- **MCP Server**: Built-in Model Context Protocol server for exposing agents as MCP tools and exposing any custom tool
|
|
@@ -39,10 +39,14 @@ For LLM-based thread naming with Conversation Thread Support:
|
|
|
39
39
|
pip install "agentkernel[thread]"
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
-
For the
|
|
42
|
+
For the sandbox providers (the `local_subprocess` provider needs no extra; `ec2_ssm` rides
|
|
43
|
+
the `aws` extra):
|
|
43
44
|
|
|
44
45
|
```bash
|
|
45
|
-
pip install "agentkernel[sandbox-docker]"
|
|
46
|
+
pip install "agentkernel[sandbox-docker]" # docker provider
|
|
47
|
+
pip install "agentkernel[e2b]" # e2b cloud provider
|
|
48
|
+
pip install "agentkernel[daytona]" # daytona cloud provider
|
|
49
|
+
pip install "agentkernel[aws]" # ec2_ssm provider (boto3)
|
|
46
50
|
```
|
|
47
51
|
|
|
48
52
|
**Requirements:**
|
|
@@ -1009,9 +1013,15 @@ Key fields:
|
|
|
1009
1013
|
- **`enabled`** (`AK_SANDBOX__ENABLED`, default `false`) — master switch; inert when off.
|
|
1010
1014
|
- **`agents`** — agent names the tools/prompt attach to; omit for all agents.
|
|
1011
1015
|
- **`type`** (per profile) — `local_subprocess` (no isolation; dev/test), `docker`
|
|
1012
|
-
(container isolation; `sandbox-docker` extra),
|
|
1016
|
+
(container isolation; `sandbox-docker` extra), `e2b` (managed micro-VMs; `e2b` extra),
|
|
1017
|
+
`daytona` (cloud containers; `daytona` extra), `ec2_ssm` (attach to an existing EC2
|
|
1018
|
+
instance via SSM; `aws` extra), or a dotted path to your own `SandboxProvider`.
|
|
1013
1019
|
- **`scope`** — `per_call` (fresh per execution), `per_session` (persists across turns),
|
|
1014
1020
|
`per_runtime` (one shared sandbox per profile).
|
|
1021
|
+
- **`environment`** — `managed` (default; the provider creates and disposes sandboxes) or
|
|
1022
|
+
`attached` (deliberately connect to an existing environment the framework never owns,
|
|
1023
|
+
e.g. an EC2 instance via `ec2_ssm`; requires the provider's `attach_to` and is validated
|
|
1024
|
+
against the provider's lifecycle capabilities at startup).
|
|
1015
1025
|
- **`policy`** — network egress, filesystem paths, cpu/memory, timeout; enforced per provider,
|
|
1016
1026
|
fail-closed under `strict`.
|
|
1017
1027
|
- **`identity.mode`** + **`principal_resolver`** — run code under the agent's or the invoking
|
|
@@ -4,7 +4,7 @@ build-backend = "uv_build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "agentkernel"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.8.0"
|
|
8
8
|
description = "Agent Kernel - Unified AI Agents Runtime"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.12,<3.14"
|
|
@@ -162,8 +162,14 @@ multimodal = [
|
|
|
162
162
|
sandbox-docker = [
|
|
163
163
|
"docker>=7.0.0",
|
|
164
164
|
]
|
|
165
|
-
|
|
166
|
-
|
|
165
|
+
e2b = [
|
|
166
|
+
"e2b-code-interpreter>=2.8.0",
|
|
167
|
+
]
|
|
168
|
+
daytona = [
|
|
169
|
+
# <0.199: from 0.199 the daytona api clients require pydantic>=2.13.4, which conflicts
|
|
170
|
+
# with crewai's pydantic<2.13 pin; 0.198 accepts pydantic>=2.11 and has the same SDK surface.
|
|
171
|
+
"daytona>=0.198.0,<0.199",
|
|
172
|
+
]
|
|
167
173
|
|
|
168
174
|
[project.scripts]
|
|
169
175
|
ak = "agentkernel.cli.ak:main"
|
|
@@ -427,6 +427,22 @@ class _SandboxE2BConfig(BaseModel):
|
|
|
427
427
|
class _SandboxDaytonaConfig(BaseModel):
|
|
428
428
|
api_key_env: str = Field(default="DAYTONA_API_KEY", description="Name of the environment variable holding the Daytona API key")
|
|
429
429
|
target: Optional[str] = Field(default=None, description="Daytona target/region; None uses the SDK default")
|
|
430
|
+
image: Optional[str] = Field(
|
|
431
|
+
default=None,
|
|
432
|
+
description="Container image for the sandbox (e.g. 'python:3.12-slim' or a registry image). Mutually exclusive with 'snapshot'; when neither is set Daytona uses its default snapshot.",
|
|
433
|
+
)
|
|
434
|
+
snapshot: Optional[str] = Field(
|
|
435
|
+
default=None,
|
|
436
|
+
description="Named Daytona snapshot to launch from. Mutually exclusive with 'image'; when neither is set Daytona uses its default snapshot.",
|
|
437
|
+
)
|
|
438
|
+
env_vars: dict[str, str] = Field(default_factory=dict, description="Environment variables set inside the sandbox")
|
|
439
|
+
|
|
440
|
+
@model_validator(mode="after")
|
|
441
|
+
def _image_snapshot_exclusive(self) -> "_SandboxDaytonaConfig":
|
|
442
|
+
"""A sandbox launches from exactly one base — reject configuring both."""
|
|
443
|
+
if self.image and self.snapshot:
|
|
444
|
+
raise ValueError("daytona config sets both 'image' and 'snapshot'; they are mutually exclusive — pick one")
|
|
445
|
+
return self
|
|
430
446
|
|
|
431
447
|
|
|
432
448
|
class _SandboxBedrockAgentCoreConfig(BaseModel):
|
|
@@ -446,10 +462,10 @@ class _SandboxEC2SSMConfig(BaseModel):
|
|
|
446
462
|
attach_to: Optional[str] = Field(default=None, description="EC2 instance id to run commands against via SSM (attach-only)")
|
|
447
463
|
|
|
448
464
|
|
|
449
|
-
class
|
|
465
|
+
class _ExecutionBrokerConfig(BaseModel):
|
|
450
466
|
flavor: str = Field(
|
|
451
467
|
default="thread",
|
|
452
|
-
description="Broker flavor: 'embedded' | 'thread' (in-process, available now) | a dotted path to
|
|
468
|
+
description="Broker flavor: 'embedded' | 'thread' (in-process, available now) | a dotted path to an ExecutionBroker subclass. The AWS 'sqs' flavor is planned in a later iteration.",
|
|
453
469
|
)
|
|
454
470
|
wait_timeout: float = Field(default=60.0, description="Max seconds a synchronous wait blocks before promotion to a task (0 = always promote)")
|
|
455
471
|
inline_payload_max_bytes: int = Field(
|
|
@@ -478,6 +494,12 @@ class _SandboxProfileConfig(BaseModel):
|
|
|
478
494
|
pattern="^(per_call|per_session|per_runtime)$",
|
|
479
495
|
description="Sandbox lifetime: 'per_call' (new per execution), 'per_session' (per AK session), or 'per_runtime' (shared)",
|
|
480
496
|
)
|
|
497
|
+
environment: str = Field(
|
|
498
|
+
default="managed",
|
|
499
|
+
pattern="^(managed|attached)$",
|
|
500
|
+
description="Environment lifecycle: 'managed' (the provider creates and disposes sandboxes) or 'attached' "
|
|
501
|
+
"(deliberately connect to an existing environment the framework never owns; requires the provider's attach_to)",
|
|
502
|
+
)
|
|
481
503
|
idle_timeout: int = Field(default=1800, description="Seconds of inactivity before a sandbox session is closed on next touch")
|
|
482
504
|
identity: _SandboxIdentityConfig = Field(default_factory=_SandboxIdentityConfig, description="Execution identity configuration")
|
|
483
505
|
policy: _SandboxPolicyConfig = Field(
|
|
@@ -508,7 +530,7 @@ class _SandboxConfig(BaseModel):
|
|
|
508
530
|
default=None, description="Dotted path to a PrincipalResolver mapping the session/agent to a SandboxPrincipal"
|
|
509
531
|
)
|
|
510
532
|
tool_output_max_chars: int = Field(default=8000, description="Maximum characters of tool output returned to the agent before truncation")
|
|
511
|
-
broker:
|
|
533
|
+
broker: _ExecutionBrokerConfig = Field(default_factory=_ExecutionBrokerConfig, description="Sandbox broker configuration")
|
|
512
534
|
profiles: dict[str, _SandboxProfileConfig] = Field(
|
|
513
535
|
default_factory=dict, description="Named workload profiles, each selecting a provider and its policy/identity"
|
|
514
536
|
)
|
|
@@ -522,6 +544,11 @@ class _SandboxConfig(BaseModel):
|
|
|
522
544
|
pattern="^(per_call|per_session|per_runtime)$",
|
|
523
545
|
description="Single-backend sugar: scope for the synthesized default profile",
|
|
524
546
|
)
|
|
547
|
+
environment: Optional[str] = Field(
|
|
548
|
+
default=None,
|
|
549
|
+
pattern="^(managed|attached)$",
|
|
550
|
+
description="Single-backend sugar: environment lifecycle for the synthesized default profile",
|
|
551
|
+
)
|
|
525
552
|
local_subprocess: Optional[_SandboxLocalSubprocessConfig] = Field(
|
|
526
553
|
default=None, description="Single-backend sugar: 'local_subprocess' provider configuration"
|
|
527
554
|
)
|
|
@@ -554,6 +581,8 @@ class _SandboxConfig(BaseModel):
|
|
|
554
581
|
}
|
|
555
582
|
if self.scope is not None:
|
|
556
583
|
profile_kwargs["scope"] = self.scope
|
|
584
|
+
if self.environment is not None:
|
|
585
|
+
profile_kwargs["environment"] = self.environment
|
|
557
586
|
self.profiles = {self.default_profile: _SandboxProfileConfig(**profile_kwargs)}
|
|
558
587
|
return self
|
|
559
588
|
|
|
@@ -41,6 +41,8 @@ class AzureFunctions:
|
|
|
41
41
|
|
|
42
42
|
if isinstance(body, dict) and body.get("body") is not None:
|
|
43
43
|
body = BaseRunRequest.model_validate(body["body"])
|
|
44
|
+
elif isinstance(body, dict) and body:
|
|
45
|
+
body = BaseRunRequest.model_validate(body)
|
|
44
46
|
else:
|
|
45
47
|
raise ValueError("Invalid request, request body cannot be empty or null")
|
|
46
48
|
|
|
@@ -11,9 +11,9 @@ providers, and broker flavors stay internal.
|
|
|
11
11
|
"""
|
|
12
12
|
|
|
13
13
|
from . import errors
|
|
14
|
-
from .base import Sandbox, SandboxProvider
|
|
15
|
-
from .broker.base import
|
|
16
|
-
from .manager import
|
|
14
|
+
from .base import AttachedEnvironment, AttachedEnvironmentProvider, Sandbox, SandboxProvider
|
|
15
|
+
from .broker.base import ExecutionBroker
|
|
16
|
+
from .manager import ExecutionManager
|
|
17
17
|
from .model import (
|
|
18
18
|
IsolationTier,
|
|
19
19
|
SandboxCapabilities,
|
|
@@ -30,8 +30,10 @@ __all__ = [
|
|
|
30
30
|
"errors",
|
|
31
31
|
"Sandbox",
|
|
32
32
|
"SandboxProvider",
|
|
33
|
-
"
|
|
34
|
-
"
|
|
33
|
+
"AttachedEnvironmentProvider",
|
|
34
|
+
"AttachedEnvironment",
|
|
35
|
+
"ExecutionBroker",
|
|
36
|
+
"ExecutionManager",
|
|
35
37
|
"PrincipalResolver",
|
|
36
38
|
"AgentPrincipalResolver",
|
|
37
39
|
"IsolationTier",
|
|
@@ -12,7 +12,7 @@ from typing import ClassVar
|
|
|
12
12
|
|
|
13
13
|
from pydantic import BaseModel
|
|
14
14
|
|
|
15
|
-
from .errors import SandboxCapabilityError
|
|
15
|
+
from .errors import SandboxCapabilityError, SandboxConfigError
|
|
16
16
|
from .model import SandboxCapabilities, SandboxPolicy, SandboxPrincipal, SandboxResult
|
|
17
17
|
|
|
18
18
|
|
|
@@ -20,7 +20,7 @@ class Sandbox(ABC):
|
|
|
20
20
|
"""Handle to one live sandbox. Created by a ``SandboxProvider``, never constructed directly.
|
|
21
21
|
|
|
22
22
|
Concurrency: a ``Sandbox`` instance is used only from the event loop that created it,
|
|
23
|
-
with at most one in-flight execute call. Callers (``
|
|
23
|
+
with at most one in-flight execute call. Callers (``ExecutionManager`` / broker worker)
|
|
24
24
|
uphold this via a per-``sandbox_session_id`` lock; providers may assume it.
|
|
25
25
|
"""
|
|
26
26
|
|
|
@@ -110,3 +110,45 @@ class SandboxProvider(ABC):
|
|
|
110
110
|
@abstractmethod
|
|
111
111
|
async def destroy(self, sandbox_id: str) -> None:
|
|
112
112
|
"""Permanently dispose backend state. Idempotent; unknown ids are a no-op."""
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
class AttachedEnvironment(Sandbox):
|
|
116
|
+
"""Handle to an environment the framework connects to but never owns.
|
|
117
|
+
|
|
118
|
+
The handle counterpart of ``AttachedEnvironmentProvider``: where a ``Sandbox`` handle
|
|
119
|
+
fronts something the provider created (and will eventually destroy), an ``AttachedEnvironment``
|
|
120
|
+
fronts something that already exists independently — an EC2 instance, a running pod, a
|
|
121
|
+
production service. Concrete attach-only handles subclass this instead of ``Sandbox``
|
|
122
|
+
so their names stop claiming sandbox-ness (e.g. ``EC2SSMEnvironment``).
|
|
123
|
+
|
|
124
|
+
The one lifecycle rule it fixes: ``close()`` is a no-op — releasing the handle must
|
|
125
|
+
never affect an environment that runs independently of the framework.
|
|
126
|
+
"""
|
|
127
|
+
|
|
128
|
+
async def close(self) -> None:
|
|
129
|
+
"""Nothing to release — the environment runs independently of the framework. Idempotent."""
|
|
130
|
+
return None
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
class AttachedEnvironmentProvider(SandboxProvider):
|
|
134
|
+
"""Base for attach-only providers: environments the framework connects to but never owns.
|
|
135
|
+
|
|
136
|
+
Subclasses bind to something that already exists (an EC2 instance, a running pod, a
|
|
137
|
+
production service) and therefore implement only ``attach``, returning an
|
|
138
|
+
``AttachedEnvironment`` handle. This base fixes the lifecycle non-ownership once: ``create``
|
|
139
|
+
binds to the configured ``attach_to`` target (never provisions) and ``destroy`` is a
|
|
140
|
+
no-op (never disposes). Declare ``provisions=False`` and ``attaches_external=True`` in
|
|
141
|
+
``capabilities``; profiles selecting such a provider must opt in with
|
|
142
|
+
``environment: attached``.
|
|
143
|
+
"""
|
|
144
|
+
|
|
145
|
+
async def create(self, *, principal: SandboxPrincipal, policy: SandboxPolicy) -> Sandbox:
|
|
146
|
+
"""Bind to the configured ``attach_to`` target — attach-only providers never provision."""
|
|
147
|
+
attach_to = getattr(self._config, "attach_to", None)
|
|
148
|
+
if not attach_to:
|
|
149
|
+
raise SandboxConfigError(f"{self.__class__.__name__} is attach-only: configure the profile's attach_to with the target to connect to")
|
|
150
|
+
return await self.attach(attach_to, principal=principal, policy=policy)
|
|
151
|
+
|
|
152
|
+
async def destroy(self, sandbox_id: str) -> None:
|
|
153
|
+
"""No-op — the provider never owns the environment, so there is nothing to dispose."""
|
|
154
|
+
return None
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"""Sandbox broker: decouples the agentic system from sandbox execution.
|
|
2
2
|
|
|
3
|
-
The broker's message models and ``
|
|
3
|
+
The broker's message models and ``ExecutionBroker`` ABC live in ``base``; the
|
|
4
4
|
flavor-independent execution engine in ``worker`` (``BrokerWorkerCore``); and the
|
|
5
5
|
individual flavors in their own modules (``embedded`` and ``thread`` here; the AWS
|
|
6
6
|
``sqs`` flavor lands in a later iteration). Flavors are resolved lazily by
|
|
7
|
-
``
|
|
7
|
+
``ExecutionBrokerFactory`` so importing this package pulls in no flavor by default.
|
|
8
8
|
"""
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"""Broker wire contract and the ``
|
|
1
|
+
"""Broker wire contract and the ``ExecutionBroker`` ABC.
|
|
2
2
|
|
|
3
|
-
``
|
|
4
|
-
the agent-side ``
|
|
3
|
+
``ExecutionRequest``/``ExecutionCompletion`` are the public messages exchanged between
|
|
4
|
+
the agent-side ``ExecutionManager`` and a broker worker. They are self-sufficient — a request
|
|
5
5
|
carries the resolved principal, policy, and the sandbox session (including the reconnect
|
|
6
6
|
handle) so a remote worker needs nothing else to execute it.
|
|
7
7
|
"""
|
|
@@ -18,30 +18,30 @@ BrokerOperation = Literal["execute_code", "execute_command", "install_packages",
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
class BoundedCompletionStore:
|
|
21
|
-
"""A bounded, LRU-evicting ``task_id ->
|
|
21
|
+
"""A bounded, LRU-evicting ``task_id -> ExecutionCompletion`` map for the in-process broker
|
|
22
22
|
flavors, so a long-running server does not accumulate one completion per execution for the
|
|
23
23
|
process lifetime. The cap only bounds the tail: a completion is normally dropped as soon as
|
|
24
|
-
``
|
|
24
|
+
``ExecutionManager`` consumes it (``discard``), and promoted tasks are polled within seconds —
|
|
25
25
|
far inside the cap — while synchronous results are never polled at all and just age out."""
|
|
26
26
|
|
|
27
27
|
def __init__(self, maxlen: int = 1024) -> None:
|
|
28
28
|
self._maxlen = maxlen
|
|
29
|
-
self._items: "OrderedDict[str,
|
|
29
|
+
self._items: "OrderedDict[str, ExecutionCompletion]" = OrderedDict()
|
|
30
30
|
|
|
31
|
-
def set(self, task_id: str, completion: "
|
|
31
|
+
def set(self, task_id: str, completion: "ExecutionCompletion") -> None:
|
|
32
32
|
self._items[task_id] = completion
|
|
33
33
|
self._items.move_to_end(task_id)
|
|
34
34
|
while len(self._items) > self._maxlen:
|
|
35
35
|
self._items.popitem(last=False) # evict the oldest
|
|
36
36
|
|
|
37
|
-
def get(self, task_id: str) -> Optional["
|
|
37
|
+
def get(self, task_id: str) -> Optional["ExecutionCompletion"]:
|
|
38
38
|
return self._items.get(task_id)
|
|
39
39
|
|
|
40
40
|
def discard(self, task_id: str) -> None:
|
|
41
41
|
self._items.pop(task_id, None)
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-
class
|
|
44
|
+
class ExecutionRequest(BaseModel):
|
|
45
45
|
task_id: str
|
|
46
46
|
operation: BrokerOperation
|
|
47
47
|
payload: dict[str, Any] = Field(default_factory=dict) # operation arguments
|
|
@@ -54,7 +54,7 @@ class SandboxBrokerRequest(BaseModel):
|
|
|
54
54
|
wait_deadline: Optional[float] = None # epoch seconds; None = caller will not wait
|
|
55
55
|
|
|
56
56
|
|
|
57
|
-
class
|
|
57
|
+
class ExecutionCompletion(BaseModel):
|
|
58
58
|
task_id: str
|
|
59
59
|
status: Literal["succeeded", "failed", "timed_out"]
|
|
60
60
|
result: Optional[SandboxResult] = None # inline when small
|
|
@@ -63,7 +63,7 @@ class SandboxCompletion(BaseModel):
|
|
|
63
63
|
sandbox_session: SandboxSession # updated handle (e.g. newly created sandbox_id)
|
|
64
64
|
|
|
65
65
|
|
|
66
|
-
class
|
|
66
|
+
class ExecutionBroker(ABC):
|
|
67
67
|
"""Transport between the agent-side manager and the execution engine.
|
|
68
68
|
|
|
69
69
|
In-process flavors (``embedded``, ``thread``) run ``BrokerWorkerCore`` locally; the AWS
|
|
@@ -71,12 +71,12 @@ class SandboxBroker(ABC):
|
|
|
71
71
|
"""
|
|
72
72
|
|
|
73
73
|
@abstractmethod
|
|
74
|
-
async def submit(self, request:
|
|
74
|
+
async def submit(self, request: ExecutionRequest, wait: Optional[float]) -> Union[SandboxResult, SandboxTask]:
|
|
75
75
|
"""Submit a request. Returns a ``SandboxResult`` when it completes within ``wait``,
|
|
76
76
|
or a ``SandboxTask`` handle when execution is promoted to run asynchronously."""
|
|
77
77
|
|
|
78
78
|
@abstractmethod
|
|
79
|
-
async def result(self, task_id: str) -> Optional[
|
|
79
|
+
async def result(self, task_id: str) -> Optional[ExecutionCompletion]:
|
|
80
80
|
"""Return the completion for a previously submitted task, or None if not yet available."""
|
|
81
81
|
|
|
82
82
|
async def discard(self, task_id: str) -> None:
|
|
@@ -11,18 +11,18 @@ from typing import Optional, Union
|
|
|
11
11
|
from pydantic import BaseModel
|
|
12
12
|
|
|
13
13
|
from ..model import SandboxResult, SandboxTask
|
|
14
|
-
from .base import BoundedCompletionStore,
|
|
14
|
+
from .base import BoundedCompletionStore, ExecutionBroker, ExecutionCompletion, ExecutionRequest
|
|
15
15
|
from .worker import BrokerWorkerCore
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
class EmbeddedBroker(
|
|
18
|
+
class EmbeddedBroker(ExecutionBroker):
|
|
19
19
|
def __init__(self, config: Optional[BaseModel] = None) -> None:
|
|
20
20
|
"""Create the broker with its own in-process ``BrokerWorkerCore``; ``config`` (the
|
|
21
21
|
``sandbox.broker`` block) is accepted for factory uniformity but unused."""
|
|
22
22
|
self._worker = BrokerWorkerCore()
|
|
23
23
|
self._completions = BoundedCompletionStore()
|
|
24
24
|
|
|
25
|
-
async def submit(self, request:
|
|
25
|
+
async def submit(self, request: ExecutionRequest, wait: Optional[float] = None) -> Union[SandboxResult, SandboxTask]:
|
|
26
26
|
"""Run the request inline to completion and return its ``SandboxResult``.
|
|
27
27
|
|
|
28
28
|
``wait`` is ignored (always synchronous, never promotes). ``run()`` raises the real
|
|
@@ -30,10 +30,12 @@ class EmbeddedBroker(SandboxBroker):
|
|
|
30
30
|
layer) sees the true exception type.
|
|
31
31
|
"""
|
|
32
32
|
result, session = await self._worker.run(request)
|
|
33
|
-
self._completions.set(
|
|
33
|
+
self._completions.set(
|
|
34
|
+
request.task_id, ExecutionCompletion(task_id=request.task_id, status="succeeded", result=result, sandbox_session=session)
|
|
35
|
+
)
|
|
34
36
|
return result
|
|
35
37
|
|
|
36
|
-
async def result(self, task_id: str) -> Optional[
|
|
38
|
+
async def result(self, task_id: str) -> Optional[ExecutionCompletion]:
|
|
37
39
|
"""Return the completion recorded for ``task_id`` in this process, or ``None``."""
|
|
38
40
|
return self._completions.get(task_id)
|
|
39
41
|
|
|
@@ -8,7 +8,7 @@ the response future back to the caller's loop:
|
|
|
8
8
|
``SandboxError``, matching the embedded flavor).
|
|
9
9
|
* ``wait=N`` bounds the wait; on expiry the execution is promoted to a ``SandboxTask``
|
|
10
10
|
and continues on the broker thread. Its completion is kept in worker memory and,
|
|
11
|
-
because the process is shared, ``result()`` serves it to ``
|
|
11
|
+
because the process is shared, ``result()`` serves it to ``ExecutionManager.task_status``.
|
|
12
12
|
|
|
13
13
|
Concurrency contract: every provider handle is created and used only on the broker
|
|
14
14
|
thread's loop — callers never touch one.
|
|
@@ -23,15 +23,15 @@ from typing import Optional, Union
|
|
|
23
23
|
|
|
24
24
|
from pydantic import BaseModel
|
|
25
25
|
|
|
26
|
-
from ..errors import
|
|
26
|
+
from ..errors import ExecutionBrokerError, SandboxTimeoutError
|
|
27
27
|
from ..model import SandboxResult, SandboxTask
|
|
28
|
-
from .base import BoundedCompletionStore,
|
|
28
|
+
from .base import BoundedCompletionStore, ExecutionBroker, ExecutionCompletion, ExecutionRequest
|
|
29
29
|
from .worker import BrokerWorkerCore
|
|
30
30
|
|
|
31
31
|
logger = logging.getLogger("ak.sandbox.broker")
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
class ThreadBroker(
|
|
34
|
+
class ThreadBroker(ExecutionBroker):
|
|
35
35
|
"""In-process broker running executions on a dedicated daemon thread."""
|
|
36
36
|
|
|
37
37
|
def __init__(self, config: Optional[BaseModel] = None) -> None:
|
|
@@ -56,7 +56,7 @@ class ThreadBroker(SandboxBroker):
|
|
|
56
56
|
if self._thread is not None:
|
|
57
57
|
return
|
|
58
58
|
if self._closed:
|
|
59
|
-
raise
|
|
59
|
+
raise ExecutionBrokerError("sandbox thread broker is closed")
|
|
60
60
|
self._thread = threading.Thread(target=self._run_loop, name="ak-sandbox-broker", daemon=True)
|
|
61
61
|
self._thread.start()
|
|
62
62
|
self._ready.wait()
|
|
@@ -100,7 +100,7 @@ class ThreadBroker(SandboxBroker):
|
|
|
100
100
|
|
|
101
101
|
# -- request path -------------------------------------------------------- #
|
|
102
102
|
|
|
103
|
-
async def submit(self, request:
|
|
103
|
+
async def submit(self, request: ExecutionRequest, wait: Optional[float] = None) -> Union[SandboxResult, SandboxTask]:
|
|
104
104
|
"""Enqueue the request on the broker loop and await its result.
|
|
105
105
|
|
|
106
106
|
``wait=None`` awaits indefinitely; ``wait=N`` promotes to a ``SandboxTask`` on
|
|
@@ -127,7 +127,7 @@ class ThreadBroker(SandboxBroker):
|
|
|
127
127
|
submitted_at=time.time(),
|
|
128
128
|
)
|
|
129
129
|
|
|
130
|
-
async def _handle(self, request:
|
|
130
|
+
async def _handle(self, request: ExecutionRequest, response: concurrent.futures.Future) -> None:
|
|
131
131
|
"""Run one request on the broker loop; store its completion and deliver the result
|
|
132
132
|
(or the real exception) to a caller that is still waiting."""
|
|
133
133
|
try:
|
|
@@ -142,16 +142,16 @@ class ThreadBroker(SandboxBroker):
|
|
|
142
142
|
else:
|
|
143
143
|
self._completions.set(
|
|
144
144
|
request.task_id,
|
|
145
|
-
|
|
145
|
+
ExecutionCompletion(task_id=request.task_id, status="succeeded", result=result, sandbox_session=session),
|
|
146
146
|
)
|
|
147
147
|
if not response.done():
|
|
148
148
|
response.set_result(result)
|
|
149
149
|
|
|
150
|
-
def _complete(self, request:
|
|
150
|
+
def _complete(self, request: ExecutionRequest, status: str, *, error: str) -> None:
|
|
151
151
|
"""Record a terminal failure completion for ``result()`` lookups."""
|
|
152
152
|
self._completions.set(
|
|
153
153
|
request.task_id,
|
|
154
|
-
|
|
154
|
+
ExecutionCompletion(task_id=request.task_id, status=status, error=error, sandbox_session=request.sandbox_session),
|
|
155
155
|
)
|
|
156
156
|
|
|
157
157
|
@staticmethod
|
|
@@ -161,7 +161,7 @@ class ThreadBroker(SandboxBroker):
|
|
|
161
161
|
if not response.done():
|
|
162
162
|
response.set_exception(exc)
|
|
163
163
|
|
|
164
|
-
async def result(self, task_id: str) -> Optional[
|
|
164
|
+
async def result(self, task_id: str) -> Optional[ExecutionCompletion]:
|
|
165
165
|
"""Return the completion held in worker memory for ``task_id``, or ``None``."""
|
|
166
166
|
return self._completions.get(task_id)
|
|
167
167
|
|