3tears-agent-intention
0.89.0
0.88.0
0.86.0
0.85.0
0.84.0
0.83.0
0.82.0
0.81.0
0.80.0
0.79.0
0.78.0
0.77.0
0.76.0
0.75.0
0.74.0
0.73.0
0.72.0
0.71.0
0.70.1
0.70.0
0.69.0
0.68.0
0.67.0
0.66.0
0.65.0
0.64.0
0.63.1
0.63.0
0.62.0
0.61.0
0.60.0
0.59.0
0.58.0
0.57.0
0.56.3
0.56.2
0.56.1
0.56.0
0.55.0
0.54.0
0.53.0
0.52.1
0.52.0
0.51.1
0.51.0
0.50.0
0.49.0
0.48.0
0.47.1
0.47.0
0.46.1
0.46.0
0.45.1
0.45.0
0.44.0
0.43.0
0.42.0
0.41.4
0.41.3
0.41.2
0.41.1
0.41.0
0.40.0
0.39.0
0.38.0
0.37.0
0.36.0
0.35.1
0.35.0
0.34.0
0.33.0
0.32.1
0.32.0
0.31.0
0.30.1
0.30.0
0.29.0
0.28.0
0.27.0
0.26.1
0.26.0
0.25.0
0.24.7
0.24.6
0.24.5
0.24.4
0.24.3
0.24.2
0.24.1
0.24.0
0.23.9
0.23.8
0.23.7
0.23.6
0.23.5
0.23.3
0.23.2
0.23.11
0.23.10
0.23.1
0.23.0
0.22.5
0.22.4
0.22.3
0.22.2
0.22.1
0.22.0
0.21.0
0.20.0
0.19.4
0.19.3
0.19.2
0.19.1
0.19.0
0.18.0
0.17.9
0.17.8
0.17.7
0.17.6
0.17.5
0.17.4
0.17.3
0.17.2
0.17.1
0.17.0
0.16.1
0.16.0
0.15.0
0.89.0
0.88.0
0.86.0
0.85.0
0.84.0
0.83.0
0.82.0
0.81.0
0.80.0
0.79.0
0.78.0
0.77.0
0.76.0
0.75.0
0.74.0
0.73.0
0.72.0
0.71.0
0.70.1
0.70.0
0.69.0
0.68.0
0.67.0
0.66.0
0.65.0
0.64.0
0.63.1
0.63.0
0.62.0
0.61.0
0.60.0
0.59.0
0.58.0
0.57.0
0.56.3
0.56.2
0.56.1
0.56.0
0.55.0
0.54.0
0.53.0
0.52.1
0.52.0
0.51.1
0.51.0
0.50.0
0.49.0
0.48.0
0.47.1
0.47.0
0.46.1
0.46.0
0.45.1
0.45.0
0.44.0
0.43.0
0.42.0
0.41.4
0.41.3
0.41.2
0.41.1
0.41.0
0.40.0
0.39.0
0.38.0
0.37.0
0.36.0
0.35.1
0.35.0
0.34.0
0.33.0
0.32.1
0.32.0
0.31.0
0.30.1
0.30.0
0.29.0
0.28.0
0.27.0
0.26.1
0.26.0
0.25.0
0.24.7
0.24.6
0.24.5
0.24.4
0.24.3
0.24.2
0.24.1
0.24.0
0.23.9
0.23.8
0.23.7
0.23.6
0.23.5
0.23.3
0.23.2
0.23.11
0.23.10
0.23.1
0.23.0
0.22.5
0.22.4
0.22.3
0.22.2
0.22.1
0.22.0
0.21.0
0.20.0
0.19.4
0.19.3
0.19.2
0.19.1
0.19.0
0.18.0
0.17.9
0.17.8
0.17.7
0.17.6
0.17.5
0.17.4
0.17.3
0.17.2
0.17.1
0.17.0
0.16.1
0.16.0
0.15.0
توضیحات
Standing-wants corpus for LLM agents -- intention lifecycle, salience decay, embedding dedup, and private deliberation tools
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | 3tears-agent-intention-0.89.0 |
| نام | 3tears-agent-intention |
| نسخه کتابخانه | 0.89.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | pace |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/3tears-agent-intention/ |
| مجوز | - |
# 3tears Agent Intention
Standing-wants corpus for LLM agents. An intention is agent-authored deliberation
output -- a want the agent is holding onto ("ask Pace about the migration", "check
whether the wake threads are firing") -- with its own status lifecycle, salience
decay, and restraint brakes so the agent surfaces a want at most occasionally
rather than every turn.
Part of the [3tears](https://github.com/pacepace/3tears) framework.
## Installation
```bash
pip install 3tears-agent-intention
```
## Why a separate package (not a memory of `kind=intention`)
Memory is a hard-delete-only user-fact taxonomy with immutable scope columns and no
lifecycle. An intention is all lifecycle: `open -> asked -> granted / dropped`, a
partial index for "find the open wants", and a validated status value set. Riding the
shared `memory_type` PG enum would pollute a user-fact taxonomy with an agent-internal
control construct and force an irreversible enum add on six consumers.
Enhance-first is still honoured: intention **consumes** the reusable salience/decay
substrate the `agent/memory` enhancement built (the same `salience` column shape and
the shared `apply_salience_decay` helper), rather than reinventing it.
## Components
### `intentions` table
Partition on `agent_id`; composite PK `(agent_id, intention_id)`; CAS on `date_updated`
(mirrors memory). Columns: `status` (PG enum `intention_status`), `content`,
`embedding` (pgvector, 1024 wide unless configured -- see below; for dedup on log), `salience` (NUMERIC(5,4), reuses the
decay substrate), `last_decayed_at` (decay anchor), `last_surfaced_at` (cooldown
anchor), `source_memory_id` / `source_conversation_id` (soft-ref provenance, no FK).
### Embedding width
`intentions.embedding` is a plain pgvector `vector(N)`, and N is a deployment setting: agent-memory's width, so one embedding provider serves both corpora. It defaults to **1024**, so a host that configures nothing is unaffected. Give the same `embedding_dim` to `threetears.agent.intention.migrations.register(runner, embedding_dim=...)`, `IntentionsCollection(..., embedding_dim=...)` and `intentions_table(metadata, embedding_dim=...)`.
- **Ceilings.** PostgreSQL's pgvector HNSW index takes at most **2,000** dimensions; YugabyteDB's `ybhnsw` up to **16,000** (no `halfvec` there, so the column stays `vector`). `register` refuses a width below 1 or above 16,000; v001 refuses a width above 2,000 on PostgreSQL before any statement runs.
- **Writes are checked.** A save whose embedding is not the collection's width is refused with a `ValueError` naming both widths, before any SQL runs.
- **An existing schema keeps its width.** `await verify_embedding_width(store, embedding_dim)` (`threetears.agent.intention.embedding_width`, also exported from the package root) raises `EmbeddingWidthMismatch` when `intentions.embedding` is another width.
- **Changing it is an operator action.** `await resize_embedding_width(store, embedding_dim)` drops `ix_intentions_embedding_hnsw`, alters the column with `USING NULL`, recreates the index under its own name and options, and returns how many embeddings it cleared. Every want keeps its content and loses its embedding, so re-embed them. Nothing runs it automatically. **Run it with writes to these tables stopped:** on YugabyteDB the column change is a table rewrite, and writes made while it runs may be lost ("Concurrent DMLs may not be reflected in the new table", yugabyte-db issue 19860).
### User isolation is a `user_id` WHERE clause, not RBAC
Every metallm user shares one `agent_id`, so the partition isolates nothing and the
agent-owner RBAC short-circuit sees every want. `user_id` is the only boundary: the
collection's user-facing reads take `user_id` as a **required** parameter, and every
consumer read filters on it.
## Versioning policy
The package version moves in **lockstep** with the rest of the 3tears monorepo -- every
package tracks the framework git tag.
نیازمندی
| مقدار | نام |
|---|---|
| - | 3tears-agent-acl<0.90.0,>=0.89.0 |
| - | 3tears-langgraph<0.90.0,>=0.89.0 |
| - | 3tears-observe<0.90.0,>=0.89.0 |
| - | 3tears<0.90.0,>=0.89.0 |
| - | langchain-core |
| - | pgvector |
| - | pydantic |
| - | sqlalchemy |
| - | uuid-utils |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.14 | Python |
نحوه نصب
نصب پکیج whl 3tears-agent-intention-0.89.0:
pip install 3tears-agent-intention.whl
نصب پکیج tar.gz 3tears-agent-intention-0.89.0:
pip install 3tears-agent-intention.tar.gz