CubeLoop — a Pythonic, async-native agent harness core designed for high performance, readability, and production-grade persistence.
Python agent-frameworkagent-harnessagent-runtimeagentic-aiai-agentsai-frameworkanthropicharnessharness-engineeringharness-frameworklanggraphlanggraph-alternativellmmcpopenaipi-agentpi-agent-corepythonpython-agent
docs: capitalize the CubePi project name in prose
xf gong3f336c5fe2fc
diff --git a/examples/README.md b/examples/README.mdindex a3b27c8..a40ee02 100644--- a/examples/README.md+++ b/examples/README.md@@ -1,6 +1,6 @@# Examples-Runnable scripts demonstrating cubepi features. They use `FauxProvider`, so+Runnable scripts demonstrating CubePi features. They use `FauxProvider`, sothey need no API key — only the relevant service where noted.Run any example with `uv`:@@ -27,7 +27,7 @@ CUBEPI_MYSQL_DSN=mysql://user:pass@host:3306/dbname \uv run python examples/checkpointing_mysql.py```-Each script bootstraps the cubepi schema inline so it runs standalone, but in+Each script bootstraps the CubePi schema inline so it runs standalone, but inproduction the schema is owned by your host application's Alembic migration.The inline DDL mirrors exactly what that migration produces and uses the same`alembic_helpers`. See the host-integration runbooks for the migration recipediff --git a/website/docs/getting-started/core-concepts.md b/website/docs/getting-started/core-concepts.mdindex be85302..9678aba 100644--- a/website/docs/getting-started/core-concepts.md+++ b/website/docs/getting-started/core-concepts.md@@ -149,7 +149,7 @@ backends implement them. See [HITL guide](../guides/hitl).## HITL (Human-in-the-Loop)-cubepi ships a built-in `cubepi.hitl` module for scenarios where the+CubePi ships a built-in `cubepi.hitl` module for scenarios where theagent needs to **pause and wait for a human**:- **Sandbox confirmation** — a dangerous tool (bash, file write) needsdiff --git a/website/docs/guides/checkpointing/mysql.md b/website/docs/guides/checkpointing/mysql.mdindex 0519222..a35a103 100644--- a/website/docs/guides/checkpointing/mysql.md+++ b/website/docs/guides/checkpointing/mysql.md@@ -68,7 +68,7 @@ unlike SQLite), CubePi **does not create these for you** — it verifieson `__aenter__` that they exist with the expected `schema_version`.If they're missing, you get `CubepiSchemaUninitialized`. If the version-doesn't match this cubepi release, you get `CubepiSchemaMismatch`. A+doesn't match this CubePi release, you get `CubepiSchemaMismatch`. Aproduction database belongs to the host application's migration system(Alembic, …), not to a third-party library.@@ -121,7 +121,7 @@ def upgrade():````write_schema_version_op()` is idempotent: it deletes any rows from a-prior cubepi version and inserts the current one. When CubePi later+prior CubePi version and inserts the current one. When CubePi laterbumps `EXPECTED_SCHEMA_VERSION`, generate a new revision and run itagain.@@ -189,7 +189,7 @@ from `dict.update`.)- **`CubepiSchemaUninitialized`** — Your DB is empty, your migrationsdidn't run, or the `cubepi_schema_version` table is malformed. Applythe host alembic upgrade first.-- **`CubepiSchemaMismatch`** — You upgraded cubepi but didn't generate a+- **`CubepiSchemaMismatch`** — You upgraded CubePi but didn't generate anew migration. Generate one, apply it, and CubePi will start.- **JSON default errors on older MySQL** — JSON columns use`DEFAULT (JSON_OBJECT())`, which requires MySQL 8.0.13+.diff --git a/website/docs/guides/checkpointing/postgres.md b/website/docs/guides/checkpointing/postgres.mdindex c402aff..72cbe98 100644--- a/website/docs/guides/checkpointing/postgres.md+++ b/website/docs/guides/checkpointing/postgres.md@@ -61,7 +61,7 @@ The checkpointer expects three tables: `cubepi_threads`,they exist with the expected `schema_version`.If they're missing, you get `CubepiSchemaUninitialized`. If the-version doesn't match this cubepi release, you get+version doesn't match this CubePi release, you get`CubepiSchemaMismatch`.The reason: a production database belongs to the host application's@@ -87,7 +87,7 @@ alembic revision --autogenerate -m "add cubepi checkpointer"```Autogenerate emits the `CREATE TABLE`s from `cubepi_metadata`, but-SQLAlchemy `MetaData` **cannot model two things cubepi needs**, so add+SQLAlchemy `MetaData` **cannot model two things CubePi needs**, so addthem to the generated migration by hand: the 64 hash partitions of`cubepi_messages` (via `create_message_partitions_op()`) and the`cubepi_schema_version` row (via `write_schema_version_op()`). Use the@@ -108,7 +108,7 @@ def upgrade():Both helpers return a SQL string — you pass them to `op.execute(...)`.`write_schema_version_op()` is idempotent: it deletes any rows from a-prior cubepi version and inserts the current one.+prior CubePi version and inserts the current one.When CubePi later upgrades and bumps `EXPECTED_SCHEMA_VERSION`, yougenerate a new revision and call `op.execute(write_schema_version_op())`@@ -186,12 +186,12 @@ to so the schema is forward-compatible.- **`CubepiSchemaUninitialized`** — Your DB is empty or yourmigrations didn't run. Apply the host alembic upgrade first.-- **`CubepiSchemaMismatch`** — You upgraded cubepi but didn't generate+- **`CubepiSchemaMismatch`** — You upgraded CubePi but didn't generatea new migration. Generate one, apply it, and CubePi will start.:::info Schema v2 (HITL)- cubepi ≥ the HITL feature bumps `EXPECTED_SCHEMA_VERSION` from 1 to 2+ CubePi ≥ the HITL feature bumps `EXPECTED_SCHEMA_VERSION` from 1 to 2and adds a `pending_request JSONB NULL` column to `cubepi_threads`.Your host alembic upgrade must call`add_pending_request_column_op()` (fromdiff --git a/website/docs/guides/hitl.md b/website/docs/guides/hitl.mdindex b392ca9..1730bdc 100644--- a/website/docs/guides/hitl.md+++ b/website/docs/guides/hitl.md@@ -6,7 +6,7 @@ sidebar_position: 10# Human-in-the-Loop (HITL)-cubepi's HITL channel lets an agent **pause and ask a human** before proceeding.+CubePi's HITL channel lets an agent **pause and ask a human** before proceeding.It handles two recurring patterns with a single primitive:1. **Sandbox tool confirmation** — a dangerous tool (bash, file writes, API@@ -476,7 +476,7 @@ well-defined safe suspension points:**Custom tools that mix HITL with other work inside `execute()` are NOTdurable cross-process by default.** If such a tool's process dies mid-execute,-anything that ran before the channel call would be lost. cubepi will raise+anything that ran before the channel call would be lost. CubePi will raise`HitlDurabilityNotGuaranteed` unless the `CheckpointedChannel` is constructedwith `allow_inside_custom_tool=True` — the caller must acknowledge theidempotency contract (the tool body must be a pure HITL wait with nodiff --git a/website/docs/guides/middleware/examples.md b/website/docs/guides/middleware/examples.mdindex ec52a80..892c102 100644--- a/website/docs/guides/middleware/examples.md+++ b/website/docs/guides/middleware/examples.md@@ -239,7 +239,7 @@ model with the feedback message in context.## Human-in-the-loop tool confirmation-cubepi ships two built-in HITL middlewares in `cubepi.hitl`:+CubePi ships two built-in HITL middlewares in `cubepi.hitl`:**`ConfirmToolCallMiddleware`** — "always ask the human for this tool":diff --git a/website/docs/guides/providers/capability-and-presets.md b/website/docs/guides/providers/capability-and-presets.mdindex 0727f6d..bd97f84 100644--- a/website/docs/guides/providers/capability-and-presets.md+++ b/website/docs/guides/providers/capability-and-presets.md@@ -5,7 +5,7 @@ description: "Provider capabilities and model presets in CubePi — compare feat# Capability Descriptors-_Capability descriptors added in cubepi `0.5`._+_Capability descriptors added in CubePi `0.5`._This page is about reaching **any** model — the big SaaS APIs, a regionalendpoint, a coding-plan tier, or your own vLLM box — without writing@@ -18,10 +18,10 @@ per-vendor glue. The progression is deliberate:subclassing, no forking.:::note Preset catalogs live in the host application-cubepi ships the **mechanism** (the `CapabilityDescriptor` and the wire+CubePi ships the **mechanism** (the `CapabilityDescriptor` and the wireruntime that applies it), not a catalog of vendors. A ready-made list ofproviders — base URLs, auth, regional/coding-plan endpoints, model lists —-is product data and belongs to the application embedding cubepi (for+is product data and belongs to the application embedding CubePi (forexample, cubebox maintains its own provider catalog). To reach a specificvendor, build the provider with the right `base_url` + `CapabilityDescriptor`as shown below.@@ -45,7 +45,7 @@ await agent.prompt("Hello!")```That's the whole setup. A provider built without `capability=` produces-byte-identical output to cubepi `0.4` — the machinery below only kicks in+byte-identical output to CubePi `0.4` — the machinery below only kicks inwhen you ask for it.## 2. Off-default endpoints — the CapabilityDescriptor@@ -129,7 +129,7 @@ the capability value wins.### Reasoning level: `reasoning_level` (three shapes)-Beyond on/off, cubepi maps a `ThinkingLevel`+Beyond on/off, CubePi maps a `ThinkingLevel`(`off`/`minimal`/`low`/`medium`/`high`/`xhigh`) onto a concrete wire valuewritten at a dotted `path`. `kind` picks the shape:diff --git a/website/docs/guides/providers/openai.md b/website/docs/guides/providers/openai.mdindex d27988c..8c764cc 100644--- a/website/docs/guides/providers/openai.md+++ b/website/docs/guides/providers/openai.md@@ -80,7 +80,7 @@ temperature handling) are configured through apassed at construction. For example, `max_tokens_field="max_completion_tokens"`renames the key on the way out. See[Capability Descriptors](./capability-and-presets) for the full set of-knobs (cubepi `0.5+`).+knobs (CubePi `0.5+`).### Pointing at vLLM / LiteLLM / DeepSeek@@ -159,7 +159,7 @@ provider.- **`stream_options.include_usage` rejected** — Some compatiblesreject the whole `stream_options` field. **`on_payload` cannot fix- this**: cubepi 0.3 calls `kwargs.setdefault("stream_options", {})`+ this**: CubePi 0.3 calls `kwargs.setdefault("stream_options", {})`*after* your callback runs, so deleting the key in `on_payload` issilently undone. Workarounds:- Subclass `OpenAIProvider` and override `stream()` to skip the@@ -167,7 +167,7 @@ provider.- Set `include_usage=False` in `on_payload` (the field still goesout, but is usually accepted as a no-op even by strictbackends).- - Use a [`CapabilityDescriptor`](./capability-and-presets) (cubepi+ - Use a [`CapabilityDescriptor`](./capability-and-presets) (CubePi`0.5+`) to describe your backend's reasoning wiring declaratively.- **Thinking events but no `thinking_*` events** — Your backendsurfaces reasoning under a non-standard field. Either add a fourthdiff --git a/website/docs/guides/tracing/content-recording.md b/website/docs/guides/tracing/content-recording.mdindex 7063253..9a2674f 100644--- a/website/docs/guides/tracing/content-recording.md+++ b/website/docs/guides/tracing/content-recording.md@@ -6,7 +6,7 @@ sidebar_position: 4# Recording Prompts, Responses, and Tool Payloads-By default cubepi's tracing emits structural attributes only — operation+By default CubePi's tracing emits structural attributes only — operationnames, models, token counts, finish reasons, durations. **No prompt content,no model output, no tool arguments or results leave the process.** This isdeliberate: many agent setups handle PII, customer data, or trade-secretdiff --git a/website/docs/guides/tracing/otlp.md b/website/docs/guides/tracing/otlp.mdindex aaf5670..0b3d352 100644--- a/website/docs/guides/tracing/otlp.md+++ b/website/docs/guides/tracing/otlp.md@@ -111,10 +111,10 @@ until that ships, agent runs and the surrounding service trace are linkedonly by their resource attributes (`service.name`, `gen_ai.agent.name`,`cubepi.run_id`).-If you need the upstream trace to continue into cubepi today, the+If you need the upstream trace to continue into CubePi today, theworkaround is to set the OTel current span yourself before calling`agent.prompt(...)` and let the agent's spans inherit it via OTel's-ambient context — cubepi never overrides an active parent.+ambient context — CubePi never overrides an active parent.On the way out, MCP `tools/call` does inject W3C `traceparent` as an HTTPheader automatically, so an instrumented MCP server downstream of thediff --git a/website/docs/guides/tracing/overview.md b/website/docs/guides/tracing/overview.mdindex 83d211c..8081e00 100644--- a/website/docs/guides/tracing/overview.md+++ b/website/docs/guides/tracing/overview.md@@ -29,7 +29,7 @@ Each layer carries standard `gen_ai.*` attributes — `gen_ai.operation.name`,## What ships out of the box- **Tracer** — builds an SDK `TracerProvider`, attaches one- `BatchSpanProcessor` per exporter, wires the cubepi event stream into spans.+ `BatchSpanProcessor` per exporter, wires the CubePi event stream into spans.- **Meter** — sibling for OTel histograms:`gen_ai.client.operation.duration`, `gen_ai.client.operation.time_to_first_chunk`,`gen_ai.client.token.usage`.@@ -86,7 +86,7 @@ Each layer carries standard `gen_ai.*` attributes — `gen_ai.operation.name`,- [Getting Started](./getting-started) — install the extra and emit yourfirst spans-- [OTLP & Backends](./otlp) — point cubepi at Jaeger, Tempo, Honeycomb, …+- [OTLP & Backends](./otlp) — point CubePi at Jaeger, Tempo, Honeycomb, …- [Content Recording & Redaction](./content-recording) — record prompts andresponses safely- [Metrics](./metrics) — histograms via `Meter`diff --git a/website/docs/recipes/multi-provider-failover.md b/website/docs/recipes/multi-provider-failover.mdindex f914daa..5b61895 100644--- a/website/docs/recipes/multi-provider-failover.md+++ b/website/docs/recipes/multi-provider-failover.md@@ -189,7 +189,7 @@ if first.type == "error":A more robust approach is to fork the built-in providers and re-raisespecific SDK exceptions from `_produce` so they reach `provider.stream()`as real Python exceptions — but that's a larger change against-cubepi itself.+CubePi itself.## Adding circuit breakingdiff --git a/website/docs/recipes/postgres-fastapi.md b/website/docs/recipes/postgres-fastapi.mdindex 2668a28..55963d4 100644--- a/website/docs/recipes/postgres-fastapi.md+++ b/website/docs/recipes/postgres-fastapi.md@@ -12,11 +12,11 @@ the authenticated user.**Time to run:** 30 minutes.**Deps:** `cubepi[postgres]`, `fastapi`, `uvicorn[standard]`,-`sse-starlette`, a running Postgres with the cubepi schema applied.+`sse-starlette`, a running Postgres with the CubePi schema applied.## Schema first-Before the service starts, run the cubepi schema migration. The+Before the service starts, run the CubePi schema migration. Thequickest way for this recipe:```bash