Repository navigation
Conversation
|
Contributor
|
✅ agents import sizes: no significant changes ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a draft user-facing doc for Structured Memory, a proposed set of tools that give a model its own SQLite tables to create, query, and maintain. Nothing is implemented yet: the doc is here so the developer-facing design can be reviewed before implementation starts.
Why
db_create_table,db_insert,db_update, ...), so each operation can be granted, gated behind approval, or denied on its own.PRAGMA query_only: both are refused by Durable Object SQLite (SQLITE_AUTH), as are temp tables and temp triggers.cursor.rowsWrittenafter a query:DROP TABLEreports 0 rows written, and a multi-statement query only reports its last statement.db_queryinstead runs inside a transaction that is always rolled back.wherecondition ofdb_updateanddb_deleteto reject injected statements: replaced by selecting matchingrowids under a random per-call column alias, checking the result's columns, and writing by boundrowids, all in one transaction.db_queryaccepts arbitrary SQL.Code Changes
docs/agents/structured-memory.md(new, not yet linked fromdocs/agents/index.md):createStructuredMemory(ctx, { name }), the facet class export, and adapters forAiSdkHarnessand the pi harness, following theagents/websearchlayout.db_describe,db_query, the structured write tools,db_undo, and adb_executeescape hatch. Write tools take an optionalreasonthat is stored in the history.permissionswith"allow","ask", and"deny"levels."ask"maps toneedsApprovalin the AI SDK; pi approval is a TODO until the harness supports it.