agentloop-profiler 0.2.6__tar.gz → 0.2.7__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.
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/PKG-INFO +85 -13
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/README.md +84 -12
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/cli.py +123 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/client.py +24 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/improvement.py +38 -11
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/improvement_cli.py +17 -6
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/improvement_init.py +269 -26
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/server.py +40 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/store.py +200 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/version.py +1 -1
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop_profiler.egg-info/PKG-INFO +85 -13
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop_profiler.egg-info/SOURCES.txt +2 -0
- agentloop_profiler-0.2.7/dashboard/access.py +103 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/dashboard/app.py +104 -25
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/pyproject.toml +1 -1
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_cli_store_commands.py +61 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_client.py +62 -0
- agentloop_profiler-0.2.7/tests/test_dashboard_project_access.py +199 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_improvement.py +35 -3
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_improvement_init.py +88 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_server.py +63 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_store_contract.py +112 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/LICENSE +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/THIRD_PARTY_LICENSES.md +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/__init__.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/ablation_protocol.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/ablations.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/aggregate_cli.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/aggregate_stats.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/aggregates.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/audit.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/autoinstrument.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/batch_experiments.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/batching.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/budget_types.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/budgets.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/calibration.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/checkpoint_state.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/checkpoint_store.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/ci.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/cli_paths.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/completion.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/completion_types.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/config.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/context_controls.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/context_experiments.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/context_types.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/costs.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/cursor_validation.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/decorators.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/demo.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/doctor.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/drift.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/drift_cli.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/drift_types.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/drift_windows.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/entrypoint.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/estimates.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/events.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/experiment_artifacts.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/experiment_observations.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/experiment_reports.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/experiment_types.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/experiments.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/exporters.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/finding_benchmark_types.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/finding_benchmarks.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/findings.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/graph.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/harness.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/harness_bench/__init__.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/harness_bench/cli.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/harness_bench/drivers.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/harness_bench/offline.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/harness_evidence.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/harness_usage.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/html_report.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/improvement_report.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/improvement_verifier.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/integrations/__init__.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/integrations/crewai.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/integrations/harbor/__init__.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/integrations/harbor/atif.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/integrations/harbor/atif_validation.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/integrations/harbor/cli.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/integrations/harbor/manifest.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/integrations/harbor/trial_evidence.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/integrations/harbor/trials.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/integrations/harbor/verifier.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/integrations/hermes.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/integrations/hermes_cli.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/integrations/hermes_recorder.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/integrations/langgraph.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/integrations/langgraph_harness.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/integrations/langgraph_recovery.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/integrations/omnigent/__init__.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/integrations/omnigent/cli.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/integrations/omnigent/evidence.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/integrations/omnigent/telemetry.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/integrations/openai.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/integrations/openai_agents.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/integrations/sdk.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/integrations/vercel_ai.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/interoperability/__init__.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/interoperability/artifacts.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/interoperability/cli.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/interoperability/cohort_evidence.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/interoperability/cohorts.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/interoperability/contracts.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/interoperability/coordination.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/interoperability/evidence.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/interoperability/otlp_jsonl.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/interoperability/otlp_validation.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/interoperability/registry.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/interoperability/validation.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/intervention_service.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/intervention_store.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/interventions.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/issues.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/judgment_adapters.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/judgment_benchmark_types.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/judgment_benchmarks.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/judgment_types.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/judgment_views.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/judgments.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/loop_guards.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/loop_types.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/markdown.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/metrics.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/migrations.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/model_routing.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/onboarding.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/operations.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/optimizer.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/otel.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/otel_ids.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/otel_semantics.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/parallelism.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/patches.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/plan_export.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/policy_promotion.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/promotion_evidence.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/promotion_types.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/quality.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/ranking.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/recovery_evidence.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/repetitions.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/replay.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/retention.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/retention_types.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/reuse_experiments.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/routing_checks.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/routing_types.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/rules.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/runners/__init__.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/runners/_common.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/runners/claude_code.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/runners/codex.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/runtime.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/savings.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/scheduling_plan.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/scheduling_types.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/schema.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/semantic_rules.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/semantic_waste.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/semantic_waste_types.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/structural_experiments.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/structural_types.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/structured_quality.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/studies.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/study_statistics.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/substitution_evidence.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/substitution_export.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/substitution_reports.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/substitution_types.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/substitutions.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/timing.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/tokens.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/tool_scheduling.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/trace_sources.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/tracer.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/value.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/workflow_types.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop/workflows.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop_profiler.egg-info/dependency_links.txt +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop_profiler.egg-info/entry_points.txt +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop_profiler.egg-info/requires.txt +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/agentloop_profiler.egg-info/top_level.txt +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/dashboard/__init__.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/dashboard/streamlit_compat.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/dashboard/trace_upload.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/dashboard/value_view.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/setup.cfg +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_ablations.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_aggregates.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_api_versioning.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_batch_data_pipeline.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_budgets.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_bump_version.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_calibration.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_capability_registry.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_checkpoint_recovery.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_ci_command.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_ci_evidence.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_claude_code_runner.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_cli_output_paths.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_cli_trace_inputs.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_client_transport.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_codex_exec_runner.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_completion.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_context_controls.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_context_reuse_experiments.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_context_study.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_costs.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_crewai_integration.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_cursor_server.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_cursor_shape_validation.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_dashboard_input_validation.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_dashboard_quality.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_dashboard_semantic_waste.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_dashboard_structured_quality.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_dashboard_trace_upload.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_dashboard_value_view.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_dashboard_workflows.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_decorators.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_demo_cli.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_dependabot_config.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_diagnosis_api.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_distribution_metadata.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_docs_site.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_doctor_autoinstrument.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_drift.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_email_workflow.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_empirical_calibration.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_enforcement_conformance.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_estimates.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_evidence_workflow.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_experiments.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_exporters.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_external_cohorts.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_finding_benchmarks.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_finding_identity.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_finding_rules.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_first_use_cli.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_graph.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_guided_validation.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_guided_verifier.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_harbor_atif.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_harbor_trials.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_harness.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_harness_bench.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_harness_error_usage.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_harness_evidence.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_hermes_integration.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_hermes_replay_capture.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_hermes_repository_example.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_hermes_runtime_evidence.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_html_report.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_incident_triage.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_instrumentation_measurement.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_integration_conformance.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_interoperability_contracts.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_interventions.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_issues.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_judgment_adapters.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_judgment_benchmarks.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_judgment_evidence.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_judgment_provider_optional.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_judgments.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_langgraph_conformance.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_langgraph_harness.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_langgraph_integration.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_langgraph_recovery.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_loop_guards.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_markdown.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_markdown_exporters.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_marketplace_workflow.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_metrics.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_migrations.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_model_batching.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_model_routing.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_multiagent_coordination.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_non_agent_study.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_omnigent_telemetry.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_onboarding.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_openai_agents_integration.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_openai_integration.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_operations.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_optimizer.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_otel_ids.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_otel_interop.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_otlp_jsonl.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_parallelization_evidence.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_patch_plan.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_patch_source_scope.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_payment_review.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_policy_promotion.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_published_readme.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_python_support.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_quality.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_ranking.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_real_agent_study.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_real_calibration_study.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_real_harness_study.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_release_workflows.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_remote_cli_credentials.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_repetitions.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_replay.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_repository_policy_traversal.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_research_example.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_retention.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_retry_recommendations.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_routing_study.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_rule_error_privacy.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_runtime.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_savings_aggregation.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_scheduling_study.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_semantic_findings.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_semantic_waste.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_standalone_notices.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_store.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_streaming_inventory.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_streamlit_compat.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_structural_experiments.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_structured_quality.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_structured_quality_evidence.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_studies.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_substitutions.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_telemetry_conformance.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_timing.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_token_provenance.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_tool_scheduling.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_trace_context.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_trace_failure_recording.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_trace_schema.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_usefulness_benchmark.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_value.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_vercel_ai_integration.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_workflow_storage.py +0 -0
- {agentloop_profiler-0.2.6 → agentloop_profiler-0.2.7}/tests/test_workflows.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: agentloop-profiler
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.7
|
|
4
4
|
Summary: Profiler and optimization layer for AI agent execution graphs
|
|
5
5
|
Author: Dipesh Tharu Mahato
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -71,6 +71,7 @@ Dynamic: license-file
|
|
|
71
71
|
<p align="center">
|
|
72
72
|
<a href="https://github.com/dipeshbabu/agentloop/actions/workflows/ci.yml"><img src="https://github.com/dipeshbabu/agentloop/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
|
|
73
73
|
<a href="https://pypi.org/project/agentloop-profiler/"><img src="https://img.shields.io/pypi/v/agentloop-profiler.svg?cacheSeconds=300" alt="PyPI"></a>
|
|
74
|
+
<a href="https://www.npmjs.com/package/agentloop-profiler"><img src="https://img.shields.io/npm/v/agentloop-profiler.svg?cacheSeconds=300" alt="npm"></a>
|
|
74
75
|
<a href="https://pepy.tech/projects/agentloop-profiler"><img src="https://static.pepy.tech/badge/agentloop-profiler/month" alt="Downloads/month"></a>
|
|
75
76
|
<a href="https://www.python.org/downloads/"><img src="https://img.shields.io/badge/python-3.11%2B-3776AB.svg" alt="Python 3.11 or newer"></a>
|
|
76
77
|
<a href="https://github.com/dipeshbabu/agentloop/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-Apache--2.0-blue.svg" alt="License: Apache-2.0"></a>
|
|
@@ -78,11 +79,13 @@ Dynamic: license-file
|
|
|
78
79
|
|
|
79
80
|
<p align="center">
|
|
80
81
|
<a href="https://dipeshbabu.github.io/agentloop/">Documentation</a> ·
|
|
82
|
+
<a href="#install">Install</a> ·
|
|
81
83
|
<a href="#quickstart">Quickstart</a> ·
|
|
82
84
|
<a href="#guided-optimization">Improve an agent</a> ·
|
|
83
85
|
<a href="#record-your-own-run">Trace your code</a> ·
|
|
84
86
|
<a href="#compare-before-and-after">Compare runs</a> ·
|
|
85
87
|
<a href="#framework-integrations">Integrations</a> ·
|
|
88
|
+
<a href="#deploy-to-the-cloud">Deploy</a> ·
|
|
86
89
|
<a href="https://dipeshbabu.github.io/agentloop/FIRST_USE/">Guide</a>
|
|
87
90
|
</p>
|
|
88
91
|
|
|
@@ -95,13 +98,24 @@ The core Python SDK and CLI work with JSON files. You can trace and analyze your
|
|
|
95
98
|
code without a hosted account or database. A dashboard, HTTP API, and shared
|
|
96
99
|
storage are available as optional components.
|
|
97
100
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
+
## Install
|
|
102
|
+
|
|
103
|
+
AgentLoop is published as `agentloop-profiler` on PyPI and on npm.
|
|
104
|
+
|
|
105
|
+
| Install | For | Requires |
|
|
106
|
+
| --- | --- | --- |
|
|
107
|
+
| `python -m pip install agentloop-profiler` | Python SDK and the `agentloop` CLI, which analyzes traces, writes reports and runs the guided workflow | Python 3.11+ |
|
|
108
|
+
| `npm install agentloop-profiler` | [TypeScript SDK](https://github.com/dipeshbabu/agentloop/blob/main/sdk/typescript/README.md) for Node.js and browser code: native tracing and an API v1 client, with no runtime dependencies | Node.js 22+ |
|
|
109
|
+
| [Standalone executable](#standalone-cli) | The `agentloop` CLI without installing Python | Linux, macOS or Windows |
|
|
110
|
+
|
|
111
|
+
The two packages are versioned separately and share the trace format, so traces
|
|
112
|
+
recorded with the TypeScript SDK are analyzed with the `agentloop` CLI. See the
|
|
113
|
+
[installation guide](https://dipeshbabu.github.io/agentloop/installation/) for
|
|
114
|
+
virtual environments, optional extras and installing from source.
|
|
101
115
|
|
|
102
116
|
## Quickstart
|
|
103
117
|
|
|
104
|
-
Install
|
|
118
|
+
Install the Python package and record an example trace:
|
|
105
119
|
|
|
106
120
|
```bash
|
|
107
121
|
python -m pip install agentloop-profiler
|
|
@@ -112,9 +126,9 @@ agentloop analyze runs/agentloop_quickstart.json --html runs/report.html --json-
|
|
|
112
126
|
Open `runs/report.html` in your browser to inspect the timeline and findings.
|
|
113
127
|
`runs/analysis.json` contains the trace, metrics, diagnosis, and optimization plan.
|
|
114
128
|
|
|
115
|
-
The
|
|
116
|
-
|
|
117
|
-
|
|
129
|
+
The Python import and CLI command are both `agentloop`. `quickstart` creates a
|
|
130
|
+
labeled synthetic trace and makes no model API calls. It tests your installation,
|
|
131
|
+
not your application's performance.
|
|
118
132
|
|
|
119
133
|
If your shell cannot find `agentloop`, activate the Python environment where you
|
|
120
134
|
installed it. Run `agentloop doctor` to check the installation and available adapters.
|
|
@@ -174,7 +188,9 @@ for those agents.
|
|
|
174
188
|
|
|
175
189
|
To connect your application, run `agentloop improve init --agent my_agent:answer`
|
|
176
190
|
in its project directory. The generated adapter supports synchronous and async
|
|
177
|
-
Python callables.
|
|
191
|
+
Python callables. For a Node.js agent, run
|
|
192
|
+
`agentloop improve init --language node --agent ./src/agent.mjs:answer`; see
|
|
193
|
+
[connecting a Node.js agent](https://dipeshbabu.github.io/agentloop/GUIDED_OPTIMIZATION/#connect-an-existing-nodejs-agent). Replace the example task inputs and expected outputs with
|
|
178
194
|
independent checks for your agent, and keep your model and tool instrumentation.
|
|
179
195
|
Initialization refuses to overwrite existing files. Read the generated
|
|
180
196
|
`AGENTLOOP.md` and [onboarding guide](https://dipeshbabu.github.io/agentloop/GUIDED_OPTIMIZATION/).
|
|
@@ -236,6 +252,40 @@ Saving `metadata["output"]` is an explicit choice in this example. Review the
|
|
|
236
252
|
inputs, outputs, errors, and metadata you retain before sharing real traces.
|
|
237
253
|
See [trace retention](https://dipeshbabu.github.io/agentloop/TRACE_RETENTION/) for capture controls.
|
|
238
254
|
|
|
255
|
+
### From TypeScript or JavaScript
|
|
256
|
+
|
|
257
|
+
After `npm install agentloop-profiler`, save this as `example_agent.mjs`:
|
|
258
|
+
|
|
259
|
+
```javascript
|
|
260
|
+
import { writeFile } from "node:fs/promises";
|
|
261
|
+
import { AgentTrace } from "agentloop-profiler";
|
|
262
|
+
|
|
263
|
+
const NOTES = {
|
|
264
|
+
tracing: "Record the steps in a workflow.",
|
|
265
|
+
optimization: "Investigate repeated or expensive work.",
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
const trace = new AgentTrace("research_agent", { metadata: { synthetic: true } });
|
|
269
|
+
const notes = [];
|
|
270
|
+
for (const topic of Object.keys(NOTES)) {
|
|
271
|
+
notes.push(await trace.tool("lookup_note", async () => NOTES[topic]));
|
|
272
|
+
}
|
|
273
|
+
trace.setOutput({ notes });
|
|
274
|
+
trace.finish();
|
|
275
|
+
await writeFile("research_agent_js.json", trace.toJSONString());
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
Run it and analyze the trace with the `agentloop` CLI:
|
|
279
|
+
|
|
280
|
+
```bash
|
|
281
|
+
node example_agent.mjs
|
|
282
|
+
agentloop analyze research_agent_js.json --html research_agent_js.html
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
The SDK also records model calls with provider token usage, retries and nested
|
|
286
|
+
spans, and can send traces to the HTTP API. See the
|
|
287
|
+
[TypeScript SDK guide](https://dipeshbabu.github.io/agentloop/reference/typescript/).
|
|
288
|
+
|
|
239
289
|
## Inspect findings
|
|
240
290
|
|
|
241
291
|
For a fixed task set, use the [guided workflow](#guided-optimization) to capture
|
|
@@ -365,6 +415,8 @@ gate. Run `agentloop COMMAND --help` to see its output options and thresholds.
|
|
|
365
415
|
| Source | Integration path |
|
|
366
416
|
| --- | --- |
|
|
367
417
|
| Custom Python agents and pipelines | Decorators, context managers, and [workflow annotations](https://dipeshbabu.github.io/agentloop/WORKFLOW_TRACING/). |
|
|
418
|
+
| TypeScript and JavaScript applications | `npm install agentloop-profiler`, then record model, tool and retry spans with the [TypeScript SDK](https://dipeshbabu.github.io/agentloop/reference/typescript/). |
|
|
419
|
+
| OpenAI Codex CLI and Claude Code | Built-in [Codex](https://dipeshbabu.github.io/agentloop/CODEX/) and [Claude Code](https://dipeshbabu.github.io/agentloop/CLAUDE_CODE/) runners for the guided workflow. |
|
|
368
420
|
| OpenAI SDK | Wrap a client or callable to capture calls, streams, and reported usage. |
|
|
369
421
|
| OpenAI Agents SDK | Attach an AgentLoop tracing processor. |
|
|
370
422
|
| LangGraph | Instrument the builder before adding nodes, then wrap the compiled runnable. |
|
|
@@ -416,6 +468,24 @@ code changes.
|
|
|
416
468
|
|
|
417
469
|
</details>
|
|
418
470
|
|
|
471
|
+
## Deploy to the cloud
|
|
472
|
+
|
|
473
|
+
Run a shared AgentLoop server for your team on any cloud. From 0.2.7 each release
|
|
474
|
+
publishes a container image, `ghcr.io/dipeshbabu/agentloop`, and `deploy/`
|
|
475
|
+
contains a production stack for one Linux server: Postgres, the API, the
|
|
476
|
+
dashboard behind a login, and Caddy for automatic HTTPS. Only ports 80 and 443
|
|
477
|
+
are exposed.
|
|
478
|
+
|
|
479
|
+
```bash
|
|
480
|
+
cp deploy/.env.example deploy/.env # set the image, domains and secrets
|
|
481
|
+
docker compose -f deploy/docker-compose.yml up --detach
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
CI runs this exact stack over HTTPS on every change. The
|
|
485
|
+
[cloud deployment guide](https://dipeshbabu.github.io/agentloop/CLOUD_DEPLOY/)
|
|
486
|
+
covers server setup, API keys, upgrades, backups, and managed platforms such as
|
|
487
|
+
Cloud Run, App Runner, ECS and Azure Container Apps.
|
|
488
|
+
|
|
419
489
|
## Dashboard and persistence
|
|
420
490
|
|
|
421
491
|
From a [source checkout](#source-checkout), load the synthetic example and start
|
|
@@ -430,7 +500,9 @@ uv run --frozen --all-extras streamlit run dashboard/app.py
|
|
|
430
500
|
Open Streamlit's printed URL and leave the sidebar's Project field set to `default`.
|
|
431
501
|
Use `store-trace` to load your own files. Storage uses SQLite by default and also
|
|
432
502
|
supports Postgres. The optional HTTP API serves project-scoped traces and reports
|
|
433
|
-
through `/v1` endpoints.
|
|
503
|
+
through `/v1` endpoints. Python applications use `agentloop.AgentLoopClient`;
|
|
504
|
+
TypeScript applications use `AgentLoopClient` from the npm package to upload
|
|
505
|
+
traces and read reports.
|
|
434
506
|
|
|
435
507
|
See [dashboard setup](https://dipeshbabu.github.io/agentloop/DASHBOARD/), [API versioning](https://dipeshbabu.github.io/agentloop/API_VERSIONING/),
|
|
436
508
|
and [production deployment](https://dipeshbabu.github.io/agentloop/PRODUCTION/) for configuration and authentication.
|
|
@@ -461,13 +533,13 @@ where the examples show `agentloop`.
|
|
|
461
533
|
<summary>Download and verify a standalone executable</summary>
|
|
462
534
|
|
|
463
535
|
Download the executable and `SHA256SUMS` from the same release. These examples use
|
|
464
|
-
version 0.2.
|
|
536
|
+
version 0.2.7. Change the version when choosing another release.
|
|
465
537
|
|
|
466
538
|
Linux (Bash):
|
|
467
539
|
|
|
468
540
|
```bash
|
|
469
541
|
set -euo pipefail
|
|
470
|
-
version=0.2.
|
|
542
|
+
version=0.2.7
|
|
471
543
|
asset="agentloop-v${version}-linux-x86_64"
|
|
472
544
|
curl --fail --location --remote-name "https://github.com/dipeshbabu/agentloop/releases/download/v${version}/${asset}"
|
|
473
545
|
curl --fail --location --remote-name "https://github.com/dipeshbabu/agentloop/releases/download/v${version}/SHA256SUMS"
|
|
@@ -484,7 +556,7 @@ chmod +x "$asset"
|
|
|
484
556
|
Windows PowerShell:
|
|
485
557
|
|
|
486
558
|
```powershell
|
|
487
|
-
$Version = "0.2.
|
|
559
|
+
$Version = "0.2.7"
|
|
488
560
|
$Asset = "agentloop-v$Version-windows-x86_64.exe"
|
|
489
561
|
Invoke-WebRequest "https://github.com/dipeshbabu/agentloop/releases/download/v$Version/$Asset" -OutFile agentloop.exe
|
|
490
562
|
Invoke-WebRequest "https://github.com/dipeshbabu/agentloop/releases/download/v$Version/SHA256SUMS" -OutFile SHA256SUMS
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
<p align="center">
|
|
14
14
|
<a href="https://github.com/dipeshbabu/agentloop/actions/workflows/ci.yml"><img src="https://github.com/dipeshbabu/agentloop/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
|
|
15
15
|
<a href="https://pypi.org/project/agentloop-profiler/"><img src="https://img.shields.io/pypi/v/agentloop-profiler.svg?cacheSeconds=300" alt="PyPI"></a>
|
|
16
|
+
<a href="https://www.npmjs.com/package/agentloop-profiler"><img src="https://img.shields.io/npm/v/agentloop-profiler.svg?cacheSeconds=300" alt="npm"></a>
|
|
16
17
|
<a href="https://pepy.tech/projects/agentloop-profiler"><img src="https://static.pepy.tech/badge/agentloop-profiler/month" alt="Downloads/month"></a>
|
|
17
18
|
<a href="https://www.python.org/downloads/"><img src="https://img.shields.io/badge/python-3.11%2B-3776AB.svg" alt="Python 3.11 or newer"></a>
|
|
18
19
|
<a href="https://github.com/dipeshbabu/agentloop/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-Apache--2.0-blue.svg" alt="License: Apache-2.0"></a>
|
|
@@ -20,11 +21,13 @@
|
|
|
20
21
|
|
|
21
22
|
<p align="center">
|
|
22
23
|
<a href="https://dipeshbabu.github.io/agentloop/">Documentation</a> ·
|
|
24
|
+
<a href="#install">Install</a> ·
|
|
23
25
|
<a href="#quickstart">Quickstart</a> ·
|
|
24
26
|
<a href="#guided-optimization">Improve an agent</a> ·
|
|
25
27
|
<a href="#record-your-own-run">Trace your code</a> ·
|
|
26
28
|
<a href="#compare-before-and-after">Compare runs</a> ·
|
|
27
29
|
<a href="#framework-integrations">Integrations</a> ·
|
|
30
|
+
<a href="#deploy-to-the-cloud">Deploy</a> ·
|
|
28
31
|
<a href="https://dipeshbabu.github.io/agentloop/FIRST_USE/">Guide</a>
|
|
29
32
|
</p>
|
|
30
33
|
|
|
@@ -37,13 +40,24 @@ The core Python SDK and CLI work with JSON files. You can trace and analyze your
|
|
|
37
40
|
code without a hosted account or database. A dashboard, HTTP API, and shared
|
|
38
41
|
storage are available as optional components.
|
|
39
42
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
+
## Install
|
|
44
|
+
|
|
45
|
+
AgentLoop is published as `agentloop-profiler` on PyPI and on npm.
|
|
46
|
+
|
|
47
|
+
| Install | For | Requires |
|
|
48
|
+
| --- | --- | --- |
|
|
49
|
+
| `python -m pip install agentloop-profiler` | Python SDK and the `agentloop` CLI, which analyzes traces, writes reports and runs the guided workflow | Python 3.11+ |
|
|
50
|
+
| `npm install agentloop-profiler` | [TypeScript SDK](https://github.com/dipeshbabu/agentloop/blob/main/sdk/typescript/README.md) for Node.js and browser code: native tracing and an API v1 client, with no runtime dependencies | Node.js 22+ |
|
|
51
|
+
| [Standalone executable](#standalone-cli) | The `agentloop` CLI without installing Python | Linux, macOS or Windows |
|
|
52
|
+
|
|
53
|
+
The two packages are versioned separately and share the trace format, so traces
|
|
54
|
+
recorded with the TypeScript SDK are analyzed with the `agentloop` CLI. See the
|
|
55
|
+
[installation guide](https://dipeshbabu.github.io/agentloop/installation/) for
|
|
56
|
+
virtual environments, optional extras and installing from source.
|
|
43
57
|
|
|
44
58
|
## Quickstart
|
|
45
59
|
|
|
46
|
-
Install
|
|
60
|
+
Install the Python package and record an example trace:
|
|
47
61
|
|
|
48
62
|
```bash
|
|
49
63
|
python -m pip install agentloop-profiler
|
|
@@ -54,9 +68,9 @@ agentloop analyze runs/agentloop_quickstart.json --html runs/report.html --json-
|
|
|
54
68
|
Open `runs/report.html` in your browser to inspect the timeline and findings.
|
|
55
69
|
`runs/analysis.json` contains the trace, metrics, diagnosis, and optimization plan.
|
|
56
70
|
|
|
57
|
-
The
|
|
58
|
-
|
|
59
|
-
|
|
71
|
+
The Python import and CLI command are both `agentloop`. `quickstart` creates a
|
|
72
|
+
labeled synthetic trace and makes no model API calls. It tests your installation,
|
|
73
|
+
not your application's performance.
|
|
60
74
|
|
|
61
75
|
If your shell cannot find `agentloop`, activate the Python environment where you
|
|
62
76
|
installed it. Run `agentloop doctor` to check the installation and available adapters.
|
|
@@ -116,7 +130,9 @@ for those agents.
|
|
|
116
130
|
|
|
117
131
|
To connect your application, run `agentloop improve init --agent my_agent:answer`
|
|
118
132
|
in its project directory. The generated adapter supports synchronous and async
|
|
119
|
-
Python callables.
|
|
133
|
+
Python callables. For a Node.js agent, run
|
|
134
|
+
`agentloop improve init --language node --agent ./src/agent.mjs:answer`; see
|
|
135
|
+
[connecting a Node.js agent](https://dipeshbabu.github.io/agentloop/GUIDED_OPTIMIZATION/#connect-an-existing-nodejs-agent). Replace the example task inputs and expected outputs with
|
|
120
136
|
independent checks for your agent, and keep your model and tool instrumentation.
|
|
121
137
|
Initialization refuses to overwrite existing files. Read the generated
|
|
122
138
|
`AGENTLOOP.md` and [onboarding guide](https://dipeshbabu.github.io/agentloop/GUIDED_OPTIMIZATION/).
|
|
@@ -178,6 +194,40 @@ Saving `metadata["output"]` is an explicit choice in this example. Review the
|
|
|
178
194
|
inputs, outputs, errors, and metadata you retain before sharing real traces.
|
|
179
195
|
See [trace retention](https://dipeshbabu.github.io/agentloop/TRACE_RETENTION/) for capture controls.
|
|
180
196
|
|
|
197
|
+
### From TypeScript or JavaScript
|
|
198
|
+
|
|
199
|
+
After `npm install agentloop-profiler`, save this as `example_agent.mjs`:
|
|
200
|
+
|
|
201
|
+
```javascript
|
|
202
|
+
import { writeFile } from "node:fs/promises";
|
|
203
|
+
import { AgentTrace } from "agentloop-profiler";
|
|
204
|
+
|
|
205
|
+
const NOTES = {
|
|
206
|
+
tracing: "Record the steps in a workflow.",
|
|
207
|
+
optimization: "Investigate repeated or expensive work.",
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
const trace = new AgentTrace("research_agent", { metadata: { synthetic: true } });
|
|
211
|
+
const notes = [];
|
|
212
|
+
for (const topic of Object.keys(NOTES)) {
|
|
213
|
+
notes.push(await trace.tool("lookup_note", async () => NOTES[topic]));
|
|
214
|
+
}
|
|
215
|
+
trace.setOutput({ notes });
|
|
216
|
+
trace.finish();
|
|
217
|
+
await writeFile("research_agent_js.json", trace.toJSONString());
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
Run it and analyze the trace with the `agentloop` CLI:
|
|
221
|
+
|
|
222
|
+
```bash
|
|
223
|
+
node example_agent.mjs
|
|
224
|
+
agentloop analyze research_agent_js.json --html research_agent_js.html
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
The SDK also records model calls with provider token usage, retries and nested
|
|
228
|
+
spans, and can send traces to the HTTP API. See the
|
|
229
|
+
[TypeScript SDK guide](https://dipeshbabu.github.io/agentloop/reference/typescript/).
|
|
230
|
+
|
|
181
231
|
## Inspect findings
|
|
182
232
|
|
|
183
233
|
For a fixed task set, use the [guided workflow](#guided-optimization) to capture
|
|
@@ -307,6 +357,8 @@ gate. Run `agentloop COMMAND --help` to see its output options and thresholds.
|
|
|
307
357
|
| Source | Integration path |
|
|
308
358
|
| --- | --- |
|
|
309
359
|
| Custom Python agents and pipelines | Decorators, context managers, and [workflow annotations](https://dipeshbabu.github.io/agentloop/WORKFLOW_TRACING/). |
|
|
360
|
+
| TypeScript and JavaScript applications | `npm install agentloop-profiler`, then record model, tool and retry spans with the [TypeScript SDK](https://dipeshbabu.github.io/agentloop/reference/typescript/). |
|
|
361
|
+
| OpenAI Codex CLI and Claude Code | Built-in [Codex](https://dipeshbabu.github.io/agentloop/CODEX/) and [Claude Code](https://dipeshbabu.github.io/agentloop/CLAUDE_CODE/) runners for the guided workflow. |
|
|
310
362
|
| OpenAI SDK | Wrap a client or callable to capture calls, streams, and reported usage. |
|
|
311
363
|
| OpenAI Agents SDK | Attach an AgentLoop tracing processor. |
|
|
312
364
|
| LangGraph | Instrument the builder before adding nodes, then wrap the compiled runnable. |
|
|
@@ -358,6 +410,24 @@ code changes.
|
|
|
358
410
|
|
|
359
411
|
</details>
|
|
360
412
|
|
|
413
|
+
## Deploy to the cloud
|
|
414
|
+
|
|
415
|
+
Run a shared AgentLoop server for your team on any cloud. From 0.2.7 each release
|
|
416
|
+
publishes a container image, `ghcr.io/dipeshbabu/agentloop`, and `deploy/`
|
|
417
|
+
contains a production stack for one Linux server: Postgres, the API, the
|
|
418
|
+
dashboard behind a login, and Caddy for automatic HTTPS. Only ports 80 and 443
|
|
419
|
+
are exposed.
|
|
420
|
+
|
|
421
|
+
```bash
|
|
422
|
+
cp deploy/.env.example deploy/.env # set the image, domains and secrets
|
|
423
|
+
docker compose -f deploy/docker-compose.yml up --detach
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
CI runs this exact stack over HTTPS on every change. The
|
|
427
|
+
[cloud deployment guide](https://dipeshbabu.github.io/agentloop/CLOUD_DEPLOY/)
|
|
428
|
+
covers server setup, API keys, upgrades, backups, and managed platforms such as
|
|
429
|
+
Cloud Run, App Runner, ECS and Azure Container Apps.
|
|
430
|
+
|
|
361
431
|
## Dashboard and persistence
|
|
362
432
|
|
|
363
433
|
From a [source checkout](#source-checkout), load the synthetic example and start
|
|
@@ -372,7 +442,9 @@ uv run --frozen --all-extras streamlit run dashboard/app.py
|
|
|
372
442
|
Open Streamlit's printed URL and leave the sidebar's Project field set to `default`.
|
|
373
443
|
Use `store-trace` to load your own files. Storage uses SQLite by default and also
|
|
374
444
|
supports Postgres. The optional HTTP API serves project-scoped traces and reports
|
|
375
|
-
through `/v1` endpoints.
|
|
445
|
+
through `/v1` endpoints. Python applications use `agentloop.AgentLoopClient`;
|
|
446
|
+
TypeScript applications use `AgentLoopClient` from the npm package to upload
|
|
447
|
+
traces and read reports.
|
|
376
448
|
|
|
377
449
|
See [dashboard setup](https://dipeshbabu.github.io/agentloop/DASHBOARD/), [API versioning](https://dipeshbabu.github.io/agentloop/API_VERSIONING/),
|
|
378
450
|
and [production deployment](https://dipeshbabu.github.io/agentloop/PRODUCTION/) for configuration and authentication.
|
|
@@ -403,13 +475,13 @@ where the examples show `agentloop`.
|
|
|
403
475
|
<summary>Download and verify a standalone executable</summary>
|
|
404
476
|
|
|
405
477
|
Download the executable and `SHA256SUMS` from the same release. These examples use
|
|
406
|
-
version 0.2.
|
|
478
|
+
version 0.2.7. Change the version when choosing another release.
|
|
407
479
|
|
|
408
480
|
Linux (Bash):
|
|
409
481
|
|
|
410
482
|
```bash
|
|
411
483
|
set -euo pipefail
|
|
412
|
-
version=0.2.
|
|
484
|
+
version=0.2.7
|
|
413
485
|
asset="agentloop-v${version}-linux-x86_64"
|
|
414
486
|
curl --fail --location --remote-name "https://github.com/dipeshbabu/agentloop/releases/download/v${version}/${asset}"
|
|
415
487
|
curl --fail --location --remote-name "https://github.com/dipeshbabu/agentloop/releases/download/v${version}/SHA256SUMS"
|
|
@@ -426,7 +498,7 @@ chmod +x "$asset"
|
|
|
426
498
|
Windows PowerShell:
|
|
427
499
|
|
|
428
500
|
```powershell
|
|
429
|
-
$Version = "0.2.
|
|
501
|
+
$Version = "0.2.7"
|
|
430
502
|
$Asset = "agentloop-v$Version-windows-x86_64.exe"
|
|
431
503
|
Invoke-WebRequest "https://github.com/dipeshbabu/agentloop/releases/download/v$Version/$Asset" -OutFile agentloop.exe
|
|
432
504
|
Invoke-WebRequest "https://github.com/dipeshbabu/agentloop/releases/download/v$Version/SHA256SUMS" -OutFile SHA256SUMS
|
|
@@ -988,6 +988,85 @@ def create_api_key(project_id: str = "default", name: str = "default") -> None:
|
|
|
988
988
|
console.print(key["api_key"])
|
|
989
989
|
|
|
990
990
|
|
|
991
|
+
@app.command("list-api-keys")
|
|
992
|
+
def list_api_keys(project_id: str = "default") -> None:
|
|
993
|
+
"""List a project's API key prefixes and last use; key values are never shown."""
|
|
994
|
+
console.print_json(
|
|
995
|
+
data={"project_id": project_id, "api_keys": get_store().list_api_keys(project_id)}
|
|
996
|
+
)
|
|
997
|
+
|
|
998
|
+
|
|
999
|
+
@app.command("revoke-api-key")
|
|
1000
|
+
def revoke_api_key(
|
|
1001
|
+
prefix: str = typer.Option(..., help="First 10 characters of the key, as listed."),
|
|
1002
|
+
project_id: str = "default",
|
|
1003
|
+
) -> None:
|
|
1004
|
+
"""Revoke a project's API key; it stops working immediately."""
|
|
1005
|
+
try:
|
|
1006
|
+
revoked = get_store().revoke_api_key(project_id, prefix)
|
|
1007
|
+
except ValueError as exc:
|
|
1008
|
+
raise typer.BadParameter(str(exc)) from exc
|
|
1009
|
+
if not revoked:
|
|
1010
|
+
console.print(f"No API key with prefix {prefix} in project {project_id}.", markup=False)
|
|
1011
|
+
raise typer.Exit(1)
|
|
1012
|
+
console.print(
|
|
1013
|
+
f"Revoked {revoked} API key(s) with prefix {prefix} in project {project_id}.", markup=False
|
|
1014
|
+
)
|
|
1015
|
+
|
|
1016
|
+
|
|
1017
|
+
@app.command("delete-trace")
|
|
1018
|
+
def delete_trace(
|
|
1019
|
+
run_id: str,
|
|
1020
|
+
project_id: str = "default",
|
|
1021
|
+
) -> None:
|
|
1022
|
+
"""Delete a stored trace with its findings, usage and interventions."""
|
|
1023
|
+
deleted = get_store().delete_trace(run_id, project_id)
|
|
1024
|
+
if deleted is None:
|
|
1025
|
+
console.print(f"No trace {run_id} in project {project_id}.", markup=False)
|
|
1026
|
+
raise typer.Exit(1)
|
|
1027
|
+
console.print_json(data={"run_id": run_id, "project_id": project_id, "deleted": deleted})
|
|
1028
|
+
|
|
1029
|
+
|
|
1030
|
+
@app.command("purge-traces")
|
|
1031
|
+
def purge_traces(
|
|
1032
|
+
older_than_days: float | None = typer.Option(
|
|
1033
|
+
None,
|
|
1034
|
+
min=0.0001,
|
|
1035
|
+
help="Delete traces stored more than this many days ago. "
|
|
1036
|
+
"Defaults to AGENTLOOP_RETENTION_DAYS.",
|
|
1037
|
+
),
|
|
1038
|
+
project_id: str | None = typer.Option(None, help="Only purge this project."),
|
|
1039
|
+
) -> None:
|
|
1040
|
+
"""Apply a retention period: delete traces stored longer ago than allowed."""
|
|
1041
|
+
if older_than_days is None:
|
|
1042
|
+
configured = os.getenv("AGENTLOOP_RETENTION_DAYS", "").strip()
|
|
1043
|
+
if not configured:
|
|
1044
|
+
console.print(
|
|
1045
|
+
"Retention is not configured; set --older-than-days or AGENTLOOP_RETENTION_DAYS.",
|
|
1046
|
+
markup=False,
|
|
1047
|
+
)
|
|
1048
|
+
return
|
|
1049
|
+
try:
|
|
1050
|
+
older_than_days = float(configured)
|
|
1051
|
+
except ValueError:
|
|
1052
|
+
raise typer.BadParameter(
|
|
1053
|
+
"AGENTLOOP_RETENTION_DAYS must be a number of days",
|
|
1054
|
+
param_hint="AGENTLOOP_RETENTION_DAYS",
|
|
1055
|
+
) from None
|
|
1056
|
+
try:
|
|
1057
|
+
deleted = get_store().purge_traces(older_than_days, project_id=project_id)
|
|
1058
|
+
except ValueError as exc:
|
|
1059
|
+
raise typer.BadParameter(str(exc)) from exc
|
|
1060
|
+
scope = f"project {project_id}" if project_id else "all projects"
|
|
1061
|
+
console.print(
|
|
1062
|
+
f"Deleted {deleted['traces']} trace(s) older than {older_than_days:g} days in {scope} "
|
|
1063
|
+
f"({deleted['findings']} findings, {deleted['usage_events']} usage events, "
|
|
1064
|
+
f"{deleted['interventions']} interventions).",
|
|
1065
|
+
markup=False,
|
|
1066
|
+
soft_wrap=True,
|
|
1067
|
+
)
|
|
1068
|
+
|
|
1069
|
+
|
|
991
1070
|
@app.command("store-trace")
|
|
992
1071
|
def store_trace(
|
|
993
1072
|
path: Path = Path("runs/research_agent_baseline.json"),
|
|
@@ -1206,6 +1285,19 @@ def upload(
|
|
|
1206
1285
|
console.print(f"Project: {response.get('project_id', 'default')}")
|
|
1207
1286
|
|
|
1208
1287
|
|
|
1288
|
+
@app.command("remote-delete-trace")
|
|
1289
|
+
def remote_delete_trace(
|
|
1290
|
+
run_id: str,
|
|
1291
|
+
api_url: str = typer.Option("http://127.0.0.1:8000", help="AgentLoop API base URL."),
|
|
1292
|
+
api_key: str | None = typer.Option(
|
|
1293
|
+
None, help="Project API key. Defaults to AGENTLOOP_API_KEY."
|
|
1294
|
+
),
|
|
1295
|
+
) -> None:
|
|
1296
|
+
"""Delete a trace of the key's project on a remote server."""
|
|
1297
|
+
client = _remote_client(api_url, api_key)
|
|
1298
|
+
console.print_json(data=client.delete_trace(run_id))
|
|
1299
|
+
|
|
1300
|
+
|
|
1209
1301
|
@app.command("remote-optimize")
|
|
1210
1302
|
def remote_optimize(
|
|
1211
1303
|
run_id: str,
|
|
@@ -1333,6 +1425,37 @@ def remote_create_api_key(
|
|
|
1333
1425
|
console.print(key["api_key"])
|
|
1334
1426
|
|
|
1335
1427
|
|
|
1428
|
+
@app.command("remote-list-api-keys")
|
|
1429
|
+
def remote_list_api_keys(
|
|
1430
|
+
project_id: str = "default",
|
|
1431
|
+
api_url: str = typer.Option("http://127.0.0.1:8000", help="AgentLoop API base URL."),
|
|
1432
|
+
admin_api_key: str | None = typer.Option(
|
|
1433
|
+
None, help="Admin API key. Defaults to AGENTLOOP_ADMIN_API_KEY."
|
|
1434
|
+
),
|
|
1435
|
+
) -> None:
|
|
1436
|
+
"""List a project's API key prefixes on a remote server."""
|
|
1437
|
+
client = _remote_admin_client(api_url, admin_api_key)
|
|
1438
|
+
console.print_json(data=client.list_api_keys(project_id))
|
|
1439
|
+
|
|
1440
|
+
|
|
1441
|
+
@app.command("remote-revoke-api-key")
|
|
1442
|
+
def remote_revoke_api_key(
|
|
1443
|
+
prefix: str = typer.Option(..., help="First 10 characters of the key, as listed."),
|
|
1444
|
+
project_id: str = "default",
|
|
1445
|
+
api_url: str = typer.Option("http://127.0.0.1:8000", help="AgentLoop API base URL."),
|
|
1446
|
+
admin_api_key: str | None = typer.Option(
|
|
1447
|
+
None, help="Admin API key. Defaults to AGENTLOOP_ADMIN_API_KEY."
|
|
1448
|
+
),
|
|
1449
|
+
) -> None:
|
|
1450
|
+
"""Revoke a project's API key on a remote server."""
|
|
1451
|
+
client = _remote_admin_client(api_url, admin_api_key)
|
|
1452
|
+
result = client.revoke_api_key(project_id, prefix)
|
|
1453
|
+
console.print(
|
|
1454
|
+
f"Revoked {result['revoked']} API key(s) with prefix {prefix} in project {project_id}.",
|
|
1455
|
+
markup=False,
|
|
1456
|
+
)
|
|
1457
|
+
|
|
1458
|
+
|
|
1336
1459
|
@app.command()
|
|
1337
1460
|
def demo(
|
|
1338
1461
|
kind: str = typer.Option("baseline", help="baseline, optimized, langgraph, or proof"),
|
|
@@ -59,6 +59,25 @@ class AgentLoopClient:
|
|
|
59
59
|
credential_scope="admin",
|
|
60
60
|
)
|
|
61
61
|
|
|
62
|
+
def list_api_keys(self, project_id: str) -> dict[str, Any]:
|
|
63
|
+
"""List a project's key prefixes, names and usage times (admin key required)."""
|
|
64
|
+
return self._request(
|
|
65
|
+
"GET",
|
|
66
|
+
"/api-keys?" + urllib.parse.urlencode({"project_id": project_id}),
|
|
67
|
+
credential_scope="admin",
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
def revoke_api_key(self, project_id: str, prefix: str) -> dict[str, Any]:
|
|
71
|
+
"""Revoke a project's key by its prefix (admin key required)."""
|
|
72
|
+
return self._request(
|
|
73
|
+
"DELETE",
|
|
74
|
+
"/api-keys/"
|
|
75
|
+
+ urllib.parse.quote(prefix, safe="")
|
|
76
|
+
+ "?"
|
|
77
|
+
+ urllib.parse.urlencode({"project_id": project_id}),
|
|
78
|
+
credential_scope="admin",
|
|
79
|
+
)
|
|
80
|
+
|
|
62
81
|
def upload_trace(self, trace: AgentTrace | str | Path | dict[str, Any]) -> dict[str, Any]:
|
|
63
82
|
if isinstance(trace, AgentTrace):
|
|
64
83
|
payload = trace.to_dict()
|
|
@@ -93,6 +112,11 @@ class AgentLoopClient:
|
|
|
93
112
|
route += "?" + urllib.parse.urlencode({"project_id": project_id})
|
|
94
113
|
return self._request("GET", route)
|
|
95
114
|
|
|
115
|
+
def delete_trace(self, run_id: str) -> dict[str, Any]:
|
|
116
|
+
"""Delete a trace of this key's project, with its findings, usage and interventions."""
|
|
117
|
+
encoded_run_id = urllib.parse.quote(run_id, safe="")
|
|
118
|
+
return self._request("DELETE", f"/traces/{encoded_run_id}")
|
|
119
|
+
|
|
96
120
|
def get_report(self, run_id: str) -> dict[str, Any]:
|
|
97
121
|
encoded_run_id = urllib.parse.quote(run_id, safe="")
|
|
98
122
|
return self._request("GET", f"/traces/{encoded_run_id}/report")
|
|
@@ -24,6 +24,7 @@ from agentloop.repetitions import add_repetition_findings
|
|
|
24
24
|
from agentloop.replay import ReplayGates, build_replay_report
|
|
25
25
|
from agentloop.replay import _summary as replay_summary
|
|
26
26
|
from agentloop.schema import TraceValidationError, validate_elapsed_ms
|
|
27
|
+
from agentloop.tokens import is_token_basis_evaluable
|
|
27
28
|
from agentloop.tracer import AgentTrace
|
|
28
29
|
|
|
29
30
|
VERSION = "1.0"
|
|
@@ -433,7 +434,9 @@ def planning_guidance(workload, manifest, traces, objective, minimum_improvement
|
|
|
433
434
|
|
|
434
435
|
The sign test needs at least five pairs before even a unanimous result can
|
|
435
436
|
fall below p = 0.05. When repeated baseline attempts of the same task vary
|
|
436
|
-
|
|
437
|
+
in the objective (latency, or estimated cost) by more than the required
|
|
438
|
+
improvement, smaller differences may be noise. For the cost objective,
|
|
439
|
+
attempts whose cost cannot be measured are reported separately.
|
|
437
440
|
"""
|
|
438
441
|
notes = []
|
|
439
442
|
pairs = len(workload["tasks"]) * workload["repetitions"]
|
|
@@ -455,26 +458,50 @@ def planning_guidance(workload, manifest, traces, objective, minimum_improvement
|
|
|
455
458
|
"measured. Use at least 2 repetitions to see how noisy the agent is.",
|
|
456
459
|
}
|
|
457
460
|
)
|
|
458
|
-
|
|
459
|
-
completed =
|
|
461
|
+
else:
|
|
462
|
+
completed = {
|
|
463
|
+
key: trace
|
|
464
|
+
for key, trace in _completed(manifest, traces).items()
|
|
465
|
+
if _trace_usable(trace)
|
|
466
|
+
}
|
|
467
|
+
if objective == "latency":
|
|
468
|
+
values = {key: trace.elapsed_ms for key, trace in completed.items()}
|
|
469
|
+
else:
|
|
470
|
+
values, unmeasurable = {}, 0
|
|
471
|
+
for key, trace in completed.items():
|
|
472
|
+
report = trace.report()
|
|
473
|
+
if report.get("has_unknown_cost") or not is_token_basis_evaluable(
|
|
474
|
+
report.get("token_status")
|
|
475
|
+
):
|
|
476
|
+
unmeasurable += 1
|
|
477
|
+
else:
|
|
478
|
+
values[key] = float(report.get("estimated_cost_usd") or 0.0)
|
|
479
|
+
if unmeasurable:
|
|
480
|
+
notes.append(
|
|
481
|
+
{
|
|
482
|
+
"kind": "cost_unmeasurable",
|
|
483
|
+
"attempts": unmeasurable,
|
|
484
|
+
"message": f"{unmeasurable} of {len(completed)} completed baseline "
|
|
485
|
+
"attempts have unknown model pricing or estimated token counts, so "
|
|
486
|
+
"their cost cannot be compared and cost gates will be indeterminate. "
|
|
487
|
+
"Record provider token usage and use models with known pricing.",
|
|
488
|
+
}
|
|
489
|
+
)
|
|
460
490
|
spreads = []
|
|
461
491
|
for task in workload["tasks"]:
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
for (task_id, _), trace in completed.items()
|
|
465
|
-
if task_id == task["id"] and _trace_usable(trace)
|
|
466
|
-
]
|
|
467
|
-
middle = statistics.median(values) if len(values) >= 2 else 0
|
|
492
|
+
task_values = [value for (task_id, _), value in values.items() if task_id == task["id"]]
|
|
493
|
+
middle = statistics.median(task_values) if len(task_values) >= 2 else 0
|
|
468
494
|
if middle > 0:
|
|
469
|
-
spreads.append((max(
|
|
495
|
+
spreads.append((max(task_values) - min(task_values)) / middle * 100)
|
|
470
496
|
if spreads:
|
|
471
497
|
spread = statistics.median(spreads)
|
|
472
498
|
if spread >= NOISY_SPREAD_PCT and spread > minimum_improvement:
|
|
473
499
|
notes.append(
|
|
474
500
|
{
|
|
475
501
|
"kind": "noisy_baseline",
|
|
502
|
+
"objective": objective,
|
|
476
503
|
"spread_pct": round(spread, 2),
|
|
477
|
-
"message": f"Baseline
|
|
504
|
+
"message": f"Baseline {objective} of the same task varied by a median "
|
|
478
505
|
f"{spread:.1f}% between repetitions, more than the "
|
|
479
506
|
f"{minimum_improvement:g}% required improvement. Smaller differences "
|
|
480
507
|
"may be noise: require a larger improvement, add repetitions, or "
|