agentbyte 0.32.0__tar.gz → 0.32.2__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.
- {agentbyte-0.32.0 → agentbyte-0.32.2}/CHANGELOG.md +13 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/PKG-INFO +2 -2
- {agentbyte-0.32.0 → agentbyte-0.32.2}/README.md +1 -1
- {agentbyte-0.32.0 → agentbyte-0.32.2}/pyproject.toml +2 -0
- agentbyte-0.32.2/src/agentbyte/__about__.py +2 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/eval/history/recorder.py +4 -24
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/eval/history/sql.py +21 -14
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/eval/history/sqlite.py +18 -12
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/eval/history/store.py +21 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/llm/__init__.py +60 -17
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/presets/clients.py +5 -5
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/eval/test_eval_history.py +35 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/presets/test_clients.py +7 -10
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/test_package_api.py +23 -0
- agentbyte-0.32.0/src/agentbyte/__about__.py +0 -2
- {agentbyte-0.32.0 → agentbyte-0.32.2}/.gitignore +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/LICENSE +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/agents/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/agents/agent.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/agents/agent_as_tool.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/agents/base.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/agents/embedding_agent.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/agents/types.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/cancellation_token.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/catalog.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/cli/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/cli/main.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/compaction/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/compaction/counters.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/compaction/errors.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/compaction/grouping.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/compaction/strategies.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/component.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/context.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/context_providers/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/context_providers/base.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/context_providers/skill_tools.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/context_providers/skills.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/dataset/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/dataset/base.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/dataset/config.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/dataset/importer.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/dataset/json.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/dataset/loader.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/dataset/publish.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/dataset/publish_config.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/dataset/publishers.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/dataset/sources.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/dataset/sqlite.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/dataset/sqlite_db.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/dataset/write_config.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/dataset/writers.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/entity.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/eval/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/eval/base.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/eval/checks/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/eval/checks/decorator.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/eval/checks/keyword.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/eval/checks/local.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/eval/checks/process.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/eval/checks/tool.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/eval/checks/types.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/eval/comparison.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/eval/eval_dataset.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/eval/history/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/eval/history/conformance.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/eval/history/errors.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/eval/history/models.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/eval/history/transitions.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/eval/judges/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/eval/judges/base.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/eval/judges/composite.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/eval/judges/llm.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/eval/judges/pairwise.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/eval/judges/reference.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/eval/judges/trajectory.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/eval/judges/validation.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/eval/pairwise.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/eval/report.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/eval/runner.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/eval/splitting.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/eval/targets/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/eval/targets/agent.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/eval/targets/model.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/eval/targets/multi_turn.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/eval/targets/orchestrator.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/eval/targets/runtime.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/eval/targets/workflow.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/eval/types.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/execution_trace/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/execution_trace/collector.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/execution_trace/models.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/llm/_retry_observability.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/llm/auth.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/llm/azure/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/llm/azure/auth.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/llm/azure/chat.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/llm/azure/embedding.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/llm/azure/settings.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/llm/azure_openai.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/llm/azure_openai_embedding.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/llm/base.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/llm/embeddings_base.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/llm/openai/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/llm/openai/chat.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/llm/openai/embedding.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/llm/openai/settings.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/llm/openai_embedding.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/llm/pricing.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/llm/retry_policy.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/llm/settings.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/llm/types.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/logger.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/memory/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/memory/base.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/messages.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/middleware/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/middleware/base.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/middleware/otel.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/middleware/retry.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/middleware/sql_usage.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/middleware/usage_logger.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/notebook.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/optim/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/optim/base.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/optim/config.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/optim/gepa.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/optim/mipro.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/optim/pareto.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/optim/reflective.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/optim/spec.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/optim/trace.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/orchestration/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/orchestration/ai.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/orchestration/base.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/orchestration/handoff.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/orchestration/plan.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/orchestration/policies.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/orchestration/round_robin.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/presets/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/presets/agents.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/presets/instruction_registry.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/presets/instructions/orchestrator.yaml +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/presets/instructions/query_rewriter.yaml +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/presets/instructions/researcher.yaml +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/presets/instructions/reviewer.yaml +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/presets/instructions/writer.yaml +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/presets/orchestration.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/presets/skills/contracts-analyst/SKILL.md +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/presets/skills/hr-analyst/SKILL.md +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/presets/skills/hr-analyst/resources/departments.md +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/presets/skills/hr-analyst/resources/employees.md +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/presets/skills/hr-analyst/resources/payroll.md +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/presets/streaming.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/presets/workflow.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/session_store.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/skills/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/skills/base.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/skills/resources.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/skills/scripts.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/skills/sources.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/skills/validation.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/termination/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/termination/base.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/termination/cancellation.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/termination/composite.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/termination/consecutive_agent.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/termination/external.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/termination/function_call.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/termination/handoff.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/termination/max_message.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/termination/predicate.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/termination/source.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/termination/text_mention.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/termination/timeout.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/termination/token_usage.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/tools/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/tools/base.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/tools/coding_tools.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/tools/core_tools.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/tools/decorator.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/tools/memory_tool.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/tools/research_tools.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/types.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/webui/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/webui/discovery.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/webui/execution.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/webui/models.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/webui/registry.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/webui/server.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/webui/session_store.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/webui/sessions.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/webui/ui/assets/index-BF3DwXaF.js +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/webui/ui/assets/index-ar5tOeqt.css +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/webui/ui/index.html +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/webui/ui/vite.svg +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/workflow/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/workflow/agent.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/workflow/core/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/workflow/core/_structure_hash.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/workflow/core/checkpoint.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/workflow/core/models.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/workflow/core/runner.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/workflow/core/workflow.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/workflow/defaults.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/workflow/errors.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/workflow/loader.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/workflow/schema.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/workflow/schema_utils.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/workflow/sqlite_checkpoint.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/workflow/steps/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/workflow/steps/agent.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/workflow/steps/echo.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/workflow/steps/function.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/workflow/steps/http.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/workflow/steps/step.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/workflow/steps/subworkflow.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/workflow/steps/transform.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/src/agentbyte/workflow/visualizer.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/agents/test_agent_as_tool.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/agents/test_agent_basic.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/agents/test_agent_context_providers.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/agents/test_agent_error_response.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/agents/test_agent_event_types.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/agents/test_agent_memory_integration.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/agents/test_agent_middleware_integration.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/agents/test_agent_response_accessors.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/agents/test_agent_retry_middleware.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/agents/test_agent_stream_events.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/agents/test_embedding_agent.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/agents/test_tool_approval.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/agents/test_tool_batch_resolution.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/agents/test_tool_metadata.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/cli/test_registry_check.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/compaction/test_compaction.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/context_providers/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/context_providers/test_skill_tools.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/context_providers/test_skills_provider.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/dataset/test_loader.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/dataset/test_multi_table.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/dataset/test_publish.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/dataset/test_sqlite_db.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/eval/test_eval_dataset.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/eval/test_eval_history_backends.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/eval/test_execution_trajectories.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/eval/test_multi_turn.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/eval/test_pairwise.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/eval/test_phase1_runner_and_targets.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/eval/test_phase2_checks_and_reports.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/eval/test_score_integrity.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/eval/test_splitting.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/eval/test_types_and_judges.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/examples/test_compaction_webapp.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/llm/test_azure_client.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/llm/test_azure_embedding_client.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/llm/test_llm_types.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/llm/test_openai_client.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/llm/test_openai_embedding_client.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/llm/test_pricing.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/llm/test_retry_observability.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/llm/test_retry_policy_api.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/llm/test_retryable_error_substrings.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/memory/test_memory.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/middleware/test_context_compaction.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/middleware/test_deduplicate_tool_result.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/middleware/test_middleware_chain.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/middleware/test_otel.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/middleware/test_retry_middleware.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/middleware/test_sql_usage.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/middleware/test_usage_logger.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/optim/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/optim/test_base.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/optim/test_base_integration.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/optim/test_config.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/optim/test_gepa.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/optim/test_mipro.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/optim/test_pareto.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/optim/test_reflective.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/optim/test_score_integrity.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/optim/test_spec.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/optim/test_trace.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/orchestration/test_ai_orchestrator.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/orchestration/test_base_orchestrator.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/orchestration/test_handoff_orchestrator.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/orchestration/test_orchestrator_finalization.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/orchestration/test_plan_orchestrator.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/orchestration/test_round_robin.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/presets/test_agents.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/presets/test_instruction_registry.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/presets/test_orchestration.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/presets/test_streaming.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/presets/test_workflow.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/skills/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/skills/test_base.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/skills/test_resources.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/skills/test_scripts.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/skills/test_sources.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/termination/test_base.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/termination/test_cancellation.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/termination/test_composite.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/termination/test_consecutive_agent.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/termination/test_external.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/termination/test_function_call.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/termination/test_handoff.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/termination/test_max_message.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/termination/test_predicate.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/termination/test_source.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/termination/test_text_mention.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/termination/test_timeout.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/termination/test_token_usage.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/test_cancellation_token.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/test_context.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/test_logger.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/test_messages.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/test_session_store.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/test_types.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/test_vanilla_chunker.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/tools/test_coding_tools.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/tools/test_memory_tool.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/tools/test_research_tools.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/tools/test_tools.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/webui/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/webui/helpers.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/webui/test_execution.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/webui/test_package_api.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/webui/test_registry.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/webui/test_server.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/webui/test_sessions.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/webui/test_workflow_streaming.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/workflow/recovery_worker.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/workflow/test_agent_step_imports.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/workflow/test_checkpoint.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/workflow/test_subworkflow_step.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/workflow/test_workflow_agent.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/workflow/test_workflow_class.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/workflow/test_workflow_models.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/workflow/test_workflow_reliability.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/workflow/test_workflow_runner.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/workflow/test_workflow_schema.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/workflow/test_workflow_steps.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.2}/tests/workflow/test_workflow_visualizer.py +0 -0
|
@@ -6,6 +6,19 @@ The format follows Keep a Changelog principles and semantic versioning.
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.32.2] - 2026-10-01
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- `import agentbyte` no longer requires the `openai` package. OpenAI and Azure OpenAI clients in `agentbyte.llm` are imported on first use; without the extra, using them raises `ModuleNotFoundError` naming the extra to install (`pip install 'agentbyte[openai]'` or `'agentbyte[azureopenai]'`). `agentbyte.presets.build_chat_client` imports the provider client it needs at call time.
|
|
14
|
+
|
|
15
|
+
## [0.32.1] - 2026-09-30
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- Evaluation history stores (`SQLiteEvalRunStore`, `SqlEvalRunStore`): a write that has started now commits or rolls back before a cancellation is delivered. Previously, cancelling a worker mid-write (for example by closing `evaluate_stream()` early) could leave the store lock held and hang `finish_run` on slow machines.
|
|
20
|
+
- CI: pytest dumps thread stacks after 60 s without progress (`faulthandler_timeout`), and the test job times out after 20 minutes instead of 1 hour.
|
|
21
|
+
|
|
9
22
|
## [0.32.0] - 2026-09-30
|
|
10
23
|
|
|
11
24
|
Upgrade notes (breaking):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: agentbyte
|
|
3
|
-
Version: 0.32.
|
|
3
|
+
Version: 0.32.2
|
|
4
4
|
Summary: A toolkit for designing multiagent systems
|
|
5
5
|
Author-email: MrDataPsycho <mr.data.psycho@gmail.com>
|
|
6
6
|
License-Expression: LicenseRef-Proprietary
|
|
@@ -90,7 +90,7 @@ Description-Content-Type: text/markdown
|
|
|
90
90
|
|
|
91
91
|
Agentbyte is an observability-first agentic AI framework for building and studying multiagent systems with a learning-first, implementation-oriented workflow.
|
|
92
92
|
|
|
93
|
-
Current release: **0.32.
|
|
93
|
+
Current release: **0.32.2**
|
|
94
94
|
|
|
95
95
|
## Building an Agent
|
|
96
96
|
|
|
@@ -4,8 +4,7 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
import asyncio
|
|
6
6
|
import contextlib
|
|
7
|
-
from collections.abc import AsyncIterator,
|
|
8
|
-
from typing import TypeVar
|
|
7
|
+
from collections.abc import AsyncIterator, Sequence
|
|
9
8
|
|
|
10
9
|
from agentbyte.cancellation_token import CancellationToken
|
|
11
10
|
from agentbyte.eval.base import BaseEvalTarget
|
|
@@ -28,30 +27,11 @@ from .models import (
|
|
|
28
27
|
task_type,
|
|
29
28
|
utc_now,
|
|
30
29
|
)
|
|
31
|
-
from .store import EvalRunStore
|
|
32
|
-
|
|
33
|
-
T = TypeVar("T")
|
|
30
|
+
from .store import EvalRunStore, _uninterrupted
|
|
34
31
|
|
|
35
32
|
_DONE = object()
|
|
36
33
|
|
|
37
34
|
|
|
38
|
-
async def _settle(awaitable: Awaitable[T]) -> T:
|
|
39
|
-
"""Finish a cleanup write even if the caller is cancelled meanwhile."""
|
|
40
|
-
task = asyncio.ensure_future(awaitable)
|
|
41
|
-
cancelled = False
|
|
42
|
-
while not task.done():
|
|
43
|
-
try:
|
|
44
|
-
await asyncio.shield(task)
|
|
45
|
-
except asyncio.CancelledError:
|
|
46
|
-
if task.done():
|
|
47
|
-
break
|
|
48
|
-
cancelled = True
|
|
49
|
-
if cancelled:
|
|
50
|
-
task.result()
|
|
51
|
-
raise asyncio.CancelledError()
|
|
52
|
-
return task.result()
|
|
53
|
-
|
|
54
|
-
|
|
55
35
|
def _error_code(exc: BaseException) -> str:
|
|
56
36
|
if isinstance(exc, EvalRedactionError):
|
|
57
37
|
return "redaction_error"
|
|
@@ -258,10 +238,10 @@ class EvalRunRecorder:
|
|
|
258
238
|
finally:
|
|
259
239
|
if not driver.done():
|
|
260
240
|
driver.cancel()
|
|
261
|
-
await
|
|
241
|
+
await _uninterrupted(asyncio.wait([driver]))
|
|
262
242
|
code = _error_code(error) if error is not None else None
|
|
263
243
|
try:
|
|
264
|
-
await
|
|
244
|
+
await _uninterrupted(self.store.finish_run(run.id, status, error=code))
|
|
265
245
|
except Exception as finish_error:
|
|
266
246
|
if error is None:
|
|
267
247
|
raise
|
|
@@ -50,7 +50,7 @@ from .models import (
|
|
|
50
50
|
deserialize_evidence,
|
|
51
51
|
serialize_evidence,
|
|
52
52
|
)
|
|
53
|
-
from .store import EvalRunStore
|
|
53
|
+
from .store import EvalRunStore, _uninterrupted
|
|
54
54
|
from .transitions import (
|
|
55
55
|
admit,
|
|
56
56
|
admitted_duplicate,
|
|
@@ -300,19 +300,26 @@ class SqlEvalRunStore(EvalRunStore):
|
|
|
300
300
|
raise EvalHistoryError("History store was opened read-only")
|
|
301
301
|
async with self._lock:
|
|
302
302
|
self._check_open()
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
303
|
+
# A started transaction commits or rolls back before cancellation is
|
|
304
|
+
# delivered, so a cancelled caller never leaves the lock held mid-write.
|
|
305
|
+
return await _uninterrupted(self._transaction(run_id, action, body))
|
|
306
|
+
|
|
307
|
+
async def _transaction(
|
|
308
|
+
self, run_id: str | None, action: str, body: Callable[[AsyncSession], Awaitable[T]]
|
|
309
|
+
) -> T:
|
|
310
|
+
try:
|
|
311
|
+
async with self._session() as session:
|
|
312
|
+
try:
|
|
313
|
+
result = await body(session)
|
|
314
|
+
await session.commit()
|
|
315
|
+
return result
|
|
316
|
+
except BaseException:
|
|
317
|
+
await _settle(session.rollback())
|
|
318
|
+
raise
|
|
319
|
+
except (EvalHistoryError, ValueError):
|
|
320
|
+
raise
|
|
321
|
+
except Exception as exc:
|
|
322
|
+
raise EvalPersistenceError(f"Could not {action}", run_id=run_id) from exc
|
|
316
323
|
|
|
317
324
|
async def _read(self, run_id: str | None, statement: Any) -> list[Any]:
|
|
318
325
|
self._check_open()
|
|
@@ -28,7 +28,7 @@ from .models import (
|
|
|
28
28
|
deserialize_evidence,
|
|
29
29
|
serialize_evidence,
|
|
30
30
|
)
|
|
31
|
-
from .store import EvalRunStore
|
|
31
|
+
from .store import EvalRunStore, _uninterrupted
|
|
32
32
|
from .transitions import (
|
|
33
33
|
admit,
|
|
34
34
|
admitted_duplicate,
|
|
@@ -209,17 +209,23 @@ class SQLiteEvalRunStore(EvalRunStore):
|
|
|
209
209
|
if not self.writer:
|
|
210
210
|
raise EvalHistoryError("History store was opened read-only")
|
|
211
211
|
async with self._lock:
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
212
|
+
# A started transaction commits or rolls back before cancellation is
|
|
213
|
+
# delivered, so a cancelled caller never leaves the lock held mid-write.
|
|
214
|
+
return await _uninterrupted(self._transaction(self._db(), run_id, action, body))
|
|
215
|
+
|
|
216
|
+
async def _transaction(
|
|
217
|
+
self, connection: Any, run_id: str | None, action: str, body: Callable[[Any], Awaitable[T]]
|
|
218
|
+
) -> T:
|
|
219
|
+
try:
|
|
220
|
+
await connection.execute("BEGIN IMMEDIATE")
|
|
221
|
+
result = await body(connection)
|
|
222
|
+
await connection.commit()
|
|
223
|
+
return result
|
|
224
|
+
except BaseException as exc:
|
|
225
|
+
await self._rollback(connection)
|
|
226
|
+
if isinstance(exc, (EvalHistoryError, ValueError)) or not isinstance(exc, Exception):
|
|
227
|
+
raise
|
|
228
|
+
raise EvalPersistenceError(f"Could not {action}", run_id=run_id) from exc
|
|
223
229
|
|
|
224
230
|
async def _read(self, run_id: str | None, sql: str, params: tuple = ()) -> list:
|
|
225
231
|
async with self._lock:
|
|
@@ -4,6 +4,8 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
import asyncio
|
|
6
6
|
from abc import ABC, abstractmethod
|
|
7
|
+
from collections.abc import Awaitable
|
|
8
|
+
from typing import TypeVar
|
|
7
9
|
|
|
8
10
|
from .errors import EvalHistoryConflictError, EvalRunNotFoundError
|
|
9
11
|
from .models import (
|
|
@@ -26,6 +28,25 @@ from .transitions import (
|
|
|
26
28
|
start,
|
|
27
29
|
)
|
|
28
30
|
|
|
31
|
+
T = TypeVar("T")
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
async def _uninterrupted(awaitable: Awaitable[T]) -> T:
|
|
35
|
+
"""Run ``awaitable`` to completion, then deliver any cancellation received meanwhile."""
|
|
36
|
+
task = asyncio.ensure_future(awaitable)
|
|
37
|
+
cancelled = False
|
|
38
|
+
while not task.done():
|
|
39
|
+
try:
|
|
40
|
+
await asyncio.shield(task)
|
|
41
|
+
except asyncio.CancelledError:
|
|
42
|
+
if task.done():
|
|
43
|
+
break
|
|
44
|
+
cancelled = True
|
|
45
|
+
if cancelled:
|
|
46
|
+
task.result()
|
|
47
|
+
raise asyncio.CancelledError()
|
|
48
|
+
return task.result()
|
|
49
|
+
|
|
29
50
|
|
|
30
51
|
class EvalRunStore(ABC):
|
|
31
52
|
"""Durable ledger of evaluation runs and their planned items.
|
|
@@ -33,23 +33,6 @@ from .base import (
|
|
|
33
33
|
)
|
|
34
34
|
from .retry_policy import RetryPolicy
|
|
35
35
|
from .embeddings_base import BaseEmbeddingClient, BaseEmbeddingClientConfig
|
|
36
|
-
from .openai import OpenAIChatCompletionClient, OpenAIChatCompletionClientConfig
|
|
37
|
-
from .openai import OpenAIEmbeddingClient, OpenAIEmbeddingClientConfig
|
|
38
|
-
from .openai import OpenAISettings
|
|
39
|
-
from .azure import (
|
|
40
|
-
AzureOpenAIChatCompletionClient,
|
|
41
|
-
AzureOpenAIChatCompletionClientConfig,
|
|
42
|
-
)
|
|
43
|
-
from .azure import (
|
|
44
|
-
AzureOpenAIEmbeddingClient,
|
|
45
|
-
AzureOpenAIEmbeddingClientConfig,
|
|
46
|
-
)
|
|
47
|
-
from .azure import (
|
|
48
|
-
get_default_token_provider,
|
|
49
|
-
get_certificate_token_provider,
|
|
50
|
-
create_token_provider_from_string,
|
|
51
|
-
)
|
|
52
|
-
from .azure import AzureOpenAISettings, AzureServicePrincipalSettings
|
|
53
36
|
# Import message types and usage from root module (picoagents-aligned)
|
|
54
37
|
from agentbyte.messages import (
|
|
55
38
|
BaseMessage,
|
|
@@ -117,3 +100,63 @@ __all__ = [
|
|
|
117
100
|
"EmbeddingResult",
|
|
118
101
|
"ModelPricing",
|
|
119
102
|
]
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
from typing import TYPE_CHECKING
|
|
106
|
+
|
|
107
|
+
if TYPE_CHECKING: # editors and type checkers see the provider classes eagerly
|
|
108
|
+
from .azure import (
|
|
109
|
+
AzureOpenAIChatCompletionClient,
|
|
110
|
+
AzureOpenAIChatCompletionClientConfig,
|
|
111
|
+
AzureOpenAIEmbeddingClient,
|
|
112
|
+
AzureOpenAIEmbeddingClientConfig,
|
|
113
|
+
AzureOpenAISettings,
|
|
114
|
+
AzureServicePrincipalSettings,
|
|
115
|
+
create_token_provider_from_string,
|
|
116
|
+
get_certificate_token_provider,
|
|
117
|
+
get_default_token_provider,
|
|
118
|
+
)
|
|
119
|
+
from .openai import (
|
|
120
|
+
OpenAIChatCompletionClient,
|
|
121
|
+
OpenAIChatCompletionClientConfig,
|
|
122
|
+
OpenAIEmbeddingClient,
|
|
123
|
+
OpenAIEmbeddingClientConfig,
|
|
124
|
+
OpenAISettings,
|
|
125
|
+
)
|
|
126
|
+
|
|
127
|
+
# Provider clients need optional extras (``openai``, ``azureopenai``); they are
|
|
128
|
+
# imported on first access so ``import agentbyte`` works with core dependencies only.
|
|
129
|
+
_PROVIDER_EXPORTS = {
|
|
130
|
+
"OpenAIChatCompletionClient": ".openai",
|
|
131
|
+
"OpenAIChatCompletionClientConfig": ".openai",
|
|
132
|
+
"OpenAIEmbeddingClient": ".openai",
|
|
133
|
+
"OpenAIEmbeddingClientConfig": ".openai",
|
|
134
|
+
"OpenAISettings": ".openai",
|
|
135
|
+
"AzureOpenAIChatCompletionClient": ".azure",
|
|
136
|
+
"AzureOpenAIChatCompletionClientConfig": ".azure",
|
|
137
|
+
"AzureOpenAIEmbeddingClient": ".azure",
|
|
138
|
+
"AzureOpenAIEmbeddingClientConfig": ".azure",
|
|
139
|
+
"get_default_token_provider": ".azure",
|
|
140
|
+
"get_certificate_token_provider": ".azure",
|
|
141
|
+
"create_token_provider_from_string": ".azure",
|
|
142
|
+
"AzureOpenAISettings": ".azure",
|
|
143
|
+
"AzureServicePrincipalSettings": ".azure",
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
def __getattr__(name: str):
|
|
148
|
+
module_name = _PROVIDER_EXPORTS.get(name)
|
|
149
|
+
if module_name is None:
|
|
150
|
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
|
151
|
+
from importlib import import_module
|
|
152
|
+
|
|
153
|
+
try:
|
|
154
|
+
module = import_module(module_name, __name__)
|
|
155
|
+
except ModuleNotFoundError as exc:
|
|
156
|
+
extra = "openai" if module_name == ".openai" else "azureopenai"
|
|
157
|
+
raise ModuleNotFoundError(
|
|
158
|
+
f"{name} needs the '{extra}' extra: pip install 'agentbyte[{extra}]'", name=exc.name
|
|
159
|
+
) from exc
|
|
160
|
+
value = getattr(module, name)
|
|
161
|
+
globals()[name] = value
|
|
162
|
+
return value
|
|
@@ -5,11 +5,7 @@ from __future__ import annotations
|
|
|
5
5
|
import os
|
|
6
6
|
from typing import Any
|
|
7
7
|
|
|
8
|
-
from agentbyte.llm import
|
|
9
|
-
AzureOpenAIChatCompletionClient,
|
|
10
|
-
BaseChatCompletionClient,
|
|
11
|
-
OpenAIChatCompletionClient,
|
|
12
|
-
)
|
|
8
|
+
from agentbyte.llm import BaseChatCompletionClient
|
|
13
9
|
|
|
14
10
|
DEFAULT_OPENAI_MODEL = "gpt-4.1-mini"
|
|
15
11
|
DEFAULT_CLIENT_CONFIG = {"temperature": 0.2}
|
|
@@ -53,11 +49,15 @@ def build_chat_client(
|
|
|
53
49
|
)
|
|
54
50
|
|
|
55
51
|
if resolved_provider == "openai":
|
|
52
|
+
from agentbyte.llm import OpenAIChatCompletionClient
|
|
53
|
+
|
|
56
54
|
return OpenAIChatCompletionClient.from_api_key(
|
|
57
55
|
model=model or DEFAULT_OPENAI_MODEL,
|
|
58
56
|
config=resolved_config,
|
|
59
57
|
)
|
|
60
58
|
|
|
59
|
+
from agentbyte.llm import AzureOpenAIChatCompletionClient
|
|
60
|
+
|
|
61
61
|
if os.getenv("AZURE_TENANT_ID"):
|
|
62
62
|
return AzureOpenAIChatCompletionClient.from_certificate(
|
|
63
63
|
model=resolved_model,
|
|
@@ -233,6 +233,41 @@ async def test_closing_stream_cancels_active_work_and_closes_run(kind, tmp_path)
|
|
|
233
233
|
assert run.finished_count + run.cancelled_count + run.not_started_count == run.planned_count
|
|
234
234
|
|
|
235
235
|
|
|
236
|
+
@pytest.mark.parametrize("kind", ["sqlite", "sql"])
|
|
237
|
+
@pytest.mark.asyncio
|
|
238
|
+
async def test_cancelled_write_commits_before_cancellation_is_delivered(kind, tmp_path) -> None:
|
|
239
|
+
async with open_store(kind, tmp_path) as store:
|
|
240
|
+
run = EvalRunRecord(dataset_id="d", target_id="t", judge_name="j", judge_type="J")
|
|
241
|
+
items = [EvalItemRecord(run_id=run.id, item_index=i, task_name="x", task_type="task") for i in range(2)]
|
|
242
|
+
await store.create_run(run, items)
|
|
243
|
+
await store.start_run(run.id)
|
|
244
|
+
|
|
245
|
+
entered, release = asyncio.Event(), asyncio.Event()
|
|
246
|
+
put_item = store._put_item
|
|
247
|
+
|
|
248
|
+
async def slow_put_item(*args, **kwargs):
|
|
249
|
+
entered.set()
|
|
250
|
+
await release.wait()
|
|
251
|
+
await put_item(*args, **kwargs)
|
|
252
|
+
|
|
253
|
+
store._put_item = slow_put_item
|
|
254
|
+
write = asyncio.create_task(store.mark_item_running(run.id, 0))
|
|
255
|
+
await entered.wait()
|
|
256
|
+
write.cancel()
|
|
257
|
+
await asyncio.sleep(0.05)
|
|
258
|
+
assert not write.done() # the transaction is not abandoned while holding the store lock
|
|
259
|
+
|
|
260
|
+
release.set()
|
|
261
|
+
with pytest.raises(asyncio.CancelledError):
|
|
262
|
+
await write
|
|
263
|
+
del store._put_item
|
|
264
|
+
|
|
265
|
+
assert (await store.get_item(run.id, 0)).state == "running"
|
|
266
|
+
final = await asyncio.wait_for(store.finish_run(run.id, "cancelled"), 5)
|
|
267
|
+
assert final.status == "cancelled"
|
|
268
|
+
assert final.cancelled_count == 1 and final.not_started_count == 1
|
|
269
|
+
|
|
270
|
+
|
|
236
271
|
@pytest.mark.asyncio
|
|
237
272
|
async def test_task_cancellation_closes_run_as_cancelled(tmp_path) -> None:
|
|
238
273
|
gate = asyncio.Event()
|
|
@@ -4,6 +4,7 @@ from types import SimpleNamespace
|
|
|
4
4
|
|
|
5
5
|
import pytest
|
|
6
6
|
|
|
7
|
+
import agentbyte.llm as llm
|
|
7
8
|
from agentbyte.presets import clients as preset_clients
|
|
8
9
|
|
|
9
10
|
|
|
@@ -43,7 +44,7 @@ class DummyAzureClient:
|
|
|
43
44
|
|
|
44
45
|
|
|
45
46
|
def test_build_chat_client_explicit_openai(monkeypatch):
|
|
46
|
-
monkeypatch.setattr(
|
|
47
|
+
monkeypatch.setattr(llm, "OpenAIChatCompletionClient", DummyOpenAIClient)
|
|
47
48
|
|
|
48
49
|
client = preset_clients.build_chat_client(provider="openai", model="gpt-test")
|
|
49
50
|
|
|
@@ -53,8 +54,7 @@ def test_build_chat_client_explicit_openai(monkeypatch):
|
|
|
53
54
|
|
|
54
55
|
|
|
55
56
|
def test_build_chat_client_explicit_azure_with_api_key(monkeypatch):
|
|
56
|
-
monkeypatch.setattr(
|
|
57
|
-
preset_clients, "AzureOpenAIChatCompletionClient", DummyAzureClient
|
|
57
|
+
monkeypatch.setattr(llm, "AzureOpenAIChatCompletionClient", DummyAzureClient
|
|
58
58
|
)
|
|
59
59
|
monkeypatch.setenv("AZURE_OPENAI_API_KEY", "secret")
|
|
60
60
|
|
|
@@ -69,8 +69,7 @@ def test_build_chat_client_explicit_azure_with_api_key(monkeypatch):
|
|
|
69
69
|
|
|
70
70
|
|
|
71
71
|
def test_build_chat_client_prefers_azure_certificate_over_api_key(monkeypatch):
|
|
72
|
-
monkeypatch.setattr(
|
|
73
|
-
preset_clients, "AzureOpenAIChatCompletionClient", DummyAzureClient
|
|
72
|
+
monkeypatch.setattr(llm, "AzureOpenAIChatCompletionClient", DummyAzureClient
|
|
74
73
|
)
|
|
75
74
|
monkeypatch.setenv("AZURE_OPENAI_ENDPOINT", "https://example.openai.azure.com/")
|
|
76
75
|
monkeypatch.setenv("AZURE_OPENAI_API_KEY", "secret")
|
|
@@ -83,8 +82,7 @@ def test_build_chat_client_prefers_azure_certificate_over_api_key(monkeypatch):
|
|
|
83
82
|
|
|
84
83
|
|
|
85
84
|
def test_build_chat_client_uses_azure_env_model_name_when_present(monkeypatch):
|
|
86
|
-
monkeypatch.setattr(
|
|
87
|
-
preset_clients, "AzureOpenAIChatCompletionClient", DummyAzureClient
|
|
85
|
+
monkeypatch.setattr(llm, "AzureOpenAIChatCompletionClient", DummyAzureClient
|
|
88
86
|
)
|
|
89
87
|
monkeypatch.delenv("OPENAI_API_KEY", raising=False)
|
|
90
88
|
monkeypatch.delenv("AZURE_OPENAI_API_KEY", raising=False)
|
|
@@ -98,7 +96,7 @@ def test_build_chat_client_uses_azure_env_model_name_when_present(monkeypatch):
|
|
|
98
96
|
|
|
99
97
|
|
|
100
98
|
def test_build_chat_client_infers_openai_from_env(monkeypatch):
|
|
101
|
-
monkeypatch.setattr(
|
|
99
|
+
monkeypatch.setattr(llm, "OpenAIChatCompletionClient", DummyOpenAIClient)
|
|
102
100
|
monkeypatch.setenv("OPENAI_API_KEY", "secret")
|
|
103
101
|
|
|
104
102
|
client = preset_clients.build_chat_client()
|
|
@@ -108,8 +106,7 @@ def test_build_chat_client_infers_openai_from_env(monkeypatch):
|
|
|
108
106
|
|
|
109
107
|
|
|
110
108
|
def test_build_chat_client_uses_azure_default_credential_when_no_key(monkeypatch):
|
|
111
|
-
monkeypatch.setattr(
|
|
112
|
-
preset_clients, "AzureOpenAIChatCompletionClient", DummyAzureClient
|
|
109
|
+
monkeypatch.setattr(llm, "AzureOpenAIChatCompletionClient", DummyAzureClient
|
|
113
110
|
)
|
|
114
111
|
monkeypatch.delenv("OPENAI_API_KEY", raising=False)
|
|
115
112
|
monkeypatch.delenv("AZURE_OPENAI_API_KEY", raising=False)
|
|
@@ -512,3 +512,26 @@ def test_package_root_otel_bootstrap_instruments_agent_init(
|
|
|
512
512
|
assert getattr(AgentClass.__init__, "__agentbyte_otel_instrumented__", False) is True
|
|
513
513
|
finally:
|
|
514
514
|
AgentClass.__init__ = original_init
|
|
515
|
+
|
|
516
|
+
|
|
517
|
+
OPTIONAL_MODULES = [
|
|
518
|
+
"openai", "azure", "azure.identity", "aiosqlite", "sqlalchemy", "sqlmodel", "asyncpg",
|
|
519
|
+
"aioboto3", "fastapi", "uvicorn", "opentelemetry", "graphviz", "gepa",
|
|
520
|
+
]
|
|
521
|
+
|
|
522
|
+
|
|
523
|
+
def test_core_import_works_without_optional_extras() -> None:
|
|
524
|
+
"""`import agentbyte` and the CLI must not need any optional extra (regression for 0.32.1)."""
|
|
525
|
+
import subprocess
|
|
526
|
+
|
|
527
|
+
blocked = "\n".join(f"sys.modules[{name!r}] = None" for name in OPTIONAL_MODULES)
|
|
528
|
+
script = (
|
|
529
|
+
f"import sys\n{blocked}\n"
|
|
530
|
+
"import agentbyte, agentbyte.llm, agentbyte.presets, agentbyte.cli.main\n"
|
|
531
|
+
"from agentbyte.llm import BaseChatCompletionClient\n"
|
|
532
|
+
"try:\n agentbyte.llm.OpenAIChatCompletionClient\n"
|
|
533
|
+
"except ModuleNotFoundError as exc:\n print(exc)\n"
|
|
534
|
+
)
|
|
535
|
+
result = subprocess.run([sys.executable, "-c", script], capture_output=True, text=True, timeout=120)
|
|
536
|
+
assert result.returncode == 0, result.stderr
|
|
537
|
+
assert "pip install 'agentbyte[openai]'" in result.stdout
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|