cayu 0.1.0a1__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.
- cayu-0.1.0a1/.gitignore +20 -0
- cayu-0.1.0a1/LICENSE +201 -0
- cayu-0.1.0a1/NOTICE +4 -0
- cayu-0.1.0a1/PKG-INFO +430 -0
- cayu-0.1.0a1/README.md +355 -0
- cayu-0.1.0a1/pyproject.toml +164 -0
- cayu-0.1.0a1/src/cayu/__init__.py +1249 -0
- cayu-0.1.0a1/src/cayu/_validation.py +516 -0
- cayu-0.1.0a1/src/cayu/artifacts/__init__.py +73 -0
- cayu-0.1.0a1/src/cayu/artifacts/_images.py +68 -0
- cayu-0.1.0a1/src/cayu/artifacts/attachments.py +273 -0
- cayu-0.1.0a1/src/cayu/artifacts/aws_s3.py +440 -0
- cayu-0.1.0a1/src/cayu/artifacts/base.py +312 -0
- cayu-0.1.0a1/src/cayu/artifacts/local.py +746 -0
- cayu-0.1.0a1/src/cayu/artifacts/workspace.py +208 -0
- cayu-0.1.0a1/src/cayu/cli/__init__.py +76 -0
- cayu-0.1.0a1/src/cayu/cli/__main__.py +5 -0
- cayu-0.1.0a1/src/cayu/cli/_targets.py +44 -0
- cayu-0.1.0a1/src/cayu/cli/check.py +110 -0
- cayu-0.1.0a1/src/cayu/cli/console.py +98 -0
- cayu-0.1.0a1/src/cayu/cli/evals.py +168 -0
- cayu-0.1.0a1/src/cayu/cli/generate.py +621 -0
- cayu-0.1.0a1/src/cayu/cli/guide.py +49 -0
- cayu-0.1.0a1/src/cayu/cli/inspect.py +139 -0
- cayu-0.1.0a1/src/cayu/cli/project.py +238 -0
- cayu-0.1.0a1/src/cayu/cli/scaffold.py +439 -0
- cayu-0.1.0a1/src/cayu/cli/storage.py +352 -0
- cayu-0.1.0a1/src/cayu/core/__init__.py +42 -0
- cayu-0.1.0a1/src/cayu/core/agents.py +104 -0
- cayu-0.1.0a1/src/cayu/core/events.py +202 -0
- cayu-0.1.0a1/src/cayu/core/messages.py +388 -0
- cayu-0.1.0a1/src/cayu/core/thinking.py +59 -0
- cayu-0.1.0a1/src/cayu/core/tools.py +486 -0
- cayu-0.1.0a1/src/cayu/core/workflows.py +45 -0
- cayu-0.1.0a1/src/cayu/credentials.py +60 -0
- cayu-0.1.0a1/src/cayu/data/__init__.py +1 -0
- cayu-0.1.0a1/src/cayu/data/default_model_catalog.json +597 -0
- cayu-0.1.0a1/src/cayu/data/default_price_book.json +740 -0
- cayu-0.1.0a1/src/cayu/egress/__init__.py +94 -0
- cayu-0.1.0a1/src/cayu/egress/_remote_adapter.py +299 -0
- cayu-0.1.0a1/src/cayu/egress/adapter.py +285 -0
- cayu-0.1.0a1/src/cayu/egress/aws_lambda_microvm_adapter.py +400 -0
- cayu-0.1.0a1/src/cayu/egress/broker.py +706 -0
- cayu-0.1.0a1/src/cayu/egress/capabilities.py +210 -0
- cayu-0.1.0a1/src/cayu/egress/credential_kinds.py +107 -0
- cayu-0.1.0a1/src/cayu/egress/destinations.py +85 -0
- cayu-0.1.0a1/src/cayu/egress/docker_adapter.py +409 -0
- cayu-0.1.0a1/src/cayu/egress/e2b_adapter.py +219 -0
- cayu-0.1.0a1/src/cayu/egress/errors.py +60 -0
- cayu-0.1.0a1/src/cayu/egress/grants.py +312 -0
- cayu-0.1.0a1/src/cayu/egress/microsandbox_adapter.py +735 -0
- cayu-0.1.0a1/src/cayu/egress/policy.py +156 -0
- cayu-0.1.0a1/src/cayu/egress/proxy_exposure.py +126 -0
- cayu-0.1.0a1/src/cayu/egress/proxy_server.py +557 -0
- cayu-0.1.0a1/src/cayu/embeddings.py +194 -0
- cayu-0.1.0a1/src/cayu/environments/__init__.py +73 -0
- cayu-0.1.0a1/src/cayu/environments/aws_filesystems.py +339 -0
- cayu-0.1.0a1/src/cayu/environments/base.py +338 -0
- cayu-0.1.0a1/src/cayu/environments/bindings.py +1580 -0
- cayu-0.1.0a1/src/cayu/environments/factory.py +148 -0
- cayu-0.1.0a1/src/cayu/evals/__init__.py +129 -0
- cayu-0.1.0a1/src/cayu/evals/assertions.py +685 -0
- cayu-0.1.0a1/src/cayu/evals/internal/__init__.py +1 -0
- cayu-0.1.0a1/src/cayu/evals/internal/runtime_acceptance.py +630 -0
- cayu-0.1.0a1/src/cayu/evals/judges.py +239 -0
- cayu-0.1.0a1/src/cayu/evals/models.py +325 -0
- cayu-0.1.0a1/src/cayu/evals/reporting.py +344 -0
- cayu-0.1.0a1/src/cayu/evals/runner.py +878 -0
- cayu-0.1.0a1/src/cayu/evals/testing.py +72 -0
- cayu-0.1.0a1/src/cayu/guides/__init__.py +1 -0
- cayu-0.1.0a1/src/cayu/guides/application-anatomy.md +126 -0
- cayu-0.1.0a1/src/cayu/guides/authoring.md +282 -0
- cayu-0.1.0a1/src/cayu/guides/command_selectors.py +34 -0
- cayu-0.1.0a1/src/cayu/guides/diagnostics.md +67 -0
- cayu-0.1.0a1/src/cayu/guides/tool-effects.md +47 -0
- cayu-0.1.0a1/src/cayu/mcp/__init__.py +81 -0
- cayu-0.1.0a1/src/cayu/mcp/_jsonrpc.py +260 -0
- cayu-0.1.0a1/src/cayu/mcp/base.py +258 -0
- cayu-0.1.0a1/src/cayu/mcp/http.py +452 -0
- cayu-0.1.0a1/src/cayu/mcp/stdio.py +602 -0
- cayu-0.1.0a1/src/cayu/mcp/tools.py +473 -0
- cayu-0.1.0a1/src/cayu/observability/__init__.py +10 -0
- cayu-0.1.0a1/src/cayu/observability/logging.py +347 -0
- cayu-0.1.0a1/src/cayu/observability/otel.py +505 -0
- cayu-0.1.0a1/src/cayu/providers/__init__.py +146 -0
- cayu-0.1.0a1/src/cayu/providers/_api_keys.py +19 -0
- cayu-0.1.0a1/src/cayu/providers/_http.py +459 -0
- cayu-0.1.0a1/src/cayu/providers/_sse.py +96 -0
- cayu-0.1.0a1/src/cayu/providers/anthropic.py +1354 -0
- cayu-0.1.0a1/src/cayu/providers/base.py +633 -0
- cayu-0.1.0a1/src/cayu/providers/bedrock.py +872 -0
- cayu-0.1.0a1/src/cayu/providers/cache.py +60 -0
- cayu-0.1.0a1/src/cayu/providers/chat_completions.py +1100 -0
- cayu-0.1.0a1/src/cayu/providers/openai.py +1900 -0
- cayu-0.1.0a1/src/cayu/providers/vertex.py +601 -0
- cayu-0.1.0a1/src/cayu/proxies/__init__.py +16 -0
- cayu-0.1.0a1/src/cayu/proxies/base.py +82 -0
- cayu-0.1.0a1/src/cayu/proxies/passthrough.py +160 -0
- cayu-0.1.0a1/src/cayu/runners/__init__.py +105 -0
- cayu-0.1.0a1/src/cayu/runners/_cleanup.py +176 -0
- cayu-0.1.0a1/src/cayu/runners/_secrets.py +138 -0
- cayu-0.1.0a1/src/cayu/runners/_subprocess.py +523 -0
- cayu-0.1.0a1/src/cayu/runners/aws_lambda_microvm.py +1043 -0
- cayu-0.1.0a1/src/cayu/runners/base.py +340 -0
- cayu-0.1.0a1/src/cayu/runners/docker.py +536 -0
- cayu-0.1.0a1/src/cayu/runners/e2b.py +848 -0
- cayu-0.1.0a1/src/cayu/runners/local.py +161 -0
- cayu-0.1.0a1/src/cayu/runners/microsandbox.py +1449 -0
- cayu-0.1.0a1/src/cayu/runtime/__init__.py +572 -0
- cayu-0.1.0a1/src/cayu/runtime/_approval_support.py +496 -0
- cayu-0.1.0a1/src/cayu/runtime/_binding_cleanup.py +69 -0
- cayu-0.1.0a1/src/cayu/runtime/_event_writer.py +283 -0
- cayu-0.1.0a1/src/cayu/runtime/_interruption_coordinator.py +1105 -0
- cayu-0.1.0a1/src/cayu/runtime/_model_errors.py +85 -0
- cayu-0.1.0a1/src/cayu/runtime/_model_step_executor.py +2698 -0
- cayu-0.1.0a1/src/cayu/runtime/_resume_ledger.py +129 -0
- cayu-0.1.0a1/src/cayu/runtime/_run_limits.py +1918 -0
- cayu-0.1.0a1/src/cayu/runtime/_runtime_records.py +102 -0
- cayu-0.1.0a1/src/cayu/runtime/_session_control.py +325 -0
- cayu-0.1.0a1/src/cayu/runtime/_session_queries.py +54 -0
- cayu-0.1.0a1/src/cayu/runtime/_tool_execution.py +122 -0
- cayu-0.1.0a1/src/cayu/runtime/_tool_results.py +70 -0
- cayu-0.1.0a1/src/cayu/runtime/_tool_round_executor.py +2662 -0
- cayu-0.1.0a1/src/cayu/runtime/_tool_round_recovery.py +333 -0
- cayu-0.1.0a1/src/cayu/runtime/_transcript.py +211 -0
- cayu-0.1.0a1/src/cayu/runtime/app.py +11066 -0
- cayu-0.1.0a1/src/cayu/runtime/approvals.py +567 -0
- cayu-0.1.0a1/src/cayu/runtime/budgets.py +1566 -0
- cayu-0.1.0a1/src/cayu/runtime/business_approvals.py +528 -0
- cayu-0.1.0a1/src/cayu/runtime/checks.py +264 -0
- cayu-0.1.0a1/src/cayu/runtime/context.py +3714 -0
- cayu-0.1.0a1/src/cayu/runtime/context_counting.py +45 -0
- cayu-0.1.0a1/src/cayu/runtime/costs.py +1057 -0
- cayu-0.1.0a1/src/cayu/runtime/dispatch.py +532 -0
- cayu-0.1.0a1/src/cayu/runtime/egress.py +1402 -0
- cayu-0.1.0a1/src/cayu/runtime/event_sinks.py +40 -0
- cayu-0.1.0a1/src/cayu/runtime/event_watchers.py +660 -0
- cayu-0.1.0a1/src/cayu/runtime/hooks.py +441 -0
- cayu-0.1.0a1/src/cayu/runtime/loop_policies.py +193 -0
- cayu-0.1.0a1/src/cayu/runtime/manifest.py +536 -0
- cayu-0.1.0a1/src/cayu/runtime/mcp_manifest_policy.py +123 -0
- cayu-0.1.0a1/src/cayu/runtime/model_steps.py +110 -0
- cayu-0.1.0a1/src/cayu/runtime/outcomes.py +96 -0
- cayu-0.1.0a1/src/cayu/runtime/pending_actions.py +817 -0
- cayu-0.1.0a1/src/cayu/runtime/retry_policy.py +291 -0
- cayu-0.1.0a1/src/cayu/runtime/sessions.py +4652 -0
- cayu-0.1.0a1/src/cayu/runtime/stop_policy.py +159 -0
- cayu-0.1.0a1/src/cayu/runtime/structured_output.py +310 -0
- cayu-0.1.0a1/src/cayu/runtime/task_worker.py +236 -0
- cayu-0.1.0a1/src/cayu/runtime/tasks.py +1017 -0
- cayu-0.1.0a1/src/cayu/runtime/tool_policy.py +611 -0
- cayu-0.1.0a1/src/cayu/runtime/tool_rounds.py +138 -0
- cayu-0.1.0a1/src/cayu/runtime/usage.py +434 -0
- cayu-0.1.0a1/src/cayu/runtime/user_input.py +392 -0
- cayu-0.1.0a1/src/cayu/server/__init__.py +575 -0
- cayu-0.1.0a1/src/cayu/server/auth.py +139 -0
- cayu-0.1.0a1/src/cayu/server/contracts.py +625 -0
- cayu-0.1.0a1/src/cayu/server/dashboard/assets/agents-oTlNv1Io.js +1 -0
- cayu-0.1.0a1/src/cayu/server/dashboard/assets/artifacts-BPDhg1dV.js +1 -0
- cayu-0.1.0a1/src/cayu/server/dashboard/assets/dashboard-DCiJB3hK.js +1 -0
- cayu-0.1.0a1/src/cayu/server/dashboard/assets/environments-BTQO8oUc.js +1 -0
- cayu-0.1.0a1/src/cayu/server/dashboard/assets/esm-CvtsjSj0.js +2 -0
- cayu-0.1.0a1/src/cayu/server/dashboard/assets/index-CB1LxE7W.js +10 -0
- cayu-0.1.0a1/src/cayu/server/dashboard/assets/index-CMcKpDAs.css +2 -0
- cayu-0.1.0a1/src/cayu/server/dashboard/assets/knowledge-kNu2w1Ei.js +1 -0
- cayu-0.1.0a1/src/cayu/server/dashboard/assets/mutation-browser-DqNLNLtd.js +1 -0
- cayu-0.1.0a1/src/cayu/server/dashboard/assets/pending-actions-C57eZqwp.js +1 -0
- cayu-0.1.0a1/src/cayu/server/dashboard/assets/rolldown-runtime-Bh1tDfsg.js +1 -0
- cayu-0.1.0a1/src/cayu/server/dashboard/assets/run-BvUoZlSb.js +2 -0
- cayu-0.1.0a1/src/cayu/server/dashboard/assets/session-detail-BnMPXJH6.js +2 -0
- cayu-0.1.0a1/src/cayu/server/dashboard/assets/sessions-BrY5N_0K.js +1 -0
- cayu-0.1.0a1/src/cayu/server/dashboard/assets/shared-BZcreQys.js +1 -0
- cayu-0.1.0a1/src/cayu/server/dashboard/assets/shared-Bp03KqwM.js +1 -0
- cayu-0.1.0a1/src/cayu/server/dashboard/assets/shared-CA8vbRPk.js +1 -0
- cayu-0.1.0a1/src/cayu/server/dashboard/assets/shared-CAHCP8zl.js +1 -0
- cayu-0.1.0a1/src/cayu/server/dashboard/assets/shared-zwvRYRjG.js +1 -0
- cayu-0.1.0a1/src/cayu/server/dashboard/assets/tasks-BabVql-Z.js +1 -0
- cayu-0.1.0a1/src/cayu/server/dashboard/assets/usage-BX_hq3P2.js +1 -0
- cayu-0.1.0a1/src/cayu/server/dashboard/icons.svg +24 -0
- cayu-0.1.0a1/src/cayu/server/dashboard/index.html +18 -0
- cayu-0.1.0a1/src/cayu/server/dashboard/logo.svg +10 -0
- cayu-0.1.0a1/src/cayu/server/routes.py +3993 -0
- cayu-0.1.0a1/src/cayu/server/sse.py +267 -0
- cayu-0.1.0a1/src/cayu/server/static.py +251 -0
- cayu-0.1.0a1/src/cayu/storage/__init__.py +101 -0
- cayu-0.1.0a1/src/cayu/storage/_postgres_support.py +445 -0
- cayu-0.1.0a1/src/cayu/storage/_session_store_sql.py +382 -0
- cayu-0.1.0a1/src/cayu/storage/_sqlite_support.py +1305 -0
- cayu-0.1.0a1/src/cayu/storage/budget_ledger.py +420 -0
- cayu-0.1.0a1/src/cayu/storage/event_watchers.py +517 -0
- cayu-0.1.0a1/src/cayu/storage/jsonl_export.py +196 -0
- cayu-0.1.0a1/src/cayu/storage/knowledge_indexer.py +713 -0
- cayu-0.1.0a1/src/cayu/storage/knowledge_review.py +190 -0
- cayu-0.1.0a1/src/cayu/storage/knowledge_sqlite.py +1441 -0
- cayu-0.1.0a1/src/cayu/storage/memory.py +1972 -0
- cayu-0.1.0a1/src/cayu/storage/migrations.py +247 -0
- cayu-0.1.0a1/src/cayu/storage/postgres.py +8488 -0
- cayu-0.1.0a1/src/cayu/storage/sqlite.py +4207 -0
- cayu-0.1.0a1/src/cayu/tools/__init__.py +75 -0
- cayu-0.1.0a1/src/cayu/tools/_errors.py +69 -0
- cayu-0.1.0a1/src/cayu/tools/command_policy.py +228 -0
- cayu-0.1.0a1/src/cayu/tools/commands.py +453 -0
- cayu-0.1.0a1/src/cayu/tools/files.py +1559 -0
- cayu-0.1.0a1/src/cayu/tools/git_command_policy.py +477 -0
- cayu-0.1.0a1/src/cayu/tools/knowledge.py +1683 -0
- cayu-0.1.0a1/src/cayu/tools/subagents.py +1162 -0
- cayu-0.1.0a1/src/cayu/tools/user_input.py +67 -0
- cayu-0.1.0a1/src/cayu/vaults/__init__.py +45 -0
- cayu-0.1.0a1/src/cayu/vaults/aws_secrets_manager.py +192 -0
- cayu-0.1.0a1/src/cayu/vaults/base.py +229 -0
- cayu-0.1.0a1/src/cayu/vaults/composite.py +107 -0
- cayu-0.1.0a1/src/cayu/vaults/local_env.py +87 -0
- cayu-0.1.0a1/src/cayu/vaults/redaction.py +114 -0
- cayu-0.1.0a1/src/cayu/vaults/static.py +84 -0
- cayu-0.1.0a1/src/cayu/webhooks/__init__.py +94 -0
- cayu-0.1.0a1/src/cayu/workflows/__init__.py +57 -0
- cayu-0.1.0a1/src/cayu/workflows/journal.py +433 -0
- cayu-0.1.0a1/src/cayu/workflows/models.py +106 -0
- cayu-0.1.0a1/src/cayu/workflows/workflow.py +1104 -0
- cayu-0.1.0a1/src/cayu/workspaces/__init__.py +53 -0
- cayu-0.1.0a1/src/cayu/workspaces/_guest_guard.py +358 -0
- cayu-0.1.0a1/src/cayu/workspaces/_tar.py +38 -0
- cayu-0.1.0a1/src/cayu/workspaces/base.py +376 -0
- cayu-0.1.0a1/src/cayu/workspaces/e2b.py +302 -0
- cayu-0.1.0a1/src/cayu/workspaces/local.py +204 -0
- cayu-0.1.0a1/src/cayu/workspaces/microsandbox.py +255 -0
- cayu-0.1.0a1/src/cayu/workspaces/runner.py +672 -0
cayu-0.1.0a1/.gitignore
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
.venv/
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
.pytest_cache/
|
|
5
|
+
.coverage
|
|
6
|
+
.ruff_cache/
|
|
7
|
+
.mypy_cache/
|
|
8
|
+
dist/
|
|
9
|
+
build/
|
|
10
|
+
*.egg-info/
|
|
11
|
+
.DS_Store
|
|
12
|
+
.cayu/
|
|
13
|
+
.cayu-internal-runtime-acceptance.json
|
|
14
|
+
.cayu-example-results/
|
|
15
|
+
.cayu-example-workspaces/
|
|
16
|
+
.examples-workspaces/
|
|
17
|
+
node_modules/
|
|
18
|
+
dashboard/dist/
|
|
19
|
+
model-catalog-refresh.md
|
|
20
|
+
.claude/worktrees/
|
cayu-0.1.0a1/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
https://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
https://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
cayu-0.1.0a1/NOTICE
ADDED
cayu-0.1.0a1/PKG-INFO
ADDED
|
@@ -0,0 +1,430 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: cayu
|
|
3
|
+
Version: 0.1.0a1
|
|
4
|
+
Summary: A Python runtime for production AI agents with durable sessions, controlled tool execution, context management, reviewed knowledge, recovery, evals, and replay.
|
|
5
|
+
Author: Cayu Technologies, Inc.
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
License-File: NOTICE
|
|
9
|
+
Requires-Python: >=3.11
|
|
10
|
+
Requires-Dist: certifi>=2024.0
|
|
11
|
+
Requires-Dist: httpx>=0.27
|
|
12
|
+
Requires-Dist: jsonschema>=4.23
|
|
13
|
+
Requires-Dist: pydantic>=2.12
|
|
14
|
+
Requires-Dist: tzdata>=2024.0; sys_platform == 'win32'
|
|
15
|
+
Provides-Extra: all
|
|
16
|
+
Requires-Dist: boto3<2,>=1.43.44; extra == 'all'
|
|
17
|
+
Requires-Dist: cryptography>=42; extra == 'all'
|
|
18
|
+
Requires-Dist: e2b<3,>=2.28; extra == 'all'
|
|
19
|
+
Requires-Dist: fastapi>=0.115; extra == 'all'
|
|
20
|
+
Requires-Dist: google-auth[requests]<3,>=2; extra == 'all'
|
|
21
|
+
Requires-Dist: ipython<10,>=9; extra == 'all'
|
|
22
|
+
Requires-Dist: opentelemetry-api>=1.20; extra == 'all'
|
|
23
|
+
Requires-Dist: opentelemetry-sdk>=1.20; extra == 'all'
|
|
24
|
+
Requires-Dist: pillow>=10; extra == 'all'
|
|
25
|
+
Requires-Dist: psycopg-pool>=3.2; extra == 'all'
|
|
26
|
+
Requires-Dist: psycopg[binary]>=3.2; extra == 'all'
|
|
27
|
+
Requires-Dist: pypdf>=4; extra == 'all'
|
|
28
|
+
Requires-Dist: sse-starlette>=2.0; extra == 'all'
|
|
29
|
+
Requires-Dist: uvicorn>=0.30; extra == 'all'
|
|
30
|
+
Provides-Extra: aws
|
|
31
|
+
Requires-Dist: boto3[crt]<2,>=1.43.44; extra == 'aws'
|
|
32
|
+
Provides-Extra: browser
|
|
33
|
+
Requires-Dist: playwright>=1.61; extra == 'browser'
|
|
34
|
+
Provides-Extra: console
|
|
35
|
+
Requires-Dist: ipython<10,>=9; extra == 'console'
|
|
36
|
+
Provides-Extra: dev
|
|
37
|
+
Requires-Dist: cryptography>=42; extra == 'dev'
|
|
38
|
+
Requires-Dist: fastapi>=0.115; extra == 'dev'
|
|
39
|
+
Requires-Dist: httpx2<3,>=2.3; extra == 'dev'
|
|
40
|
+
Requires-Dist: opentelemetry-api>=1.20; extra == 'dev'
|
|
41
|
+
Requires-Dist: opentelemetry-sdk>=1.20; extra == 'dev'
|
|
42
|
+
Requires-Dist: pillow>=10; extra == 'dev'
|
|
43
|
+
Requires-Dist: psycopg-pool>=3.2; extra == 'dev'
|
|
44
|
+
Requires-Dist: psycopg[binary]>=3.2; extra == 'dev'
|
|
45
|
+
Requires-Dist: pypdf>=4; extra == 'dev'
|
|
46
|
+
Requires-Dist: pytest-cov>=7.1; extra == 'dev'
|
|
47
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
48
|
+
Requires-Dist: ruff>=0.11; extra == 'dev'
|
|
49
|
+
Requires-Dist: sse-starlette>=2.0; extra == 'dev'
|
|
50
|
+
Requires-Dist: testcontainers[postgres]>=4.0; extra == 'dev'
|
|
51
|
+
Requires-Dist: ty>=0.0.1a8; extra == 'dev'
|
|
52
|
+
Requires-Dist: uvicorn>=0.30; extra == 'dev'
|
|
53
|
+
Provides-Extra: e2b
|
|
54
|
+
Requires-Dist: e2b<3,>=2.28; extra == 'e2b'
|
|
55
|
+
Provides-Extra: egress
|
|
56
|
+
Requires-Dist: cryptography>=42; extra == 'egress'
|
|
57
|
+
Provides-Extra: files
|
|
58
|
+
Requires-Dist: pillow>=10; extra == 'files'
|
|
59
|
+
Requires-Dist: pypdf>=4; extra == 'files'
|
|
60
|
+
Provides-Extra: microsandbox
|
|
61
|
+
Requires-Dist: microsandbox==0.6.6; extra == 'microsandbox'
|
|
62
|
+
Provides-Extra: otel
|
|
63
|
+
Requires-Dist: opentelemetry-api>=1.20; extra == 'otel'
|
|
64
|
+
Requires-Dist: opentelemetry-sdk>=1.20; extra == 'otel'
|
|
65
|
+
Provides-Extra: postgres
|
|
66
|
+
Requires-Dist: psycopg-pool>=3.2; extra == 'postgres'
|
|
67
|
+
Requires-Dist: psycopg[binary]>=3.2; extra == 'postgres'
|
|
68
|
+
Provides-Extra: server
|
|
69
|
+
Requires-Dist: fastapi>=0.115; extra == 'server'
|
|
70
|
+
Requires-Dist: sse-starlette>=2.0; extra == 'server'
|
|
71
|
+
Requires-Dist: uvicorn>=0.30; extra == 'server'
|
|
72
|
+
Provides-Extra: vertex
|
|
73
|
+
Requires-Dist: google-auth[requests]<3,>=2; extra == 'vertex'
|
|
74
|
+
Description-Content-Type: text/markdown
|
|
75
|
+
|
|
76
|
+
# Cayu
|
|
77
|
+
|
|
78
|
+
Cayu is a runtime for building production AI agents in Python.
|
|
79
|
+
|
|
80
|
+
It provides the durable execution layer—sessions, model calls, tool execution,
|
|
81
|
+
approvals, context management, budgets, recovery, events, and evals—while
|
|
82
|
+
applications retain control of their UI, authentication, domain logic, and
|
|
83
|
+
workflows.
|
|
84
|
+
|
|
85
|
+
Cayu is designed for agents that do consequential or long-running work. It is
|
|
86
|
+
not a prompt-chain DSL, a visual workflow builder, or an application frontend;
|
|
87
|
+
you compose its runtime primitives directly.
|
|
88
|
+
|
|
89
|
+
## Why Cayu
|
|
90
|
+
|
|
91
|
+
Agent prototypes are easy to start. Production failures happen at the
|
|
92
|
+
boundaries:
|
|
93
|
+
|
|
94
|
+
- a process dies after a side effect but before state is recorded;
|
|
95
|
+
- a model requests a valid tool with the wrong authority;
|
|
96
|
+
- a run needs human input or approval halfway through;
|
|
97
|
+
- context grows until a provider rejects the next request;
|
|
98
|
+
- retries, forks, or subagents lose cost and causal attribution;
|
|
99
|
+
- operators cannot reconstruct what happened from prompt text alone; or
|
|
100
|
+
- evals test final prose while missing the runtime trajectory.
|
|
101
|
+
|
|
102
|
+
Cayu treats these as runtime contracts. Important actions become structured
|
|
103
|
+
events; tool authority and recovery are explicit; configured durable stores let
|
|
104
|
+
transcripts and checkpoints survive process boundaries; and the same public
|
|
105
|
+
seams support local development, tests, control-plane inspection, and hosted
|
|
106
|
+
deployments.
|
|
107
|
+
|
|
108
|
+
## What Cayu provides
|
|
109
|
+
|
|
110
|
+
| Need | Cayu primitive |
|
|
111
|
+
| --- | --- |
|
|
112
|
+
| Long-running work | Durable sessions, transcripts, events, resume, fork, interruption |
|
|
113
|
+
| Safe effects | Typed tools, effect declarations, policies, approvals, idempotency keys |
|
|
114
|
+
| Human interaction | User-input checkpoints, approval resolution, manual recovery |
|
|
115
|
+
| Context pressure | Token counting, projection, compaction, overflow recovery |
|
|
116
|
+
| Cost control | Usage events, run limits, budgets, pricing, causal-budget summaries |
|
|
117
|
+
| Execution boundaries | Environments, workspaces, runners, artifacts, vaults, egress |
|
|
118
|
+
| Reviewed knowledge | Durable entries, approval state, keyword/vector retrieval, recall tools |
|
|
119
|
+
| Provider flexibility | OpenAI, Anthropic, Bedrock, Vertex, OpenAI-compatible APIs |
|
|
120
|
+
| Durable automation | Tasks, dispatchers, event watchers, subagents, runtime hooks |
|
|
121
|
+
| Behavioral proof | Runtime tests, trajectory assertions, replay, eval reports |
|
|
122
|
+
| Operations | FastAPI control plane and a packaged inspection dashboard |
|
|
123
|
+
|
|
124
|
+
## Quickstart
|
|
125
|
+
|
|
126
|
+
### Start a project
|
|
127
|
+
|
|
128
|
+
The generated project is the recommended path for both humans and coding
|
|
129
|
+
agents. Cayu requires Python 3.11 or newer.
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
pip install cayu pytest
|
|
133
|
+
cayu new myagent
|
|
134
|
+
cd myagent
|
|
135
|
+
|
|
136
|
+
cayu inspect --json
|
|
137
|
+
cayu check --json
|
|
138
|
+
pytest
|
|
139
|
+
cayu eval run evals.assistant:build_eval
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
The scaffold is credential-free and includes:
|
|
143
|
+
|
|
144
|
+
- a process-scoped `build_app()` factory with bounded local-store initialization;
|
|
145
|
+
- one safe example tool;
|
|
146
|
+
- a hermetic runtime test and trajectory eval; and
|
|
147
|
+
- a project-local `AGENTS.md` with the exact build and verification contract.
|
|
148
|
+
|
|
149
|
+
Open the generated project, replace the tracer-bullet behavior with your domain
|
|
150
|
+
behavior, and keep the public test/eval seam intact.
|
|
151
|
+
|
|
152
|
+
### Run an agent
|
|
153
|
+
|
|
154
|
+
This compact example shows the core API. Real projects should put the same
|
|
155
|
+
registrations in the generated `build_app()` factory instead of constructing a
|
|
156
|
+
module-global app.
|
|
157
|
+
|
|
158
|
+
```python
|
|
159
|
+
import asyncio
|
|
160
|
+
|
|
161
|
+
from cayu import (
|
|
162
|
+
AgentSpec,
|
|
163
|
+
CayuApp,
|
|
164
|
+
Message,
|
|
165
|
+
OpenAIProvider,
|
|
166
|
+
RunRequest,
|
|
167
|
+
run_to_completion,
|
|
168
|
+
)
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
async def main() -> None:
|
|
172
|
+
app = CayuApp()
|
|
173
|
+
app.register_provider(OpenAIProvider(), default=True) # reads OPENAI_API_KEY
|
|
174
|
+
app.register_agent(AgentSpec(name="assistant", model="gpt-5.6"))
|
|
175
|
+
|
|
176
|
+
outcome = await run_to_completion(
|
|
177
|
+
app,
|
|
178
|
+
RunRequest(
|
|
179
|
+
agent_name="assistant",
|
|
180
|
+
messages=[Message.text("user", "Explain durable agent sessions.")],
|
|
181
|
+
),
|
|
182
|
+
)
|
|
183
|
+
|
|
184
|
+
if outcome.ok:
|
|
185
|
+
print(outcome.final_text)
|
|
186
|
+
else:
|
|
187
|
+
print(f"{outcome.status}: {outcome.error}")
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
asyncio.run(main())
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
`CayuApp()` uses in-memory stores by default, which is appropriate for this
|
|
194
|
+
one-shot example and for tests. The generated project configures SQLite so its
|
|
195
|
+
sessions survive process restarts. Multi-process production deployments should
|
|
196
|
+
select a conforming shared store such as PostgreSQL.
|
|
197
|
+
|
|
198
|
+
`CayuApp.run(...)` is the lower-level event-stream API. Runtime failures are
|
|
199
|
+
terminal `session.failed` events, not exceptions raised from iteration.
|
|
200
|
+
`run_to_completion(...)` consumes that same stream and returns a typed outcome
|
|
201
|
+
when an application only needs the result. It retains the complete event stream
|
|
202
|
+
in `RunOutcome.events`; use it for bounded runs. Consume `CayuApp.run(...)`
|
|
203
|
+
incrementally for long-lived or high-volume runs.
|
|
204
|
+
|
|
205
|
+
For a runnable example with no API key, use
|
|
206
|
+
[`examples/echo_tool_runtime.py`](https://github.com/vertexkg/cayu/blob/main/examples/echo_tool_runtime.py). To add
|
|
207
|
+
workspace tools and command execution, see
|
|
208
|
+
[`examples/local_environment_runtime.py`](https://github.com/vertexkg/cayu/blob/main/examples/local_environment_runtime.py).
|
|
209
|
+
|
|
210
|
+
### Build with a coding agent
|
|
211
|
+
|
|
212
|
+
The generated `AGENTS.md` is the project-local source of truth. Ask the coding
|
|
213
|
+
agent to read it first, then use Cayu's package-shipped guides and structured
|
|
214
|
+
inspection:
|
|
215
|
+
|
|
216
|
+
```bash
|
|
217
|
+
cayu guide anatomy
|
|
218
|
+
cayu guide authoring
|
|
219
|
+
cayu inspect --json
|
|
220
|
+
cayu check --fail-on warning --json
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
The supported authoring loop is:
|
|
224
|
+
|
|
225
|
+
```text
|
|
226
|
+
understand -> inspect -> plan -> change -> test -> eval -> exercise -> report evidence
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
Use `cayu generate slice ... --dry-run --json` to plan a small vertical slice.
|
|
230
|
+
Generated slices are intentionally unfinished tracer bullets; replace their
|
|
231
|
+
placeholder prompt, tool behavior, runtime test, and eval before treating them
|
|
232
|
+
as application functionality.
|
|
233
|
+
|
|
234
|
+
## Mental model
|
|
235
|
+
|
|
236
|
+
Cayu separates the agent's identity from the resources and durable state used
|
|
237
|
+
for one execution:
|
|
238
|
+
|
|
239
|
+
```text
|
|
240
|
+
AgentSpec
|
|
241
|
+
identity, model, instructions, defaults, runtime policies
|
|
242
|
+
|
|
243
|
+
Environment
|
|
244
|
+
workspace, runner, artifacts, vault, proxy, knowledge, MCP
|
|
245
|
+
|
|
246
|
+
Session
|
|
247
|
+
durable identity, transcript, events, status, checkpoints
|
|
248
|
+
|
|
249
|
+
ToolContext
|
|
250
|
+
the active environment services and call identity for one tool execution
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
- **Agent** describes who is acting and how model work is configured.
|
|
254
|
+
- **Environment** describes what that agent can touch.
|
|
255
|
+
- **Session** records one durable execution and its lineage.
|
|
256
|
+
- **Tool** is an explicitly registered capability, not arbitrary model code.
|
|
257
|
+
- **Task** is an optional durable unit of background or orchestrated work.
|
|
258
|
+
- **Workflow** is deterministic application orchestration around agent steps.
|
|
259
|
+
|
|
260
|
+
An environment is optional for a conversational agent. It becomes important
|
|
261
|
+
when tools need files, commands, artifacts, secrets, network policy, or a
|
|
262
|
+
sandbox. Static environments are useful for trusted local work;
|
|
263
|
+
`EnvironmentFactory` creates or reattaches session-specific environments in
|
|
264
|
+
production.
|
|
265
|
+
|
|
266
|
+
## Use the smallest runtime shape
|
|
267
|
+
|
|
268
|
+
Do not add every Cayu primitive to every application.
|
|
269
|
+
|
|
270
|
+
| Desired behavior | Start with |
|
|
271
|
+
| --- | --- |
|
|
272
|
+
| One model-driven interaction | `CayuApp`, `AgentSpec`, provider, `RunRequest` |
|
|
273
|
+
| Deterministic model-callable action | `Tool`, `ToolSpec`, explicit `ToolEffect` |
|
|
274
|
+
| Authority over an effect | `ToolPolicy`; approval only where a human gate is required |
|
|
275
|
+
| Mutable files or commands | Explicit `Environment`, `Workspace`, and `Runner` |
|
|
276
|
+
| Durable uploaded or generated files | `ArtifactStore` |
|
|
277
|
+
| Long-lived conversation or recovery | Durable `SessionStore` and checkpoint APIs |
|
|
278
|
+
| Background durable work | `TaskStore` plus an explicitly started worker |
|
|
279
|
+
| Delegated model work | Subagent tools with bounded child-session policy |
|
|
280
|
+
| Behavioral regression proof | `EvalSuite` and trajectory assertions |
|
|
281
|
+
|
|
282
|
+
A conversation agent does not automatically need a workflow, task queue,
|
|
283
|
+
environment, memory store, server, or multi-agent topology. A coding agent does
|
|
284
|
+
not automatically need unrestricted shell access. Prefer narrow domain tools
|
|
285
|
+
and add authority only when the behavior requires it.
|
|
286
|
+
|
|
287
|
+
## Application UI and control plane
|
|
288
|
+
|
|
289
|
+
Your application should own:
|
|
290
|
+
|
|
291
|
+
- end-user prompts and domain forms;
|
|
292
|
+
- product authentication and authorization;
|
|
293
|
+
- business-specific workflow and state;
|
|
294
|
+
- user-facing streaming, notifications, and presentation; and
|
|
295
|
+
- decisions about when a run, task, approval, or interruption is allowed.
|
|
296
|
+
|
|
297
|
+
Cayu owns runtime execution and the operational state recorded by the
|
|
298
|
+
application's configured stores. Its optional dashboard is a control plane for
|
|
299
|
+
developers and operators: inspect sessions,
|
|
300
|
+
events, transcripts, tasks, usage, artifacts, pending actions, and recovery
|
|
301
|
+
state. It is not intended to replace the product experience your users need.
|
|
302
|
+
|
|
303
|
+
Start work through the API that matches the trigger:
|
|
304
|
+
|
|
305
|
+
- `run` for an immediate new session;
|
|
306
|
+
- `resume` for a deliberate continuation;
|
|
307
|
+
- `dispatch` for placement through a dispatcher;
|
|
308
|
+
- a task worker for durable queued work;
|
|
309
|
+
- a subagent for model-selected bounded delegation; or
|
|
310
|
+
- an event watcher for durable reactions to already-persisted events.
|
|
311
|
+
|
|
312
|
+
See [Triggering runs](https://github.com/vertexkg/cayu/blob/main/docs/triggering-runs.md) for the decision guide and
|
|
313
|
+
lifecycle responsibilities.
|
|
314
|
+
|
|
315
|
+
## Providers and environments
|
|
316
|
+
|
|
317
|
+
The base package includes the provider contracts and built-in OpenAI, Anthropic,
|
|
318
|
+
and OpenAI-compatible HTTP adapters. Optional extras add integrations without
|
|
319
|
+
forcing their dependencies into every deployment:
|
|
320
|
+
|
|
321
|
+
| Extra | Adds |
|
|
322
|
+
| --- | --- |
|
|
323
|
+
| `cayu[server]` | FastAPI control plane and packaged dashboard |
|
|
324
|
+
| `cayu[postgres]` | PostgreSQL session, task, knowledge, and related stores |
|
|
325
|
+
| `cayu[aws]` | Amazon Bedrock and Lambda MicroVM support |
|
|
326
|
+
| `cayu[vertex]` | Anthropic models through Google Cloud Vertex AI |
|
|
327
|
+
| `cayu[e2b]` | E2B runner and workspace |
|
|
328
|
+
| `cayu[microsandbox]` | Local microVM-backed untrusted-code runner |
|
|
329
|
+
| `cayu[egress]` | Virtual egress and credential-broker primitives |
|
|
330
|
+
| `cayu[files]` | Image and PDF inspection |
|
|
331
|
+
| `cayu[console]` | Interactive application console |
|
|
332
|
+
|
|
333
|
+
Providers normalize text, thinking, tool calls, usage, completion reasons, and
|
|
334
|
+
typed failures behind one runtime contract. Cayu does not infer a provider from
|
|
335
|
+
an arbitrary model name: applications register providers explicitly and may
|
|
336
|
+
add deterministic model-pattern routing.
|
|
337
|
+
|
|
338
|
+
The same agent can run in a local workspace, trusted Docker container, E2B,
|
|
339
|
+
Microsandbox, Lambda MicroVM, or an application-owned runner without changing
|
|
340
|
+
its identity or transcript contract.
|
|
341
|
+
|
|
342
|
+
## Production boundaries
|
|
343
|
+
|
|
344
|
+
Cayu makes safety boundaries explicit, but configuration still matters:
|
|
345
|
+
|
|
346
|
+
- `LocalRunner` is trusted local execution, not a sandbox.
|
|
347
|
+
- `DockerRunner` is useful for development and CI; ordinary Docker isolation
|
|
348
|
+
is not presented as a secure untrusted-code boundary.
|
|
349
|
+
- Environment registration does not imply selection: mark a default explicitly
|
|
350
|
+
or name the environment on the request. Provider defaults and model-pattern
|
|
351
|
+
routing should likewise be configured deliberately and kept unambiguous.
|
|
352
|
+
- Tool effects do not authorize themselves. Use policies, approvals, scoped
|
|
353
|
+
credentials, and destination controls where consequences require them.
|
|
354
|
+
- SQLite is appropriate for local and single-writer deployments. Use PostgreSQL
|
|
355
|
+
or another conforming shared store for sustained multi-process concurrency.
|
|
356
|
+
- The FastAPI control plane requires authentication outside explicit
|
|
357
|
+
`dev=True`; protect it as an operator surface, not an end-user endpoint.
|
|
358
|
+
Generated API documentation is a separate exposure decision.
|
|
359
|
+
- Usage is derived from recorded events and survives restarts when those events
|
|
360
|
+
use a durable store; cost remains an estimate against the price book your
|
|
361
|
+
application selects.
|
|
362
|
+
- Recovery never invents the outcome of an ambiguous external side effect.
|
|
363
|
+
Reconcile it through the typed recovery APIs.
|
|
364
|
+
|
|
365
|
+
Read [Runtime contracts](https://github.com/vertexkg/cayu/blob/main/docs/runtime-contracts.md) before changing persistence,
|
|
366
|
+
replay, approval, interruption, budget, provider, runner, or recovery behavior.
|
|
367
|
+
|
|
368
|
+
## Documentation
|
|
369
|
+
|
|
370
|
+
Start with the document that matches the job:
|
|
371
|
+
|
|
372
|
+
| Goal | Guide |
|
|
373
|
+
| --- | --- |
|
|
374
|
+
| Build an application, by hand or with an AI coding agent | [Authoring guide](https://github.com/vertexkg/cayu/blob/main/src/cayu/guides/authoring.md) |
|
|
375
|
+
| Classify tool mutation and replay behavior | [Tool effects](https://github.com/vertexkg/cayu/blob/main/src/cayu/guides/tool-effects.md) |
|
|
376
|
+
| Understand factories, process roles, and lifecycle | [Application anatomy](https://github.com/vertexkg/cayu/blob/main/src/cayu/guides/application-anatomy.md) |
|
|
377
|
+
| Choose how work starts | [Triggering runs](https://github.com/vertexkg/cayu/blob/main/docs/triggering-runs.md) |
|
|
378
|
+
| Create per-session workspaces and runners | [Environment factories](https://github.com/vertexkg/cayu/blob/main/docs/environment-factories.md) |
|
|
379
|
+
| Implement a runner for your platform | [Build a runner](https://github.com/vertexkg/cayu/blob/main/docs/build-a-runner.md) |
|
|
380
|
+
| Configure network and credential boundaries | [Virtual egress](https://github.com/vertexkg/cayu/blob/main/docs/virtual-egress.md) |
|
|
381
|
+
| Design assertions and trajectory evals | [Evals](https://github.com/vertexkg/cayu/blob/main/docs/evals.md) |
|
|
382
|
+
| Estimate and govern cost | [Cost optimization](https://github.com/vertexkg/cayu/blob/main/docs/cost-optimization.md) |
|
|
383
|
+
| Use the application console | [Console](https://github.com/vertexkg/cayu/blob/main/docs/console.md) |
|
|
384
|
+
| Inspect supported model metadata | [Model catalog](https://github.com/vertexkg/cayu/blob/main/docs/model-catalog.md) |
|
|
385
|
+
| Look up exact runtime behavior | [Runtime contracts](https://github.com/vertexkg/cayu/blob/main/docs/runtime-contracts.md) |
|
|
386
|
+
| Track prerelease behavior and migrations | [Release notes](https://github.com/vertexkg/cayu/blob/main/docs/release-notes.md) |
|
|
387
|
+
|
|
388
|
+
Maintainer-facing architecture is documented in
|
|
389
|
+
[Architecture](https://github.com/vertexkg/cayu/blob/main/docs/architecture.md),
|
|
390
|
+
[Project layout](https://github.com/vertexkg/cayu/blob/main/docs/project-layout.md),
|
|
391
|
+
and the [Glossary](https://github.com/vertexkg/cayu/blob/main/docs/glossary.md).
|
|
392
|
+
|
|
393
|
+
## Examples
|
|
394
|
+
|
|
395
|
+
- [Echo tool runtime](https://github.com/vertexkg/cayu/blob/main/examples/echo_tool_runtime.py) — credential-free model/tool loop.
|
|
396
|
+
- [Local environment runtime](https://github.com/vertexkg/cayu/blob/main/examples/local_environment_runtime.py) — files and commands.
|
|
397
|
+
- [Server example](https://github.com/vertexkg/cayu/blob/main/examples/server_example.py) — protected API and control plane.
|
|
398
|
+
- [Cloud PR reviewer](https://github.com/vertexkg/cayu/blob/main/docs/recipes/pr-reviewer.md) — durable task, isolated workspace,
|
|
399
|
+
QA, and an explicit external effect.
|
|
400
|
+
- [Business approvals](https://github.com/vertexkg/cayu/blob/main/docs/recipes/business-approvals.md) — domain approval routing
|
|
401
|
+
over the binary runtime primitive.
|
|
402
|
+
- [Advanced runtime examples](https://github.com/vertexkg/cayu/blob/main/examples/ADVANCED_RUNTIME_EXAMPLES.md) — forks,
|
|
403
|
+
compaction, taint isolation, speculative approval, and measured evidence.
|
|
404
|
+
|
|
405
|
+
Advanced examples are executable runtime specifications, not claims that one
|
|
406
|
+
strategy fits every workload. Their evidence boundaries and measured results
|
|
407
|
+
are described in
|
|
408
|
+
[Advanced runtime strategies](https://github.com/vertexkg/cayu/blob/main/docs/advanced-runtime-examples.md).
|
|
409
|
+
|
|
410
|
+
## Contributing and security
|
|
411
|
+
|
|
412
|
+
Framework contributors should read
|
|
413
|
+
[CONTRIBUTING.md](https://github.com/vertexkg/cayu/blob/main/CONTRIBUTING.md) for
|
|
414
|
+
placement policy, setup, validation commands, and pull-request requirements.
|
|
415
|
+
New third-party integrations normally live in their own packages against
|
|
416
|
+
Cayu's public extension contracts.
|
|
417
|
+
|
|
418
|
+
Report suspected vulnerabilities privately as described in
|
|
419
|
+
[SECURITY.md](https://github.com/vertexkg/cayu/blob/main/SECURITY.md). Do not open a public issue or pull request for a
|
|
420
|
+
suspected security vulnerability.
|
|
421
|
+
|
|
422
|
+
For questions and project discussion, join
|
|
423
|
+
[Discord](https://discord.gg/jWa3kKJ7R8). Use
|
|
424
|
+
[GitHub issues](https://github.com/vertexkg/cayu/issues) for actionable bugs and
|
|
425
|
+
concrete feature proposals.
|
|
426
|
+
|
|
427
|
+
## License
|
|
428
|
+
|
|
429
|
+
Cayu is licensed under the
|
|
430
|
+
[Apache License 2.0](https://github.com/vertexkg/cayu/blob/main/LICENSE).
|