graph-agents-cli 0.3.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- graph_agents_cli/__init__.py +26 -0
- graph_agents_cli/_api_policy.py +2145 -0
- graph_agents_cli/_approvals.py +400 -0
- graph_agents_cli/_build.py +186 -0
- graph_agents_cli/_build_info.json +7 -0
- graph_agents_cli/_chat_client.py +462 -0
- graph_agents_cli/_click.py +157 -0
- graph_agents_cli/_defaults.py +139 -0
- graph_agents_cli/_experiments.py +64 -0
- graph_agents_cli/_http.py +192 -0
- graph_agents_cli/_output.py +83 -0
- graph_agents_cli/_project.py +462 -0
- graph_agents_cli/_remote.py +220 -0
- graph_agents_cli/_response_schema.py +264 -0
- graph_agents_cli/_runner.py +319 -0
- graph_agents_cli/_skills_check.py +274 -0
- graph_agents_cli/_tools.py +189 -0
- graph_agents_cli/_trust.py +66 -0
- graph_agents_cli/api/__init__.py +15 -0
- graph_agents_cli/api/_changes.py +506 -0
- graph_agents_cli/api/_files.py +658 -0
- graph_agents_cli/api/cmd_api.py +2480 -0
- graph_agents_cli/deploy/__init__.py +15 -0
- graph_agents_cli/deploy/_config.py +171 -0
- graph_agents_cli/deploy/_image.py +128 -0
- graph_agents_cli/deploy/_kube.py +286 -0
- graph_agents_cli/deploy/_modes.py +234 -0
- graph_agents_cli/deploy/_preflight.py +370 -0
- graph_agents_cli/deploy/_values.py +168 -0
- graph_agents_cli/deploy/cmd_deploy.py +1866 -0
- graph_agents_cli/deploy/gitops.py +562 -0
- graph_agents_cli/deploy/local_load.py +273 -0
- graph_agents_cli/dev/__init__.py +13 -0
- graph_agents_cli/dev/cmd_build.py +131 -0
- graph_agents_cli/dev/cmd_install.py +78 -0
- graph_agents_cli/dev/cmd_lint.py +119 -0
- graph_agents_cli/dev/cmd_playground.py +297 -0
- graph_agents_cli/dev/policy_check.py +1287 -0
- graph_agents_cli/eval/__init__.py +22 -0
- graph_agents_cli/eval/_client.py +670 -0
- graph_agents_cli/eval/_common.py +177 -0
- graph_agents_cli/eval/_judge.py +168 -0
- graph_agents_cli/eval/_judge_runner.py +238 -0
- graph_agents_cli/eval/_paths.py +212 -0
- graph_agents_cli/eval/checks.py +581 -0
- graph_agents_cli/eval/cmd_analyze.py +278 -0
- graph_agents_cli/eval/cmd_compare.py +284 -0
- graph_agents_cli/eval/cmd_eval_group.py +80 -0
- graph_agents_cli/eval/cmd_generate.py +558 -0
- graph_agents_cli/eval/cmd_grade.py +466 -0
- graph_agents_cli/eval/cmd_metric.py +156 -0
- graph_agents_cli/eval/cmd_run.py +370 -0
- graph_agents_cli/eval/cmd_submit.py +400 -0
- graph_agents_cli/eval/config.py +435 -0
- graph_agents_cli/eval/dataset.py +350 -0
- graph_agents_cli/eval/gate.py +420 -0
- graph_agents_cli/eval/transcript.py +192 -0
- graph_agents_cli/extension/__init__.py +13 -0
- graph_agents_cli/extension/_compat.py +86 -0
- graph_agents_cli/extension/_loader.py +293 -0
- graph_agents_cli/extension/_manifest.py +135 -0
- graph_agents_cli/extension/_overrides.py +195 -0
- graph_agents_cli/extension/_paths.py +91 -0
- graph_agents_cli/extension/_refs.py +193 -0
- graph_agents_cli/extension/_resolver.py +453 -0
- graph_agents_cli/extension/_schema.py +106 -0
- graph_agents_cli/extension/_spec.py +253 -0
- graph_agents_cli/extension/_sync.py +102 -0
- graph_agents_cli/extension/_trust.py +58 -0
- graph_agents_cli/extension/cmd_extension_add.py +259 -0
- graph_agents_cli/extension/cmd_extension_group.py +57 -0
- graph_agents_cli/extension/cmd_extension_list.py +56 -0
- graph_agents_cli/extension/cmd_extension_remove.py +61 -0
- graph_agents_cli/extension/cmd_extension_update.py +195 -0
- graph_agents_cli/info/__init__.py +13 -0
- graph_agents_cli/info/cmd_info.py +222 -0
- graph_agents_cli/infra/__init__.py +15 -0
- graph_agents_cli/infra/checks.py +1169 -0
- graph_agents_cli/infra/cmd_infra.py +103 -0
- graph_agents_cli/main.py +591 -0
- graph_agents_cli/peer/__init__.py +15 -0
- graph_agents_cli/peer/_generate.py +254 -0
- graph_agents_cli/peer/cmd_peer.py +1151 -0
- graph_agents_cli/run/__init__.py +13 -0
- graph_agents_cli/run/_local_server.py +1157 -0
- graph_agents_cli/run/_signals.py +141 -0
- graph_agents_cli/run/cmd_approvals.py +530 -0
- graph_agents_cli/run/cmd_run.py +1421 -0
- graph_agents_cli/scaffold/__init__.py +19 -0
- graph_agents_cli/scaffold/agents/README.md +24 -0
- graph_agents_cli/scaffold/agents/empty_py/.template/templateconfig.yaml +22 -0
- graph_agents_cli/scaffold/agents/langgraph/.env.example +292 -0
- graph_agents_cli/scaffold/agents/langgraph/.template/templateconfig.yaml +28 -0
- graph_agents_cli/scaffold/agents/langgraph/Dockerfile +59 -0
- graph_agents_cli/scaffold/agents/langgraph/Dockerfile.langgraph-server +59 -0
- graph_agents_cli/scaffold/agents/langgraph/README.md +571 -0
- graph_agents_cli/scaffold/agents/langgraph/api-policy.yaml +60 -0
- graph_agents_cli/scaffold/agents/langgraph/app/__init__.py +20 -0
- graph_agents_cli/scaffold/agents/langgraph/app/agent.py +174 -0
- graph_agents_cli/scaffold/agents/langgraph/app/app_utils/__init__.py +15 -0
- graph_agents_cli/scaffold/agents/langgraph/app/app_utils/a2a.py +2162 -0
- graph_agents_cli/scaffold/agents/langgraph/app/app_utils/a2a_client.py +1167 -0
- graph_agents_cli/scaffold/agents/langgraph/app/app_utils/api_client.py +4220 -0
- graph_agents_cli/scaffold/agents/langgraph/app/app_utils/approvals.py +1349 -0
- graph_agents_cli/scaffold/agents/langgraph/app/app_utils/auth.py +1986 -0
- graph_agents_cli/scaffold/agents/langgraph/app/app_utils/chat.py +2962 -0
- graph_agents_cli/scaffold/agents/langgraph/app/app_utils/checkpointer.py +432 -0
- graph_agents_cli/scaffold/agents/langgraph/app/app_utils/content.py +569 -0
- graph_agents_cli/scaffold/agents/langgraph/app/app_utils/db.py +580 -0
- graph_agents_cli/scaffold/agents/langgraph/app/app_utils/limits.py +203 -0
- graph_agents_cli/scaffold/agents/langgraph/app/app_utils/metrics.py +231 -0
- graph_agents_cli/scaffold/agents/langgraph/app/app_utils/middleware.py +361 -0
- graph_agents_cli/scaffold/agents/langgraph/app/app_utils/model.py +611 -0
- graph_agents_cli/scaffold/agents/langgraph/app/app_utils/playground.py +230 -0
- graph_agents_cli/scaffold/agents/langgraph/app/app_utils/run_locks.py +459 -0
- graph_agents_cli/scaffold/agents/langgraph/app/app_utils/structured.py +755 -0
- graph_agents_cli/scaffold/agents/langgraph/app/app_utils/telemetry.py +681 -0
- graph_agents_cli/scaffold/agents/langgraph/app/app_utils/threads.py +493 -0
- graph_agents_cli/scaffold/agents/langgraph/app/app_utils/token_exchange.py +959 -0
- graph_agents_cli/scaffold/agents/langgraph/app/fast_api_app.py +770 -0
- graph_agents_cli/scaffold/agents/langgraph/app/policies/__init__.py +55 -0
- graph_agents_cli/scaffold/agents/langgraph/app/policies/custom.py +97 -0
- graph_agents_cli/scaffold/agents/langgraph/app/tools/__init__.py +46 -0
- graph_agents_cli/scaffold/agents/langgraph/app/tools/example_api.py +92 -0
- graph_agents_cli/scaffold/agents/langgraph/app/tools/weather.py +33 -0
- graph_agents_cli/scaffold/agents/langgraph/langgraph.json +14 -0
- graph_agents_cli/scaffold/agents/langgraph/pyproject.toml +78 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/conftest.py +376 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/eval/datasets/basic-dataset.json +53 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/eval/eval_config.yaml +32 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/integration/approval_graph.py +137 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/integration/fake_issuer.py +216 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/integration/fake_openai.py +357 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_a2a_outcomes.py +569 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_a2a_relay.py +479 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_api_surface.py +812 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_approvals.py +1367 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_approvals_server.py +794 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_cross_actor.py +497 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_cross_actor_server.py +247 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_history_repair.py +278 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_model_apis.py +242 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_postgres.py +637 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_resilience_postgres.py +770 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_runtime_guardrails.py +854 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_server_e2e.py +340 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_server_runtime.py +989 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_structured_answers.py +584 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_structured_server.py +222 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_token_exchange_issuer.py +650 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/load_test/.results/.placeholder +0 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/load_test/README.md +22 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/load_test/conftest.py +21 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/load_test/load_test.py +81 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_a2a_client.py +824 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_a2a_scoping.py +724 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_api_client.py +1214 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_api_client_hardening.py +716 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_api_policy_rpc.py +767 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_approval_ledger.py +1536 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_fake_model.py +115 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_jwt_policy.py +991 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_limits.py +310 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_logging.py +148 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_logging_hardening.py +271 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_policy.py +378 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_resilience.py +610 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_server_auth.py +702 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_structured.py +673 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_telemetry.py +404 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_thread_listing.py +255 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_threads.py +268 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_token_exchange.py +1320 -0
- graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_untrusted_content.py +393 -0
- graph_agents_cli/scaffold/agents/langgraph/uv-fastapi.lock +2084 -0
- graph_agents_cli/scaffold/agents/langgraph/uv-langgraph-server.lock +2106 -0
- graph_agents_cli/scaffold/agents/langgraph/{{cookiecutter.agent_guidance_filename}} +129 -0
- graph_agents_cli/scaffold/base_templates/_shared/graph-agents-cli-manifest.yaml +36 -0
- graph_agents_cli/scaffold/base_templates/python/.dockerignore +32 -0
- graph_agents_cli/scaffold/base_templates/python/.github/CODEOWNERS +30 -0
- graph_agents_cli/scaffold/base_templates/python/.github/agent.env +7 -0
- graph_agents_cli/scaffold/base_templates/python/.github/workflows/pr_checks.yaml +214 -0
- graph_agents_cli/scaffold/base_templates/python/.gitignore +209 -0
- graph_agents_cli/scaffold/base_templates/python/tests/unit/test_dummy.py +23 -0
- graph_agents_cli/scaffold/base_templates/python/{{cookiecutter.agent_guidance_filename}} +35 -0
- graph_agents_cli/scaffold/cmd_scaffold_group.py +49 -0
- graph_agents_cli/scaffold/commands/__init__.py +13 -0
- graph_agents_cli/scaffold/commands/create.py +1424 -0
- graph_agents_cli/scaffold/commands/enhance.py +1652 -0
- graph_agents_cli/scaffold/commands/upgrade.py +570 -0
- graph_agents_cli/scaffold/deployment_targets/kubernetes/python/.github/agent.env +12 -0
- graph_agents_cli/scaffold/deployment_targets/kubernetes/python/.github/workflows/promote-to-prod.yaml +371 -0
- graph_agents_cli/scaffold/deployment_targets/kubernetes/python/.github/workflows/staging.yaml +450 -0
- graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/argocd/application-dev.yaml +43 -0
- graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/argocd/application-prod.yaml +41 -0
- graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/argocd/application-staging.yaml +43 -0
- graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/.helmignore +14 -0
- graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/Chart.yaml +21 -0
- graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/examples/networkpolicy.yaml +103 -0
- graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/templates/NOTES.txt +48 -0
- graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/templates/_helpers.tpl +189 -0
- graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/templates/certificate.yaml +15 -0
- graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/templates/configmap.yaml +10 -0
- graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/templates/deployment.yaml +199 -0
- graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/templates/hpa.yaml +22 -0
- graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/templates/httproute.yaml +30 -0
- graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/templates/ingress.yaml +39 -0
- graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/templates/networkpolicy.yaml +48 -0
- graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/templates/pdb.yaml +13 -0
- graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/templates/postgresql-secret.yaml +37 -0
- graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/templates/service.yaml +15 -0
- graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/templates/serviceaccount.yaml +13 -0
- graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/templates/servicemonitor.yaml +42 -0
- graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/values-dev.yaml +22 -0
- graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/values-prod.yaml +45 -0
- graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/values-staging.yaml +29 -0
- graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/values.yaml +396 -0
- graph_agents_cli/scaffold/deployment_targets/kubernetes/python/tests/integration/test_chart.py +269 -0
- graph_agents_cli/scaffold/deployment_targets/none/README.md +5 -0
- graph_agents_cli/scaffold/deployment_targets/none/python/README.md +6 -0
- graph_agents_cli/scaffold/utils/__init__.py +13 -0
- graph_agents_cli/scaffold/utils/backup.py +212 -0
- graph_agents_cli/scaffold/utils/build_record.py +257 -0
- graph_agents_cli/scaffold/utils/cli_options.py +184 -0
- graph_agents_cli/scaffold/utils/fs.py +83 -0
- graph_agents_cli/scaffold/utils/generate_locks.py +214 -0
- graph_agents_cli/scaffold/utils/generation_metadata.py +88 -0
- graph_agents_cli/scaffold/utils/keyedit.py +768 -0
- graph_agents_cli/scaffold/utils/keymerge.py +537 -0
- graph_agents_cli/scaffold/utils/language.py +138 -0
- graph_agents_cli/scaffold/utils/lock_utils.py +94 -0
- graph_agents_cli/scaffold/utils/logging.py +77 -0
- graph_agents_cli/scaffold/utils/manifest.py +292 -0
- graph_agents_cli/scaffold/utils/merge.py +970 -0
- graph_agents_cli/scaffold/utils/merge3.py +216 -0
- graph_agents_cli/scaffold/utils/openapi_seed.py +199 -0
- graph_agents_cli/scaffold/utils/remote_template.py +376 -0
- graph_agents_cli/scaffold/utils/template.py +1352 -0
- graph_agents_cli/scaffold/utils/upgrade.py +894 -0
- graph_agents_cli/scaffold/utils/version.py +438 -0
- graph_agents_cli/secrets/__init__.py +15 -0
- graph_agents_cli/secrets/_apply.py +954 -0
- graph_agents_cli/secrets/_required.py +188 -0
- graph_agents_cli/secrets/cmd_secrets.py +211 -0
- graph_agents_cli/setup/__init__.py +13 -0
- graph_agents_cli/setup/_antigravity.py +221 -0
- graph_agents_cli/setup/cmd_auth.py +1030 -0
- graph_agents_cli/setup/cmd_dev_token.py +513 -0
- graph_agents_cli/setup/cmd_setup.py +428 -0
- graph_agents_cli/setup/cmd_update.py +140 -0
- graph_agents_cli/skills/__init__.py +13 -0
- graph_agents_cli/skills/_bundle.py +65 -0
- graph_agents_cli/skills/data/README.md +19 -0
- graph_agents_cli/skills/data/graph-agents-cli-deploy/SKILL.md +357 -0
- graph_agents_cli/skills/data/graph-agents-cli-deploy/references/github-settings.md +113 -0
- graph_agents_cli/skills/data/graph-agents-cli-deploy/references/gitops.md +137 -0
- graph_agents_cli/skills/data/graph-agents-cli-deploy/references/kubernetes.md +315 -0
- graph_agents_cli/skills/data/graph-agents-cli-deploy/references/secrets.md +160 -0
- graph_agents_cli/skills/data/graph-agents-cli-eval/SKILL.md +303 -0
- graph_agents_cli/skills/data/graph-agents-cli-eval/references/dataset_schema.md +282 -0
- graph_agents_cli/skills/data/graph-agents-cli-eval/references/metrics-guide.md +143 -0
- graph_agents_cli/skills/data/graph-agents-cli-langgraph-code/SKILL.md +659 -0
- graph_agents_cli/skills/data/graph-agents-cli-langgraph-code/references/langchain-models.md +124 -0
- graph_agents_cli/skills/data/graph-agents-cli-langgraph-code/references/langgraph.md +235 -0
- graph_agents_cli/skills/data/graph-agents-cli-langgraph-code/references/template-contract.md +477 -0
- graph_agents_cli/skills/data/graph-agents-cli-observability/SKILL.md +231 -0
- graph_agents_cli/skills/data/graph-agents-cli-observability/references/langsmith.md +46 -0
- graph_agents_cli/skills/data/graph-agents-cli-observability/references/otel.md +59 -0
- graph_agents_cli/skills/data/graph-agents-cli-scaffold/SKILL.md +414 -0
- graph_agents_cli/skills/data/graph-agents-cli-scaffold/references/flags.md +134 -0
- graph_agents_cli/skills/data/graph-agents-cli-workflow/SKILL.md +478 -0
- graph_agents_cli/skills/data/graph-agents-cli-workflow/references/brainstorming.md +118 -0
- graph_agents_cli/skills/data/graph-agents-cli-workflow/references/commands.md +419 -0
- graph_agents_cli/skills/data/graph-agents-cli-workflow/references/extension.md +156 -0
- graph_agents_cli/skills/data/graph-agents-cli-workflow/references/internals.md +67 -0
- graph_agents_cli/skills/data/graph-agents-cli-workflow/references/spec-template.md +56 -0
- graph_agents_cli/skills/data/graph-agents-cli-workflow/references/terminology.md +119 -0
- graph_agents_cli/system/__init__.py +15 -0
- graph_agents_cli/system/_apply.py +519 -0
- graph_agents_cli/system/_checks.py +1023 -0
- graph_agents_cli/system/_deploy.py +215 -0
- graph_agents_cli/system/_model.py +363 -0
- graph_agents_cli/system/_system.py +664 -0
- graph_agents_cli/system/_views.py +208 -0
- graph_agents_cli/system/cmd_system.py +423 -0
- graph_agents_cli-0.3.1.dist-info/METADATA +162 -0
- graph_agents_cli-0.3.1.dist-info/RECORD +291 -0
- graph_agents_cli-0.3.1.dist-info/WHEEL +4 -0
- graph_agents_cli-0.3.1.dist-info/entry_points.txt +2 -0
- graph_agents_cli-0.3.1.dist-info/licenses/LICENSE +201 -0
- graph_agents_cli-0.3.1.dist-info/licenses/NOTICE +19 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Underlying commands reference
|
|
2
|
+
|
|
3
|
+
`graph-agents-cli` wraps lower-level tools and shells out to them; it never imports a Kubernetes
|
|
4
|
+
or Docker SDK. When you need a flag or behaviour the CLI does not expose, or when the 3-strikes
|
|
5
|
+
rule says stop retrying, run the underlying command directly from the project root.
|
|
6
|
+
|
|
7
|
+
Tools are located with `require_tool` (`PATH`, then well-known locations) and every subprocess is
|
|
8
|
+
logged; `--dry-run` on `deploy` prints the exact command lines.
|
|
9
|
+
|
|
10
|
+
## Develop and test
|
|
11
|
+
|
|
12
|
+
| `graph-agents-cli` command | Runs |
|
|
13
|
+
|---|---|
|
|
14
|
+
| `playground` (runtime `fastapi`) | `APP_ENV=dev uv run uvicorn <agent_directory>.fast_api_app:app --reload --host 127.0.0.1 --port <port>` (port 8000 by default; opens the browser unless `--no-open`) |
|
|
15
|
+
| `playground` (runtime `langgraph-server`) | `APP_ENV=dev uv run langgraph dev --no-browser --port <port>` (the server is the application; `/chat` and `/playground` are custom routes from `langgraph.json` `http.app`) |
|
|
16
|
+
| `playground --graph` (either runtime) | `uv run langgraph dev --port <port>` and opens LangGraph Studio; needs the `langgraph-cli[inmem]` dev dependency |
|
|
17
|
+
| `run "prompt"` (runtime `fastapi`) | checks the port first (the first free one of 18080-18089, or `--port` / `GRAPH_AGENTS_CLI_RUN_PORT`, exit 3 when taken), starts `uv run uvicorn <agent_directory>.fast_api_app:app --host 127.0.0.1 --port <port>` detached (with the settings of `.env` in its environment from the start, below the shell's, as `load_dotenv` would set them; `playground` does the same), records `.graph-agents-cli/run_server.json` (`pid`, `port`, `started_at`, `last_activity`, `runtime`, `checkpointer`, `state` `starting`/`ready`, `create_time`), `POST /chat` with `Accept: text/event-stream`, prints the reply, stops a server it started itself (also on SIGTERM/SIGHUP/Ctrl-C, with signals held until the record is removed); a server that exits during startup or misses the 60 s `GET /health` readiness check is terminated and reported (exit 2); a recorded PID now owned by another process is never signalled; local runs send `Authorization: Bearer <API_KEY>` from `.env` unless `--header`/`GRAPH_AGENTS_CLI_API_KEY` is given (under `jwt`, `GRAPH_AGENTS_CLI_API_KEY` holds the token, from `auth dev-token` locally) |
|
|
18
|
+
| `run "prompt"` (runtime `langgraph-server`) | same lifecycle with `uv run langgraph dev --no-browser --port <port>` (in-memory server locally) |
|
|
19
|
+
| `run --url URL --mode chat` | `POST <URL>/chat` (SSE) with the credential from `--header`, `GRAPH_AGENTS_CLI_API_KEY`, or `--cookie` |
|
|
20
|
+
| `run --url URL --mode a2a` | needs the `a2a` extra (one-line hint with the install command otherwise, before any server starts); fetches `<URL>/a2a/<agent_directory>/.well-known/agent-card.json` (then the root card), then JSON-RPC to `<URL>/a2a/<agent_directory>`; locally targets `http://127.0.0.1:<port>/a2a/<agent_directory>` without probing |
|
|
21
|
+
| `install` | `uv sync` (`--clean` deletes `.venv` first; `--locked` is `uv sync --locked`) |
|
|
22
|
+
| `lint` | `uv run ruff check .` + `uv run ruff format . --check` + the CLI's own `dev/policy_check.py`, which parses every `*.py` under `<agent_directory>/tools/` (subpackages and their `__init__.py` included, the top-level `__init__.py` excluded, symlinked directories followed once) with `ast`, reads the literal `API_CALLS` list (no import, no model SDK), validates `api-policy.yaml` with the runtime's strict schema and checks each entry against the named API's rules and, when set, its OpenAPI spec (resolved relative to the project root); prints a table, the `graph-agents-cli api` command that would allow each refused call, and the violation count; `--policy-only` skips ruff |
|
|
23
|
+
| `lint --fix` | `uv run ruff check . --fix && uv run ruff format .` then the policy check |
|
|
24
|
+
| `api add\|access\|allow\|deny\|revoke\|limits\|remove` | no subprocess: reads `api-policy.yaml` and the manifest, validates with the shared rules, edits the text at the positions PyYAML reports (comments and key order kept; the result re-parsed and compared with the intended document), prints a unified diff of `api-policy.yaml`, `graph-agents-cli-manifest.yaml`, `.env.example` and `deployment/helm/<name>/values*.yaml`, then writes each through a temporary file renamed over it, line endings and an existing file's mode kept, a new file at 0666 less the umask (`--dry-run` stops before) |
|
|
25
|
+
| `api show` / `api check` | the policy check of `lint` (`api check` is exactly `lint --policy-only`) |
|
|
26
|
+
| `build` | `docker build -t <registry>/<name>:<tag> -f Dockerfile .` (the Dockerfile is runtime-specific: a multi-stage `python:3.12.14-slim-bookworm` image with a pinned uv in the build stage only, or `FROM langchain/langgraph-api:0.14.4-py3.12` for `langgraph-server`, checked against `uv.lock` at build time; both run as 1000:1000; `langgraph build` is never used); the registry is validated first (exit 3 for `ghcr.io/CHANGE-ME` or an invalid reference) |
|
|
27
|
+
|
|
28
|
+
## Evaluate
|
|
29
|
+
|
|
30
|
+
| Command | Runs |
|
|
31
|
+
|---|---|
|
|
32
|
+
| `eval generate` | starts the local server as `run` does (or uses `--url`), sends each case's messages to `POST /chat` on a fresh `thread_id`, derives `response`, `tool_calls`, `usage`, `latency_ms`, `status` from the SSE events, writes `artifacts/traces/traces_<ts>.json` |
|
|
33
|
+
| `eval grade` | deterministic `expect` checks in the CLI process first; then stages `.graph-agents-cli/judge_runner.py` into the project and runs `uv run python .graph-agents-cli/judge_runner.py in.json out.json` from the project root, which calls `app.app_utils.model.get_judge_model()` (JUDGE_* env; `--judge-provider/--judge-model` are passed as `JUDGE_MODEL_PROVIDER`/`JUDGE_MODEL_NAME`) for judge and custom metrics; writes `artifacts/grade_results/results_<ts>.json` (suffix `_2`, `_3` on a name clash); no eval service and no LangChain in the CLI |
|
|
34
|
+
| `eval run` | `generate` then `grade`, worst exit code wins; each stage honours an installed extension override |
|
|
35
|
+
| `eval analyze` | in-process deterministic clustering of non-passed cases into `artifacts/analysis_<ts>.json`; `--judge` summarises clusters through the same judge runner |
|
|
36
|
+
| `eval submit` | LangSmith SDK (`langsmith` extra): creates or updates the dataset and examples, then an experiment with runs and feedback from the results file |
|
|
37
|
+
|
|
38
|
+
## Deploy
|
|
39
|
+
|
|
40
|
+
| Command | Runs |
|
|
41
|
+
|---|---|
|
|
42
|
+
| `infra check` | tool presence (helm, kubectl, docker, gh, argocd when `cd: argocd`); `kubectl version` (cluster reachable, Kubernetes >= 1.28); `kubectl get crd httproutes.gateway.networking.k8s.io` then `kubectl get gatewayclass` (when `gateway.enabled`); `kubectl get ingressclass` (when `ingress.enabled`); `kubectl get crd certificates.cert-manager.io` (when `tls.certManager.enabled`); `kubectl get apiservice v1beta1.metrics.k8s.io` (when `hpa.enabled`); `kubectl get namespace argocd` + `kubectl get crd applications.argoproj.io` (when `cd: argocd`); `kubectl get namespace <ns>`, `kubectl -n <ns> get secret <pull-secret>` (from `imagePullSecrets`) and `kubectl -n <ns> get secret <name>-app` (its required keys); the `CHANGE-ME` placeholders in the manifest registry, the chart's `image.repository` and `env`, `.github/CODEOWNERS` and the Argo CD `repoURL`; `gh api repos/<owner>/<repo>/environments/production`, `.../environments/staging` and `.../branches/main/protection` when `gh` is logged in and `cd != skip`, plus (helm-push) `.../environments/<env>/secrets/DEPLOY_KUBECONFIG` and the repository/organization kubeconfig secrets; `--profile disconnected` adds the disconnected-profile checks (provider, `OPENAI_BASE_URL`, runtime, registry, tracing, CI runner labels, `GRAPH_AGENTS_CLI_NO_UPDATE_CHECK`). Read-only |
|
|
43
|
+
| `secrets apply --env <env>` | resolves the env file (`.env.<env>`; `.env` for dev only) and the kube context (confirmed outside dev); `kubectl create namespace <namespace>` when absent; `kubectl get secret <release>-app -o json` (live keys, merged under the file's); `kubectl -n <namespace> create secret generic <release>-app --from-env-file=<0600 temporary file holding only the allow-listed keys> --dry-run=client -o yaml \| kubectl apply --server-side --field-manager=graph-agents-cli --force-conflicts -f -`; the temporary file is deleted afterwards; a leftover `last-applied-configuration` annotation is removed; `API_KEY` is generated only when absent from the file and from the live Secret and then written to the env file (0600), never printed; multi-line values are exit 3; not refused under CI |
|
|
44
|
+
| `secrets status --env <env>` | `kubectl -n <namespace> get secret <release>-app -o json` and lists present, missing required, missing optional and unexpected key names; exit 1 when the Secret or a required key is missing (`--strict`: any allow-listed key), 2 when kubectl fails |
|
|
45
|
+
| `deploy --env dev` (direct, local-load) | a read-only check of the Secret it would produce (required keys; exit 1 before building) and of the release (`helm history`; a `pending-*` revision is exit 2); `docker build -t <registry>/<name>:<tag>` (`git rev-parse --short HEAD`, plus `-dirty-<time>` for uncommitted changes, else a UTC timestamp, or `--tag`); then `kind load docker-image` / `k3d image import` / `docker save` + `k3s ctr images import` (no sudo; usually needs root) / `minikube image load` (none for docker-desktop, rancher-desktop, orbstack), chosen from the cluster's nodes and confirmed with `kind get clusters` / `k3d cluster list` / `minikube profile list`; the Secret pipeline of `secrets apply` (skipped when dev has no env file); `helm dependency build deployment/helm/<name>` when a subchart is missing from `charts/`; `helm upgrade --install <release> deployment/helm/<name> -n <namespace> --create-namespace -f values.yaml -f values-<env>.yaml --set image.repository=...,image.tag=<tag>,existingSecret=<release>-app --wait --timeout <5m> --kube-context <context>`; on failure `kubectl get pods`, container states, warning events and logs, then `helm rollback <release> <last good>` (or `helm uninstall` of a failed first install) with `--atomic` |
|
|
46
|
+
| `deploy --env <env>` (direct, registry) | the same checks, `docker build`, `docker push <registry>/<name>:<tag>`, the Secret pipeline, `helm dependency build` when needed, `helm upgrade --install ... --wait --timeout` with the same failure handling |
|
|
47
|
+
| `deploy --image <ref> --env <env>` (helm-push, from the CI runner) | the live Secret's required keys and the release state, `helm dependency build` when needed, then `helm upgrade --install ...` only; refused outside CI (`GITHUB_ACTIONS=true`) for staging/prod even with `--image`, unless `--force-direct` |
|
|
48
|
+
| `deploy --env <env> --image <ref>` (argocd) | rewrites `image.tag` in `origin/main`'s copy of `deployment/helm/<name>/values-<env>.yaml` (`git cat-file blob`; the working tree is untouched), then builds branch `deploy/<env>/<short sha>` with git plumbing (`git fetch origin main`, `hash-object --stdin`, `read-tree`, `update-index` with a repo-relative path, `write-tree`, `commit-tree`, `update-ref`; the checkout is never switched), `git push --force-with-lease=refs/heads/deploy/<env>/<short sha>:<sha on origin>` (nothing when origin already holds the change), `gh pr list`/`gh pr create --repo <host>/<owner>/<repo>` (or GitHub REST with `GITHUB_TOKEN`/`GH_TOKEN`/`GH_ENTERPRISE_TOKEN`; `GH_HOST` for GitHub Enterprise Server); without `--image` the tag is `--tag` or the short git sha with a warning; never helm, never merges |
|
|
49
|
+
| `deploy --status --env <env>` | `kubectl -n <namespace> rollout status deploy/<release>` or, in argocd mode, `argocd app get <name>-<env>` |
|
|
50
|
+
| `deploy --restart --env <env>` | `kubectl -n <namespace> rollout restart deploy/<release>` (warns that Argo self-heal may revert it in argocd environments) |
|
|
51
|
+
| `deploy --dry-run` | prints every command above with a `[dry-run]` prefix and `helm template` output without executing, except `helm dependency build`, which is executed when subcharts are missing because the render needs them |
|
|
52
|
+
|
|
53
|
+
## Rollback
|
|
54
|
+
|
|
55
|
+
- Direct and helm-push modes: a failed rollout is rolled back by `deploy` itself (`--atomic`,
|
|
56
|
+
the default), acting only on the revision that run created. For a release that deployed fine,
|
|
57
|
+
`helm history <release> -n <namespace>` then `helm rollback <release> <revision> -n <namespace>`.
|
|
58
|
+
- argocd mode: revert the values change on `main` with a PR (the same gate applies), then let Argo
|
|
59
|
+
reconcile. `argocd app history` and `argocd app rollback` are Argo-side tools for emergencies.
|
|
60
|
+
|
|
61
|
+
## Scaffold
|
|
62
|
+
|
|
63
|
+
| Command | Runs |
|
|
64
|
+
|---|---|
|
|
65
|
+
| `create` | cookiecutter layering (`base_templates/_shared` -> `base_templates/python` -> `deployment_targets/<target>` -> `agents/langgraph`), conditional-file selection by runtime and CD mode, copies `uv-<runtime>.lock` to `uv.lock` (substituting the project name), reconciles the manifest against the contract, then `uv sync`; remote `--agent` specs are shallow-cloned with `git`; the registry default comes from the git `origin` owner |
|
|
66
|
+
| `scaffold enhance` | renders old and new baselines and runs the 3-way merge; a backup goes to `~/.graph-agents-cli/backups/<dir>_<project id>_<timestamp>/` first (0700, the newest 5 per project kept); a runtime or provider change also merges the chart values and `.github/agent.env` key by key around your edits; when the merge changes the manifest it is rewritten through the YAML dumper (block style, comments dropped) and `.github/agent.env` is updated |
|
|
67
|
+
| `scaffold upgrade` | `uvx --from <spec of the old build> graph-agents-cli scaffold create ...` to regenerate the authentic old baseline (the `--baseline-ref` build, else the commit the manifest's `cli_build` records for a build between releases, else the `cli_version` release), then the 3-way merge; at the running version it compares `cli_build` (build id, then `template_digest`) and says "already at version" when nothing differs; stops without changes (exit 2) if that build cannot be fetched unless `--baseline current`, which cannot tell edits from template changes since the old version; records the running build in `cli_build` |
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Agent spec template
|
|
2
|
+
|
|
3
|
+
Write `.graph-agents-cli-spec.md` in the project's working directory. **If the project declares a
|
|
4
|
+
`process:` (manifest or guidance file), do not write this file as a substitute for that process's
|
|
5
|
+
documents; the process's approvals are the gate.** This template applies when no process is
|
|
6
|
+
declared.
|
|
7
|
+
|
|
8
|
+
```markdown
|
|
9
|
+
# Agent Spec
|
|
10
|
+
|
|
11
|
+
## Overview
|
|
12
|
+
The agent's purpose, who calls it, and how it works in two or three sentences.
|
|
13
|
+
|
|
14
|
+
## Example Use Cases
|
|
15
|
+
Concrete examples with expected inputs and outputs. These become the first eval cases.
|
|
16
|
+
|
|
17
|
+
## Tools Required
|
|
18
|
+
Each tool with its purpose. For tools that call an external API: the API name, the HTTP method and
|
|
19
|
+
operationId (or path) it calls, and the credential (`forward`, `bearer`, or `none`). Every
|
|
20
|
+
operation listed here must be allowed by `api-policy.yaml`.
|
|
21
|
+
|
|
22
|
+
## Model and Egress
|
|
23
|
+
Provider (`openai` | `anthropic` | `gemini` | `openai-compatible`) and model. State explicitly what
|
|
24
|
+
context may leave the network (prompts, tool results, retrieved data) and whether traces may be
|
|
25
|
+
exported (`TRACING_ENABLED`, `TRACE_CAPTURE`).
|
|
26
|
+
|
|
27
|
+
## Runtime and Persistence
|
|
28
|
+
`fastapi` (default) or `langgraph-server`; `memory` locally and `postgres` when deployed;
|
|
29
|
+
whether threads must survive restarts; whether any tool call requires a human-in-the-loop
|
|
30
|
+
interrupt.
|
|
31
|
+
|
|
32
|
+
## Authentication
|
|
33
|
+
`shared-bearer` (internal tools, dev), `jwt` (per-user OIDC tokens; conversation ownership
|
|
34
|
+
enforced; read-across roles listed), or `custom` (the project's own policy, for example an existing
|
|
35
|
+
application's session).
|
|
36
|
+
|
|
37
|
+
## Constraints and Safety Rules
|
|
38
|
+
Specific rules, not generic statements: what the agent must never do, which operations are denied,
|
|
39
|
+
what to refuse, how to handle missing data.
|
|
40
|
+
|
|
41
|
+
## Success Criteria
|
|
42
|
+
Measurable outcomes for evaluation: which `expect` checks each use case must satisfy, which judge
|
|
43
|
+
metrics apply with what threshold, and which of those are quality metrics with a `min_pass_rate`.
|
|
44
|
+
|
|
45
|
+
## Deployment Shape
|
|
46
|
+
Prototype first (`--prototype`) or Kubernetes; if Kubernetes: registry, CD mode
|
|
47
|
+
(`skip` | `helm-push` | `argocd`), environments, and who owns secrets.
|
|
48
|
+
|
|
49
|
+
## Assumptions
|
|
50
|
+
One line per decision you made for the user (data sources, auth method, model, schedule). The user
|
|
51
|
+
corrects these at review.
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Optional sections for detailed specs: **Edge Cases to Handle**, **Graph Design** (nodes, edges,
|
|
55
|
+
subgraphs, interrupts), **Data Sources and Auth**, **Non-Functional Requirements** (latency,
|
|
56
|
+
token budgets), **Future Phases**.
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# Terminology: user terms to CLI values
|
|
2
|
+
|
|
3
|
+
Users describe the same thing in many ways. Map their words to graph-agents-cli values before
|
|
4
|
+
choosing flags or editing configuration.
|
|
5
|
+
|
|
6
|
+
## Runtime and framework
|
|
7
|
+
|
|
8
|
+
| User says | CLI value |
|
|
9
|
+
|---|---|
|
|
10
|
+
| "LangGraph", "a graph", "StateGraph", "ReAct agent", "create_agent" | `--agent langgraph` (the only bundled template); the graph lives in `app/agent.py` |
|
|
11
|
+
| "plain FastAPI", "just a container", "no license", "simplest thing" | `--runtime fastapi` (default) |
|
|
12
|
+
| "LangGraph Platform", "LangGraph Server", "Agent Server", "langgraph-api", "Assistants/Threads/Runs API", "Studio-compatible server" | `--runtime langgraph-server` (needs Postgres and Redis; the deployed `langgraph-api` image checks for a LangGraph licence at startup, so it is outside the disconnected profile; the local `langgraph dev` server needs no licence) |
|
|
13
|
+
| "LangGraph Studio", "visual graph debugger" | `graph-agents-cli playground --graph` (`langgraph dev`, bypasses auth) |
|
|
14
|
+
| "chat page", "try it in the browser" | `graph-agents-cli playground` (`/playground`, only when `APP_ENV=dev`) |
|
|
15
|
+
| "A2A", "agent-to-agent", "agent card" | built in: `/a2a/<agent_directory>/.well-known/agent-card.json`; `run --mode a2a`; tasks are private to their principal, kept in Postgres under `CHECKPOINTER=postgres` (every replica sees them, restarts keep them), else in process memory (`A2A_TASK_TTL_S`) |
|
|
16
|
+
| "health check", "liveness", "readiness", "probe" | `GET /health` (liveness), `GET /ready` (the database answers) |
|
|
17
|
+
| "metrics", "Prometheus", "monitoring" | `GET /metrics` (`METRICS_ENABLED`, optional `METRICS_TOKEN`); chart `metrics.serviceMonitor` / `metrics.scrapeAnnotations` |
|
|
18
|
+
| "timeout", "runaway agent", "loop" | `RUN_TIMEOUT_S`, `MODEL_TIMEOUT_S`, `MODEL_MAX_RETRIES`, `RECURSION_LIMIT` |
|
|
19
|
+
| "concurrent requests on one conversation" | one run per thread: 409 `{"code": "thread_busy"}` |
|
|
20
|
+
| "rate limiting", "throttling" | not built in: configure it at the Gateway or ingress |
|
|
21
|
+
|
|
22
|
+
## Models
|
|
23
|
+
|
|
24
|
+
| User says | CLI value |
|
|
25
|
+
|---|---|
|
|
26
|
+
| "OpenAI", "GPT" | `--model-provider openai`, key `OPENAI_API_KEY` |
|
|
27
|
+
| "Anthropic", "Claude" | `--model-provider anthropic`, key `ANTHROPIC_API_KEY` |
|
|
28
|
+
| "Gemini", "AI Studio key" | `--model-provider gemini`, key `GOOGLE_API_KEY` (the AI Studio API key path only) |
|
|
29
|
+
| "Ollama", "vLLM", "TGI", "OpenRouter", "local model", "self-hosted model", "open-source model", "OpenAI-compatible" | `--model-provider openai-compatible`, `OPENAI_BASE_URL`, key `MODEL_API_KEY` |
|
|
30
|
+
| "judge model", "grader", "LLM-as-judge" | `JUDGE_MODEL_PROVIDER`, `JUDGE_MODEL_NAME`, `JUDGE_BASE_URL`, `JUDGE_API_KEY` (default to the agent's) |
|
|
31
|
+
| "fake model", "no key in CI" | provider `fake` (tests only; never offered by `create`) |
|
|
32
|
+
|
|
33
|
+
## Persistence
|
|
34
|
+
|
|
35
|
+
| User says | CLI value |
|
|
36
|
+
|---|---|
|
|
37
|
+
| "memory", "remember the conversation", "threads", "checkpoints", "session" | the checkpointer; continuity is by `thread_id` on `/chat` |
|
|
38
|
+
| "Postgres", "durable", "survives restarts", "multiple replicas" | `--checkpointer postgres`; `CHECKPOINTER=postgres` + `POSTGRES_DSN` (fastapi) or `DATABASE_URI` + `REDIS_URI` (langgraph-server) |
|
|
39
|
+
| "in-memory", "no database locally" | `CHECKPOINTER=memory` (the `.env.example` default; run records are in-process) |
|
|
40
|
+
| "run history", "usage records" | run records (follow the checkpointer; payload only under `TRACE_CAPTURE=full`) |
|
|
41
|
+
| "list my conversations", "delete a conversation" | `GET /threads`, `DELETE /threads/{thread_id}` (owner only) |
|
|
42
|
+
| "data retention", "purge old conversations" | `RETENTION_DAYS` (0 keeps everything; an hourly best-effort purge of idle threads) |
|
|
43
|
+
|
|
44
|
+
## Auth and outbound API access
|
|
45
|
+
|
|
46
|
+
| User says | CLI value |
|
|
47
|
+
|---|---|
|
|
48
|
+
| "API key", "bearer token", "shared secret", "internal tool" | `--auth-policy shared-bearer`; `API_KEY` in the Secret; clients send `Authorization: Bearer` |
|
|
49
|
+
| "OIDC", "SSO", "JWT", "access token", "per-user identity", "who owns the conversation" | `--auth-policy jwt` (per-user principals from a verified token: `AUTH_JWT_ISSUER`, `AUTH_JWT_AUDIENCE`, JWKS or public key) |
|
|
50
|
+
| "our app's session cookie", "existing roles", "custom header", "gateway identity headers" | `--auth-policy custom` (stub fails closed until implemented in `app/policies/custom.py`); clients use `--header` or `--cookie` |
|
|
51
|
+
| "support staff may read conversations", "admins" | `AUTH_READ_ACROSS_ROLES` (read others' threads), `AUTH_ADMIN_ROLES` (manage assistants, crons and the store under `langgraph-server`) |
|
|
52
|
+
| "which endpoints may the agent call", "read-only", "read-write", "only these operations", "allow-list", "deny" | `api-policy.yaml` (`apis: <name>:` with `allowed_methods`, `allowed_operations`, `denied_operations`, optional `limits`), changed with `graph-agents-cli api add --access read-only\|read-write\|custom`, `api access`, `api allow`, `api deny`, `api revoke`; seeded by `create --api-policy <file>`. The access level is the user's choice per API; there is no default |
|
|
53
|
+
| "the agent may call it at most N times", "rate limit the API", "don't hammer the backend" | `limits: {max_calls_per_run, rate_per_minute}` on the API (`graph-agents-cli api limits`); per run and per replica |
|
|
54
|
+
| "ask a human before the agent writes", "confirm before cancelling", "human in the loop", "approval" | an `approval` block on the API (`graph-agents-cli api approval NAME --methods POST,DELETE --approvers requester`, or `--operations cancelOrder`): the run pauses before the gated call and an approver decides it (`run` asks on a terminal; `graph-agents-cli approvals approve\|reject`). Approval never widens access |
|
|
55
|
+
| "four-eyes", "a second person must approve", "a manager signs off" | `--approvers role:<name>` without `requester` (another principal holding the role decides), under the `jwt` or `custom` auth policy (`shared-bearer` has one principal) |
|
|
56
|
+
| "the customer confirms changes but an admin approves new orders", "different approvers for different actions" | a list of approval rules on one API: `graph-agents-cli api approval NAME --add-rule --operations createOrder --approvers role:admin` after the first rule; the first rule in file order that covers a call gates it (`--rule N` changes one). Never a second API entry for the same backend |
|
|
57
|
+
| "don't let customer text steer the agent", "prompt injection", "act only on the user's own records" | tool results are fenced as untrusted data (`UntrustedToolResults`) and the default prompt forbids following them; write tools (and reads across customers in staff sessions) call `require_user_mentioned` and `require_owner`, and write APIs use `auth: forward` so the upstream authorizes the user (`/graph-agents-cli-langgraph-code` section 2a) |
|
|
58
|
+
| "call our backend API", "backend client", "call the service as the user" | `get_client("<api>")` from `app/app_utils/api_client.py`, the only HTTP path to external APIs (`auth: none`, `bearer`, or `forward` for the caller's own credential); tools declare `API_CALLS` |
|
|
59
|
+
|
|
60
|
+
## Deployment
|
|
61
|
+
|
|
62
|
+
| User says | CLI value |
|
|
63
|
+
|---|---|
|
|
64
|
+
| "Kubernetes", "k8s", "our cluster", "on-prem", "self-hosted", "OpenShift", "RKE2", "kubeadm" | `--deployment-target kubernetes` (Helm chart in `deployment/helm/<name>/`) |
|
|
65
|
+
| "kind", "k3s", "k3d", "minikube", "Docker Desktop", "local cluster" | environment `dev` with local-load (image loaded into the node, no registry) |
|
|
66
|
+
| "prototype", "just locally", "no deployment yet" | `--prototype` (target `none`, `cd: skip`) |
|
|
67
|
+
| "GitOps", "Argo", "pull-based", "PR to deploy" | `--cd argocd` |
|
|
68
|
+
| "runner in our network", "push-based", "CI deploys" | `--cd helm-push` (self-hosted GitHub runner; the `DEPLOY_KUBECONFIG` secret of the `staging` / `production` environment) |
|
|
69
|
+
| "CI only", "I'll deploy by hand" | `--cd skip` (direct modes) |
|
|
70
|
+
| "registry", "GHCR", "Harbor", "where do images go" | `--registry <url/org>` (default `ghcr.io/<org>`) |
|
|
71
|
+
| "ingress", "route", "hostname", "TLS" | chart values: `gateway` (Gateway API `HTTPRoute`, default) or `ingress`; `tls.existingSecret` or `tls.certManager` |
|
|
72
|
+
| "dev / staging / prod", "namespaces" | environments `dev`, `staging`, `prod`; namespace `<name>-<env>`; `values-<env>.yaml`; Secret `<name>-app` |
|
|
73
|
+
| "secrets", "rotate the key" | `secrets apply --env <env>` (from `.env.<env>`; `--rotate-api-key` for `API_KEY`) then `deploy --restart --env <env>` |
|
|
74
|
+
| "which cluster", "kube context" | `environments.<env>.context` in the manifest, or `--context`; outside dev the current context needs a confirmation or `--yes` |
|
|
75
|
+
| "who approves production" | the merge of the PR touching `values-prod.yaml` (code owners, no self-approval, `pr_checks` green); the GitHub `production` environment gates promotion from CI |
|
|
76
|
+
| "air-gapped", "disconnected", "no internet", "offline" | the disconnected profile (`infra check --profile disconnected`, `login --profile disconnected`) |
|
|
77
|
+
|
|
78
|
+
## Evaluation and observability
|
|
79
|
+
|
|
80
|
+
| User says | CLI value |
|
|
81
|
+
|---|---|
|
|
82
|
+
| "test cases", "golden set", "eval dataset" | `tests/eval/datasets/*.json` |
|
|
83
|
+
| "must contain", "must call tool X", "no tool calls", "under N ms" | `expect.contains`, `expect.tool_calls`, `expect.no_tool_calls`, `expect.max_latency_ms` |
|
|
84
|
+
| "exact case", "in any turn", "across the whole conversation" | `expect.case_insensitive: false` (`contains`/`not_contains` ignore case by default); `expect.scope: all_turns` (checks read every turn, not only the final one) |
|
|
85
|
+
| "quality score", "rubric", "graded by a model" | `judge.<metric>` with `threshold`; mandatory unless listed under `quality_metrics:` |
|
|
86
|
+
| "allow 90 % to pass" | `quality_metrics.<metric>.min_pass_rate: 0.9` (judge metrics only) |
|
|
87
|
+
| "upload to LangSmith", "experiment" | `eval submit` |
|
|
88
|
+
| "tracing", "traces", "spans" | `TRACING_ENABLED=true` (off by default) |
|
|
89
|
+
| "log the prompts", "full payloads" | `TRACE_CAPTURE=full` (default `metadata`) |
|
|
90
|
+
| "OpenTelemetry", "OTLP", "our collector", "Jaeger", "Tempo" | `OTEL_EXPORTER_OTLP_ENDPOINT` (used when no `LANGSMITH_API_KEY`) |
|
|
91
|
+
|
|
92
|
+
## Renamed in graph-agents-cli 0.2.0
|
|
93
|
+
|
|
94
|
+
| 0.1.0 name | 0.2.0 name |
|
|
95
|
+
|---|---|
|
|
96
|
+
| `--auth-policy product-session`, `ProductSessionPolicy` | `--auth-policy custom`, `CustomPolicy` in `app/policies/custom.py` (the old name is read as `custom` with a warning) |
|
|
97
|
+
| `product-policy.yaml`, `--product-policy`, manifest `product_api:` | `api-policy.yaml` (`apis: {<name>: ...}`), `--api-policy`, `api_policy: {policy_file: api-policy.yaml}` |
|
|
98
|
+
| `PRODUCT_CALLS`, `product_client` | `API_CALLS` (with `"api"`), `api_client.get_client("<api>")` |
|
|
99
|
+
| `CLI_VERSION_PIN` in `.github/agent.env` | `GRAPH_AGENTS_CLI_SPEC` (a full install spec) |
|
|
100
|
+
| default guidance file `GEMINI.md` | `AGENTS.md` |
|
|
101
|
+
| repository secret `KUBECONFIG` (helm-push) | environment secret `DEPLOY_KUBECONFIG` |
|
|
102
|
+
|
|
103
|
+
## Migration note
|
|
104
|
+
|
|
105
|
+
Old names from google-agents-cli and their replacements, for users who still use them:
|
|
106
|
+
|
|
107
|
+
| Old term | Now |
|
|
108
|
+
|---|---|
|
|
109
|
+
| ADK, Agent Development Kit, `root_agent` | LangGraph; `graph` in `app/agent.py` |
|
|
110
|
+
| Agent Engine, Agent Runtime, Cloud Run, GKE, `--deployment-target agent_runtime\|cloud_run\|gke` | `--deployment-target kubernetes` |
|
|
111
|
+
| Vertex AI, gcloud ADC, `GOOGLE_CLOUD_PROJECT`, `GOOGLE_GENAI_USE_VERTEXAI` | provider keys (`OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `GOOGLE_API_KEY`, `MODEL_API_KEY`) plus a kubeconfig |
|
|
112
|
+
| Agent Platform Sessions, Cloud SQL sessions, `--session-type` | `--checkpointer memory\|postgres` |
|
|
113
|
+
| Cloud Build, `--cicd-runner google_cloud_build\|github_actions` | GitHub Actions always; `--cd argocd\|helm-push\|skip` |
|
|
114
|
+
| Terraform, `infra single-project`, `infra cicd` | none; `infra check` is read-only |
|
|
115
|
+
| Secret Manager | Kubernetes Secret `<release>-app` via `secrets apply` |
|
|
116
|
+
| Cloud Trace, Cloud Logging, BigQuery Agent Analytics, `--bq-analytics` | LangSmith or OTLP behind `TRACING_ENABLED` |
|
|
117
|
+
| Agent Platform eval service, `eval optimize`, `eval dataset synthesize`, `eval results` | in-process deterministic checks and judge; those commands were removed |
|
|
118
|
+
| `publish gemini-enterprise`, Agent Registry, Agent Gateway | removed; `deploy` exposes the agent in-cluster |
|
|
119
|
+
| `agents-cli-manifest.yaml`, `AGENTS_CLI_*` env vars, `~/.agents-cli` | `graph-agents-cli-manifest.yaml`, `GRAPH_AGENTS_CLI_*`, `~/.graph-agents-cli` |
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Copyright 2026 graph-agents-cli contributors
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
"""``graph-agents-cli system``: several agent projects that call each other, seen as one."""
|