diff --git a/agents.mdx b/agents.mdx index b71628d..7b34f3a 100644 --- a/agents.mdx +++ b/agents.mdx @@ -37,7 +37,7 @@ Projects built on pre.dev already have the key as `PREDEV_API_KEY`. It spends th ## Plan access -Browser tasks and AI Gateway calls work on every plan, Free included: a Free personal account can spend 2 credits on browser tasks, and a Free workspace 5 credits on AI calls, before it needs a plan. Specifications and the MCP server need Premium, Pro, Team or Enterprise; Plus and team workspaces without a plan get 3 trial specifications. See [API and MCP access](/coding-agent/plans-and-credits#api-and-mcp-access). +Browser tasks and AI Gateway calls work on every plan, Free included: a Free personal account can spend 2 credits on browser tasks, and a Free workspace 5 credits on AI calls, before it needs a plan. Specifications and the MCP server need Premium, Pro, Team or Enterprise; Plus and team workspaces without a plan get 3 trial specifications. The MCP memory tools work on every plan, Free included, and use no credits. See [API and MCP access](/coding-agent/plans-and-credits#api-and-mcp-access). ## Choose an interface @@ -51,6 +51,8 @@ Browser tasks and AI Gateway calls work on every plan, Free included: a Free per | Retrieve a specification | `GET /spec-status/{specId}` | `get_spec` | | Read a project's plan | `GET /get-plan` | `get_plan` | | Browse specification history | `GET /list-specs` | `list_specs` | +| Read what the user told pre.dev to remember | Use MCP | `memory_list`, `memory_search` | +| Save or remove one of the user's memories | Use MCP | `memory_remember`, `memory_forget` | | Search specification input | `GET /find-specs` | Use REST | | Check available credits | `GET /credits-balance` | Use REST | | Call a model | `https://api.pre.dev/v1` with an OpenAI or Anthropic SDK | Use REST | diff --git a/api-reference/authentication.mdx b/api-reference/authentication.mdx index 5063ee9..48b875c 100644 --- a/api-reference/authentication.mdx +++ b/api-reference/authentication.mdx @@ -45,9 +45,9 @@ Authentication and feature access are separate checks. | --- | --- | | Browser Agents REST | Every account, including Free. Task submission then applies its own trial, credit, and queue checks. | | AI Gateway | Every account, including Free. Free workspaces have a small lifetime allowance for gateway calls. | -| Architect REST and the MCP server | Personal accounts on a paid plan, and team workspaces | +| Architect REST and the MCP server | Personal accounts on a paid plan, and team workspaces. The MCP server also accepts Free accounts, for the memory tools | -A Free account can call Browser Agents and the AI Gateway, while an Architect REST or MCP call returns `401`. Which plans can generate specifications is covered in [plans, credits, and pricing](/coding-agent/plans-and-credits#api-and-mcp-access). Read the response message for the required action. +A Free account can call Browser Agents, the AI Gateway, and the MCP memory tools, while an Architect REST call returns `401` and the other MCP tools return an error result with a link to subscribe. Which plans can generate specifications is covered in [plans, credits, and pricing](/coding-agent/plans-and-credits#api-and-mcp-access). Read the response message for the required action. ## Account and team context diff --git a/api-reference/overview.mdx b/api-reference/overview.mdx index 28cb3ab..77662b8 100644 --- a/api-reference/overview.mdx +++ b/api-reference/overview.mdx @@ -62,6 +62,6 @@ Specifications, browser runs, and video generation run as jobs. All three follow The [Node SDK](/architect-agent/sdks/node) and [Python SDK](/architect-agent/sdks/python) wrap specification and browser operations. Use direct HTTP for endpoints or headers without a wrapper, including live browser URLs, existing-run SSE, and browser idempotency keys. -The [MCP server](/architect-agent/mcp-setup) exposes eight primary tools and three deprecated browser aliases. MCP uses JSON-RPC over HTTP; its parameter names and result envelopes differ from REST. See the [tool reference](/mcp/tools). +The [MCP server](/architect-agent/mcp-setup) exposes twelve primary tools, including the memory tools, and three deprecated browser aliases. MCP uses JSON-RPC over HTTP; its parameter names and result envelopes differ from REST. See the [tool reference](/mcp/tools). Two OpenAPI 3.1 files describe the public API, for code generation or agent ingestion: [openapi.json](/api-reference/openapi.json) covers specifications, browser tasks, and the credit balance, and [ai-gateway.openapi.json](/api-reference/ai-gateway.openapi.json) covers every AI Gateway `/v1` operation. diff --git a/architect-agent/mcp-setup.mdx b/architect-agent/mcp-setup.mdx index a731b55..a8f446c 100644 --- a/architect-agent/mcp-setup.mdx +++ b/architect-agent/mcp-setup.mdx @@ -30,15 +30,16 @@ Run `npx -y @predotdev/mcp setup` with a 10 minute timeout and tell me what to c | --- | --- | | [`fast_spec`, `deep_spec`, `get_spec`, `list_specs`, `get_plan`](/mcp/tools) | Specifications and project plans | | [`browser_agent`, `browser_agent_get`, `browser_agent_list`](/mcp/tools#browser_agent) | Cloud Browser Agents: tasks on pre.dev's browsers with structured results | +| [`memory_list`, `memory_search`, `memory_remember`, `memory_forget`](/mcp/tools#memory_list) | [Memory](/coding-agent/memory): what you told pre.dev to remember, in every agent | | [`chrome_*`](/browser-agents/local#tools) | Browser Agents Local: your agent drives the Chrome you already have open, with your profiles and logins | -The specification, plan, and cloud browser tools are the hosted server's tools, passed through on your key. They accept personal accounts on a paid plan and team workspaces; see [API and MCP access](/coding-agent/plans-and-credits#api-and-mcp-access). The Chrome tools run on your computer. For manual configuration of each agent, commands such as `check`, `login`, and `uninstall`, and troubleshooting, see [Browser Agents Local](/browser-agents/local). +The specification, plan, and cloud browser tools are the hosted server's tools, passed through on your key. They accept personal accounts on a paid plan and team workspaces; see [API and MCP access](/coding-agent/plans-and-credits#api-and-mcp-access). The memory tools work on every plan, Free included. The Chrome tools run on your computer. For manual configuration of each agent, commands such as `check`, `login`, and `uninstall`, and troubleshooting, see [Browser Agents Local](/browser-agents/local). ## No Node.js? Connect the hosted server -One connection exposes [eight primary tools](/mcp/tools) for specifications, project plans and cloud browser automation, without the Chrome tools. It accepts the same accounts as the local server. +One connection exposes [twelve primary tools](/mcp/tools) for specifications, project plans, cloud browser automation and memory, without the Chrome tools. It accepts the same accounts as the local server. @@ -93,13 +94,19 @@ Use pre.dev browser_agent to read https://example.com and extract its main heading. Fetch the complete structured result afterward. ``` +Or save a preference to your [memory](/coding-agent/memory): + +```text +Use pre.dev memory_remember to remember that I use pnpm, not npm. +``` + With the local server, try [your own Chrome](/browser-agents/local): ```text List my Chrome profiles and the tabs I have open. ``` -Tool execution uses your account's credits and access. Connecting a server does not change your plan. A Free account can use browser REST and the local Chrome tools, but not the hosted tools; see [authentication](/api-reference/authentication#which-accounts-each-interface-accepts). +Tool execution uses your account's credits and access. Connecting a server does not change your plan. A Free account can use browser REST, the local Chrome tools, and the memory tools, but not the other hosted tools; see [authentication](/api-reference/authentication#which-accounts-each-interface-accepts). ## Connection lifecycle diff --git a/changelog.mdx b/changelog.mdx index 641a4b2..03d41e0 100644 --- a/changelog.mdx +++ b/changelog.mdx @@ -7,6 +7,19 @@ User-facing changes to the pre.dev API, SDKs, and dashboard. Subscribe via the [GitHub releases page](https://github.com/predotdev/predev-api/releases) to get notified on every SDK bump. +## 2026-10-21 + +### Memory + +- **pre.dev remembers how you work.** [Memory](/coding-agent/memory) has three kinds: **This project**, for everyone with access to the project; **All my projects**, yours only, not even admins can see it; and **Team**, which everyone in an organization reads, admins edit, and an admin can mark **Required** so it always applies. +- **It learns from your chats.** pre.dev saves lasting preferences and corrections from your chats, and short project facts it confirms while working, such as a command that works or where something lives. Every save shows under the reply with **Undo**, and you can edit, archive, or delete any entry. Say "remember ..." in any chat to save something yourself. +- **Remembered N things** under a reply shows what pre.dev had in mind for it, and the project header's **Memory** button opens the Memory panel. +- **Shared projects work per person.** Each person's own memory applies to the messages they send, nobody else sees your memory list, and pre.dev learns something personal only from your own messages. +- **Import** what Claude Code, Codex, Gemini CLI, Windsurf, and other coding agents remember with `predev memory import`. On the web, upload `CLAUDE.md`, `AGENTS.md`, `.cursorrules`, and other files, or paste Cursor's User Rules, and a guide brings memory over from ChatGPT, Claude, or Gemini. Secrets are refused and never saved. +- **Export** a project's memory to `AGENTS.md`. +- **Memory in Claude Code and Cursor.** The [pre.dev MCP server](/architect-agent/mcp-setup) adds [`memory_list`, `memory_search`, `memory_remember`, and `memory_forget`](/mcp/tools#memory_list), free on every plan. Add it to Claude Code with `claude mcp add --transport http predev https://api.pre.dev/mcp`. +- **In the CLI**, `/memory` lists, edits, imports, and exports memory, `/remember` and `/forget` add and remove entries, and `/memory undo` takes back the newest change. See [CLI commands](/cli/commands#memory). + ## 2026-10-19 ### Coding agent on DeepSeek V4.1 Flash 1017 diff --git a/cli/commands.mdx b/cli/commands.mdx index d21d287..c2ae8c4 100644 --- a/cli/commands.mdx +++ b/cli/commands.mdx @@ -36,6 +36,23 @@ A message that starts with `>>` also forks a task. Separate sessions use separat Escape returns from project views to chat. Views require the corresponding project data. +## Memory + +| Command | Action | +| --- | --- | +| `/memory` | List this project's memory, yours, and your team's; add, import, or export, and press Enter on an entry to edit, pin, move, or delete it | +| `/memory add `, `/remember ` | Remember something for this project | +| `/remember --me ` | Remember something for all your projects | +| `/memory import` | Review and import what your other coding agents remember on this computer | +| `/memory import ` | Import one file, such as `CLAUDE.md` or `AGENTS.md` | +| `/memory search ` | Search this project's memory; `--all` searches your other projects too | +| `/memory export [--me]` | Write this project's memory, and with `--me` yours, into `AGENTS.md` at the repository root | +| `/memory pause`, `/memory resume` | Stop or restart learning from this chat | +| `/memory undo` | Take back the newest memory change from this chat | +| `/forget ` | Find an entry and delete it after you confirm | + +See [Memory](/coding-agent/memory) for what each kind of memory is, who can see it, and how pre.dev learns. + ## Session | Command | Action | @@ -98,4 +115,5 @@ In the Skills and MCP panels, press Enter or Space to toggle an entry, `d` to re | `predev --help` or `predev -h` | Print launch help and exit | | `predev run ""` | Run one request without the app, then exit. See [Run one task without the app](/cli/overview#run-one-task-without-the-app) | | `predev logout` | Forget the saved login on this computer; with `PREDEV_API_KEY` set, the CLI then signs in with the key | +| `predev memory import` | Import what your other coding agents remember on this computer, then exit. `--dry-run` shows what would come in. See [Import](/coding-agent/memory#import) | | `predev mcp setup` | Add the [pre.dev MCP server](/architect-agent/mcp-setup) to your other coding agents, such as Claude Code, Codex, and Cursor. Needs Node.js 22 or later | diff --git a/cli/overview.mdx b/cli/overview.mdx index 4030a71..828770e 100644 --- a/cli/overview.mdx +++ b/cli/overview.mdx @@ -90,6 +90,16 @@ The agent decides whether to answer, plan, or build. Use `/sprint ` for Review file changes with `git status` and `git diff`. `/undo` puts the files back the way they were before your last message or sprint, and `/redo` brings the change back. +## Memory + +The agent remembers how you like to work and what matters in this project, the same memory you see on the web. Say "remember ..." or type `/remember ` to save something, and `/memory` to see, edit, import, or export what it remembers. After the first reply in a chat, one line says how much it remembers: `memory · 4 things remembered for this project · /memory`. + +```bash +predev memory import +``` + +`predev memory import` brings in what Claude Code, Codex, Gemini CLI, Windsurf, and other agents on this computer remember, with secrets removed before anything uploads. Add `--dry-run` to see what would come in. See [Memory](/coding-agent/memory#in-the-cli) for every command. + ## Your laptop or the cloud A session you start in the CLI runs on your machine. The web shows the same session, and a message typed there runs on your laptop while the CLI is connected. When the app's dev server is running, the owner can see it live in the web Preview. diff --git a/coding-agent/memory.mdx b/coding-agent/memory.mdx new file mode 100644 index 0000000..3a15572 --- /dev/null +++ b/coding-agent/memory.mdx @@ -0,0 +1,169 @@ +--- +title: "Memory" +description: "pre.dev remembers how you like to work and what matters in each project, across chats, the web app, the CLI, and your other coding agents." +--- + +pre.dev remembers how you like to work and what matters about each project. That memory applies in every chat, on the web and in the [CLI](/cli/overview), and in Claude Code, Cursor, and other coding agents through the [pre.dev MCP server](#use-it-in-claude-code-cursor-and-other-agents). You can see, change, and undo everything it saves. + +## Three kinds of memory + +| Memory | Who can see it | Where it applies | +| --- | --- | --- | +| **This project** | Everyone with access to the project | Every chat in the project | +| **All my projects** | Only you. Not even admins can see it | Every project you work in. Inside an organization's projects, an entry can be limited to that organization's projects | +| **Team** | Everyone in your organization can read it, and admins edit it | Every project in the organization | + +An admin can mark a team entry **Required**. A Required entry always applies, and it wins over project and personal memory. When project or team memory disagrees with your personal memory, pre.dev follows the project or team. + +In an organization, anyone can offer one of their entries to the team with **Suggest to** and the organization's name. An admin approves it on the **Team** tab of the Memory page. + +Changes apply from the next message. + +## How things get saved + +- **Ask in a chat.** Say "remember ..." in any chat, for example `remember we use pnpm, not npm`. +- **Add one yourself.** Add an entry on the Memory page or in the chat's Memory panel. +- **Remember a message.** Hover any message in a chat and choose **Remember**. The Memory panel opens with the message's text, ready to trim and save. Nothing is saved until you do. +- **Import.** Bring in what your other agents and AI apps already know. See [Import](#import). +- **pre.dev learns on its own.** It saves lasting preferences and corrections from your chats. While it works, it also saves short project facts it has confirmed, such as a command that works or where something lives in the code. + +Everything pre.dev saves shows as a line under the reply, such as **Saved to project memory** or **Saved to your memory**, with who can see it and **Undo**. You can edit, archive, or delete any entry. Archived entries are not used; restore one to use it again. + + +Memory never stores secrets. pre.dev refuses passwords, API keys, tokens, and private keys, and never saves them. + + +## See and manage memory + +### The Memory page + +Open **Memory** in the sidebar. + +| Part | What it does | +| --- | --- | +| **All my projects** | Your personal memory, and the **Learn from my chats** switch | +| **By project** | Each project's memory | +| **Team** | In an organization's workspace: team entries, suggestions waiting for an admin, and the organization's memory settings | +| **Activity** | What was learned, saved, edited, archived, restored, deleted, or undone | +| Search | Searches every kind of memory at once | +| **Import** | Brings memory in from other coding agents, AI apps, files, or pasted text | +| **Export** | Downloads a project's memory as `AGENTS.md`, with or without your personal memory | +| **Archived** | Entries that are not used. Restore one to use it again | + +Each entry shows where it applies and where it came from: **You**, **Learned in** a chat (a link to that reply), **Saved by pre.dev**, or **From** Claude Code or another source. Select where it applies to move it between **This project** and **All my projects**. **Pin to top** puts an entry first. + +### In a chat + +- The **Memory** button in the project header shows how many entries apply, for example **Memory · 7**. It opens the Memory panel beside the chat, with this project's memory, yours, and your team's. You can add an entry there. +- **Remembered N things** under a reply shows what pre.dev had in mind for that reply. +- Hover a message and choose **Remember** to save it, or part of it, as memory. +- A line under the reply names anything pre.dev saved from it, with **Undo**. +- In a new user's first chat, a short line over the composer explains memory and links to it. + +## Shared projects + +When several people work in one project: + +- Each person's own memory applies to the messages they send. Runs you set up, such as schedules, loops, and goals, use your memory too. +- Other people in the project see the replies, never your memory list. +- pre.dev learns something personal only from your own messages. +- Project memory is shared with everyone in the project. Its save line says how many people can see it. + +## Controls + +| Control | Where | What it does | +| --- | --- | --- | +| **Learn from my chats** | Memory page, **All my projects** | Turns learning from your chats on or off | +| **Use what I saved for all my projects** | Project setup, **Memory** tab | Loads your personal memory in this project's chats | +| **Use team memory here** | Project setup, **Memory** tab | Loads your organization's team memory here. When off, only Required entries load | +| **Learn from sessions in this project** | Project setup, **Memory** tab | Lets pre.dev save what it learns in this project's chats | +| **Use memory in this chat** and **Learn from this chat** | The composer's **+** menu | The same choices for one chat | + +Open Project setup from the composer's **+** menu or with `/integrations`. Only people who can edit a project can change its memory settings. + +Organization admins set policy for every project in the organization, on the **Team** tab of the Memory page: + +| Setting | When it is off | +| --- | --- | +| **Memory** | No memory loads in the organization's projects, and nothing new is saved | +| **Learning** | pre.dev does not save what it learns in the organization's projects | +| **Imports** | Nobody can import memory from other agents into the organization's projects | +| **Personal memory from** the organization's projects | Nothing from the organization's projects goes into anyone's personal memory | + +## Import + +You can bring in what Claude Code, Codex, Cursor, and other coding agents remember, and what ChatGPT, Claude, or Gemini knows about you. Secrets are removed before anything is saved. + +### From the CLI + +```bash +predev memory import +``` + +`predev memory import` finds the memory files that Claude Code, Codex, pi, Hermes, Gemini CLI, Windsurf, Cline, Continue, OpenCode, and Kiro keep on your computer, and imports them. Secrets are removed on your computer before anything uploads. Files you wrote are used right away. Notes an agent wrote for itself, such as Claude Code's project memory, wait in Memory for you to accept them. Add `--dry-run` to see what would come in without uploading anything. + +Inside the CLI, `/memory import` shows what it found and lets you review it before anything is saved. The first time you start the CLI, it offers the same screen once. Changes to files you imported come in on your next import, and the CLI also picks them up when it starts. + +### On the web + +On the Memory page, choose **Import**: + +- **From Claude Code, Codex, Cursor and other coding agents**: run the CLI command above, or upload the files. Import takes `CLAUDE.md`, `AGENTS.md`, `GEMINI.md`, `.cursorrules`, `.windsurfrules`, or any `.md` or `.txt` file, up to 20 at a time. On a Mac, press Cmd+Shift+. in the file picker to see hidden folders such as `~/.claude`. +- **From ChatGPT, Claude or Gemini**: copy the prompt pre.dev gives you, paste it into that app, then paste its answer back. +- **Paste text or upload a file**: notes, rules, or preferences, one per line. + +You review what comes in before it is saved, and choose whether each entry applies to **All my projects** or **This project**. + +Cursor keeps its User Rules in its settings, not in a file. Copy them from Cursor and paste them into Import, or add them with `/remember` in the CLI. + +## Export to AGENTS.md + +On the Memory page, **Export** downloads a project's memory as `AGENTS.md`, for agents that read that file. In the CLI, `/memory export` writes it into a marked pre.dev block of `AGENTS.md` at the repository root and creates the file if it is missing. A new export replaces the block and leaves the rest of the file as it is. + +## Use it in Claude Code, Cursor, and other agents + +The pre.dev MCP server gives other coding agents your memory, on your own account: + +| Tool | What it does | +| --- | --- | +| [`memory_list`](/mcp/tools#memory_list) | What pre.dev remembers about you; with `project`, that project's memory and your team's | +| [`memory_search`](/mcp/tools#memory_search) | Keyword search across your memory | +| [`memory_remember`](/mcp/tools#memory_remember) | Saves one lasting preference, for all your projects or for one project | +| [`memory_forget`](/mcp/tools#memory_forget) | Removes one entry, archived so you can undo it in pre.dev | + +The server tells connected agents to read your memory at the start of a task and to save lasting preferences you state. The memory tools work on every plan, Free included, and use no credits. + +Add pre.dev to Claude Code: + +```bash +claude mcp add --transport http predev https://api.pre.dev/mcp +``` + +Claude Code asks you to sign in through your browser the first time. To add pre.dev to Claude Code, Codex, Cursor, and many other agents at once, run `npx -y @predotdev/mcp setup` (macOS, Node.js 22 or later). See [Connect the MCP server](/architect-agent/mcp-setup) for every option. + +What other agents save shows on the Memory page as **Saved from** that agent. + +## In the CLI + +After the first reply in a chat, the CLI shows one line such as `memory · 4 things remembered for this project · /memory`. When pre.dev saves something from the chat, a line such as `memory +1 · · /memory to undo` follows. + +| Command | Action | +| --- | --- | +| `/memory` | The list: this project's memory, yours, and your team's. The top rows add, import, and export. Press Enter on an entry to edit, pin, move, or delete it. The list also opens this folder's `CLAUDE.md` in your editor | +| `/memory add ` | Save an entry for this project. The same as `/remember ` | +| `/remember --me ` | Save an entry for all your projects. Inside an organization's project, it applies to that organization's projects | +| `/memory import` | Find what your other coding agents remember on this computer, review it, and import it | +| `/memory import ` | Import one file, such as `CLAUDE.md`, `AGENTS.md`, `.cursorrules`, or any `.md` or `.txt` file, after a review | +| `/memory search ` | Search this project's memory. `--all` searches your other projects too | +| `/memory export [--me]` | Write this project's memory into the marked pre.dev block of `AGENTS.md` at the repository root. `--me` adds your personal memory | +| `/memory pause`, `/memory resume` | Stop or restart learning from this chat | +| `/memory undo` | Take back the newest change from this chat. An imported file counts as one change | +| `/forget ` | Find an entry by its words and delete it after you confirm | + +## Limits + +| Limit | Value | +| --- | --- | +| Entry length | 1,000 characters | +| Title length | 80 characters | +| Entries | 200 each for a project's memory, your personal memory, and a team's memory. Adding one past that archives the entry unused the longest. Pinned and Required entries are kept | diff --git a/coding-agent/plans-and-credits.mdx b/coding-agent/plans-and-credits.mdx index cbd692d..1156558 100644 --- a/coding-agent/plans-and-credits.mdx +++ b/coding-agent/plans-and-credits.mdx @@ -76,6 +76,6 @@ For integrations, [GET /credits-balance](/architect-agent/api/credits-balance) r ## API and MCP access -The Architect API and the MCP server are included with the Premium, Pro, Team, and Enterprise plans. Plus accounts, and team workspaces without an active plan, can connect and generate 3 specifications as a trial; after that, generation returns `403`. Free accounts cannot authenticate to the Architect API or MCP. +The Architect API and the MCP server are included with the Premium, Pro, Team, and Enterprise plans. Plus accounts, and team workspaces without an active plan, can connect and generate 3 specifications as a trial; after that, generation returns `403`. Free accounts cannot authenticate to the Architect API. They can connect to MCP for the [memory tools](/mcp/tools#memory_list), which work on every plan and use no credits; the other MCP tools answer with a link to subscribe. Browser Agents REST and the AI Gateway accept every account, including Free. See [authentication](/api-reference/authentication) for how each interface checks keys and [errors and retries](/api-reference/errors) for access errors. diff --git a/coding-agent/workspace.mdx b/coding-agent/workspace.mdx index 2bfa224..7612971 100644 --- a/coding-agent/workspace.mdx +++ b/coding-agent/workspace.mdx @@ -19,7 +19,7 @@ The project workspace brings the agent conversation, code, and project artifacts Roadmap, Architecture, and Spec appear when their artifacts exist. A direct build can have working code before it has a roadmap or architecture graph. -The header also holds **Share** and **Publish**. [Publish](/coding-agent/building/publish) puts the app at its permanent address. +The header also holds **Memory**, **Share**, and **Publish**. **Memory** opens what pre.dev remembers for this project, for you, and for your team; see [Memory](/coding-agent/memory). [Publish](/coding-agent/building/publish) puts the app at its permanent address. ## Inspect and edit code @@ -69,6 +69,7 @@ Open `/integrations` or the composer's **+** menu. **Project setup** has the sam - **Agent Skills**: reusable instructions for the agent. - **MCP Servers**: additional tools and data sources. - **API Keys**: the project's environment variables. +- **Memory**: whether this project's chats use your personal and team memory, and whether pre.dev learns here. Only Project setup has this tab. See [Memory](/coding-agent/memory#controls). ## Sessions and sharing diff --git a/docs.json b/docs.json index 947e216..76ec230 100644 --- a/docs.json +++ b/docs.json @@ -386,7 +386,8 @@ "group": "Coding Agent", "pages": [ "coding-agent/overview", - "coding-agent/workspace" + "coding-agent/workspace", + "coding-agent/memory" ] }, { diff --git a/llms.txt b/llms.txt index eaaf792..44d2b10 100644 --- a/llms.txt +++ b/llms.txt @@ -31,6 +31,7 @@ - [Coding Agent overview](https://docs.pre.dev/coding-agent/overview.md): Build and maintain software in the web workspace or a local terminal. - [The workspace](https://docs.pre.dev/coding-agent/workspace.md): Agent chat, plans, code, preview, and project settings. +- [Memory](https://docs.pre.dev/coding-agent/memory.md): What pre.dev remembers for you, each project, and your team; how it learns, Undo, controls, import from Claude Code, Codex and Cursor, export to AGENTS.md, and the memory MCP tools. - [Create a project](https://docs.pre.dev/coding-agent/projects/creating-a-project.md): Start from a prompt or an existing repository. - [Import a repository](https://docs.pre.dev/coding-agent/projects/importing-repos.md): Build on an existing GitHub codebase and its conventions. - [GitHub integration](https://docs.pre.dev/coding-agent/projects/github-integration.md): Connect GitHub, import code, and review branch changes. @@ -119,7 +120,7 @@ - [Node.js SDK](https://docs.pre.dev/architect-agent/sdks/node.md): The predev-api TypeScript client. - [Python SDK](https://docs.pre.dev/architect-agent/sdks/python.md): The predev-api Python package. - [Connect the MCP server](https://docs.pre.dev/architect-agent/mcp-setup.md): One command adds every pre.dev tool, plus the user's own Chrome, to every coding agent; or connect the hosted server. -- [MCP tool reference](https://docs.pre.dev/mcp/tools.md): The eight tools, exact input names, results, and deprecated aliases. +- [MCP tool reference](https://docs.pre.dev/mcp/tools.md): The twelve tools, including memory, exact input names, results, and deprecated aliases. ## Labs diff --git a/mcp/tools.mdx b/mcp/tools.mdx index 18f24ea..990dd82 100644 --- a/mcp/tools.mdx +++ b/mcp/tools.mdx @@ -1,13 +1,13 @@ --- title: "MCP tool reference" -description: "The eight primary pre.dev tools, exact input names, result formats, and deprecated aliases." +description: "The twelve primary pre.dev tools, including memory, exact input names, result formats, and deprecated aliases." --- import McpUrl from "/snippets/mcp-url.mdx"; -Connect once to use specification generation, project plans and browser automation: run `npx -y @predotdev/mcp setup` to add the local server to every coding agent on your Mac, or connect the hosted server. [Setup instructions](/architect-agent/mcp-setup) cover both, with authentication and client configuration. +Connect once to use specification generation, project plans, browser automation and [memory](/coding-agent/memory): run `npx -y @predotdev/mcp setup` to add the local server to every coding agent on your Mac, or connect the hosted server. [Setup instructions](/architect-agent/mcp-setup) cover both, with authentication and client configuration. Call **`tools/list`** after initialization for the live input schemas. `GET /mcp/info` is a human-readable service inventory; it is not the protocol's tool-discovery method. @@ -23,8 +23,12 @@ Call **`tools/list`** after initialization for the live input schemas. `GET /mcp | `browser_agent` | Run browser tasks | Text summary or an async run ID | | `browser_agent_get` | Retrieve browser task results | JSON text and `structuredContent` | | `browser_agent_list` | Paginated browser history | Text and `structuredContent` | +| `memory_list` | What pre.dev remembers about the user, and with `project`, that project's memory and the team's | Text lines, each with an `[id]` | +| `memory_search` | Keyword search across the user's memory | Text lines, each with an `[id]` and where it lives | +| `memory_remember` | Save one lasting preference | Text with the saved entry's `[id]` | +| `memory_forget` | Remove one entry by id | Text confirmation | -Generation and browser execution consume credits. Retrieval and listing do not launch new work. The server marks browser execution as potentially destructive because a task can click, submit forms, or change data on external sites. +Generation and browser execution consume credits. Retrieval and listing do not launch new work. The memory tools use no credits and work on every plan, Free included. The server marks browser execution as potentially destructive because a task can click, submit forms, or change data on external sites. The local pre.dev MCP server (`npx -y @predotdev/mcp setup`) lists these tools, passed through on your key, alongside 17 `chrome_*` tools that drive the Chrome on your own computer, with your profiles and logins; see [Browser Agents Local](/browser-agents/local#tools). The `browser_agent` tools always run tasks on pre.dev's cloud browsers. @@ -205,6 +209,49 @@ Save the ID from the returned text, then call `browser_agent_get` every few seco The structured result contains `total` and `batches`. Each batch has `id`, `status`, `total`, `completed`, and `totalCreditsUsed`. Unlike REST listing, this tool does **not** return `hasMore`; compare your offset and page length with `total`. +## memory_list + +```json +{ "project": "Billing dashboard" } +``` + +`project` is optional: a pre.dev project name or id, up to 200 characters. A name matches exactly first, then in part; when more than one project matches, the result lists them and asks for the id. + +Without `project`, the result is your memory for all your projects, then the projects that have their own memory, with how many entries each holds. With `project`, it is exactly what pre.dev uses in a chat there: your team's entries (Required ones marked `[REQUIRED]`), the project's memory, then yours. Required team entries win, and project or team memory wins over personal memory when they disagree. + +Each entry is one text line that starts with its 24-character id, for example `- [65f0c3a1b2c4d5e6f7a8b9c0] Use pnpm, not npm`. A long list ends with how many entries were left out; find those with `memory_search`. The server's instructions ask agents to call `memory_list` at the start of a task and follow it. + +## memory_search + +```json +{ "query": "package manager" } +``` + +`query` is required, 1 to 500 characters of keywords. It searches your memory, the memory of your projects, and your team's, and returns up to 20 matching lines. Each line has the entry's `[id]` and where it lives: `(the user)`, `(project )`, `(team)`, or `(team, REQUIRED)`. + +## memory_remember + +```json +{ "text": "Use pnpm, not npm.", "project": "Billing dashboard" } +``` + +| Parameter | Required | Type | Meaning | +| --- | --- | --- | --- | +| `text` | Yes | String, 1 to 1,000 characters | One lasting preference or fact, in one or two short sentences | +| `project` | No | String | A pre.dev project name or id, to save it to that project instead of your memory for all your projects | + +Without `project`, the entry goes to your memory for all your projects; signed in to a team, it applies to that team's projects only. The result names where it was saved and the new entry's `[id]`. Text that is already in memory is not saved twice, and passwords, API keys, tokens, and private keys are refused. Use it for preferences the user states, not for notes about a single task. + +## memory_forget + +```json +{ "id": "65f0c3a1b2c4d5e6f7a8b9c0" } +``` + +`id` is required: an entry id from `memory_list` or `memory_search`, with or without its brackets. The entry is archived, not deleted, so the user can restore it from **Archived** on the Memory page. + +Memory belongs to one person, so the memory tools act as whoever signed in or owns the key. A key shared by a whole team gets an error result that says so. Refusals, such as a secret or an unknown project, return `isError: true` with the reason in text. See [Memory](/coding-agent/memory) for what each kind of memory is and who can see it. + ## Notifications and errors The server sends `notifications/message` with `params: { level, logger, data }`. Browser messages contain a task index and event details; large screenshot and DOM values can be elided. Specification messages report phases such as `start`, `generating`, and `packaging`. diff --git a/overview.mdx b/overview.mdx index 7b20e4b..174faa0 100644 --- a/overview.mdx +++ b/overview.mdx @@ -19,7 +19,7 @@ pre.dev is the Long Horizon Coding Agent: it builds software and exposes the pie Five products and how to reach them. Coding Agent through the web workspace and the CLI, returning pull requests and published apps. Architect and Browser Agents through the API and MCP, returning specs and task results. AI Gateway through the API, returning model responses. Payments and sign-in built into apps made in the web workspace. Five products and how to reach them. Coding Agent through the web workspace and the CLI, returning pull requests and published apps. Architect and Browser Agents through the API and MCP, returning specs and task results. AI Gateway through the API, returning model responses. Payments and sign-in built into apps made in the web workspace. -The Coding Agent works in the web workspace and the CLI. Architect and Browser Agents are available over REST, the Node and Python SDKs, and MCP; the AI Gateway over REST. Payments and sign-in come built into apps you create in the web workspace. +The Coding Agent works in the web workspace and the CLI, and its [memory](/coding-agent/memory) of how you work and what matters in each project also reaches Claude Code, Cursor, and other agents through MCP. Architect and Browser Agents are available over REST, the Node and Python SDKs, and MCP; the AI Gateway over REST. Payments and sign-in come built into apps you create in the web workspace. ## Choose your interface diff --git a/skill.md b/skill.md index 80c3cb6..94daa6f 100644 --- a/skill.md +++ b/skill.md @@ -26,11 +26,12 @@ pre.dev is the Long Horizon Coding Agent: it plans, builds, verifies and ships s | Call a model (AI Gateway): chat, embeddings, images, video, speech | `https://api.pre.dev/v1` with an OpenAI or Anthropic SDK | | Plan software before building it | `POST https://api.pre.dev/fast-spec` or `/deep-spec`, or the `fast_spec` MCP tool | | Give an agent pre.dev tools, plus the user's own Chrome, profiles, and logins | The pre.dev MCP server: `npx -y @predotdev/mcp setup` signs in to pre.dev and adds it to every coding agent on the Mac (run it with a 10 minute timeout and tell the user what to click). Without Node.js, the hosted server `https://api.pre.dev/mcp` has every tool except the Chrome ones. See https://docs.pre.dev/browser-agents/local.md | +| Follow what the user told pre.dev to remember, or save a lasting preference they state | The MCP tools `memory_list` (call it at the start of a task), `memory_search`, `memory_remember`, and `memory_forget`. See https://docs.pre.dev/coding-agent/memory.md | | Take payments in an app built on pre.dev | The Stripe SDK, pointed at `STRIPE_API_HOST` | | Build or change code | The coding agent, on the web or in the CLI; `predev run` with `PREDEV_API_KEY` runs one task unattended | | Search these docs | Docs MCP server `https://docs.pre.dev/mcp` (no key) | -Browser tasks and AI calls work on every plan, Free included: a Free personal account can spend 2 credits on browser tasks, and a Free workspace 5 credits on AI calls, before it needs a plan. Specifications and the MCP server need Premium, Pro, Team or Enterprise; Plus and team workspaces without a plan get 3 trial specifications. +Browser tasks and AI calls work on every plan, Free included: a Free personal account can spend 2 credits on browser tasks, and a Free workspace 5 credits on AI calls, before it needs a plan. Specifications and the MCP server need Premium, Pro, Team or Enterprise; Plus and team workspaces without a plan get 3 trial specifications. The MCP memory tools work on every plan, Free included. ## Recipes diff --git a/snippets/mcp-url.mdx b/snippets/mcp-url.mdx index afc574e..85131bc 100644 --- a/snippets/mcp-url.mdx +++ b/snippets/mcp-url.mdx @@ -1 +1 @@ -The hosted pre.dev MCP server is **`https://api.pre.dev/mcp`**, over Streamable HTTP. It runs pre.dev's specification and browser tools. Searching this documentation is a separate MCP server, `https://docs.pre.dev/mcp`, which needs no key. +The hosted pre.dev MCP server is **`https://api.pre.dev/mcp`**, over Streamable HTTP. It runs pre.dev's specification, browser, and memory tools. Searching this documentation is a separate MCP server, `https://docs.pre.dev/mcp`, which needs no key.