An open-source, faster Devin alternative
TypeScript
docs: sessions pin a deployment; memory placed among the concepts
Igor Zalutski94e48caa82c6
diff --git a/docs/agents/mental-model.mdx b/docs/agents/mental-model.mdxindex a82a7f10..25a58a9d 100644--- a/docs/agents/mental-model.mdx+++ b/docs/agents/mental-model.mdx@@ -105,6 +105,10 @@ Every session remains pinned to the immutable deployment it started with. Anew development sync or production deployment affects new sessions, not codealready running inside an existing session.+[Memory](/agents/memory) is what outlives a session: project-scoped documents+that the agent function reads at render with `useMemory`, that the model saves+through memory tools, and that the owner reads, edits and exports.+## Capabilities are selected, not executed, during renderUse the narrowest capability that fits the work:@@ -115,6 +119,7 @@ Use the narrowest capability that fits the work:| `useMcpServer(server)` | A collection of tools advertised by a remote MCP server || `useSubagent(agent)` | Another project agent available for delegation || A skill under `skills/` | Reusable instructions and supporting resources |+| `useMemory(memory)` | The bound documents' text and the tools that save to them |The model decides whether to request an available tool. The harness remainsresponsible for validating the request, executing it, and recording thediff --git a/docs/agents/overview.mdx b/docs/agents/overview.mdxindex 20fef57d..4b03cd7d 100644--- a/docs/agents/overview.mdx+++ b/docs/agents/overview.mdx@@ -23,7 +23,9 @@ export default function Agent() {The exported function is a reactive description of the agent. OpenComputerrenders it for the current input and uses its return value as instructions forthe managed agent loop. Hooks attach the model, tools, MCP servers, and-subagents needed for that render.+subagents needed for that render. [Memory](/agents/memory) gives an agent+notes that outlive a session: project-scoped documents read at render, saved+by the model through memory tools, and owned by you.<CardGroup cols={2}><Card title="Projects" icon="folder" href="/agents/projects">@@ -72,7 +74,7 @@ URL, and syncs every configured agent to `development`.- TypeScript projects containing one or more agents- reactive instructions, model selection, tools, subagents, MCP- servers, input metadata, and session data reads+ servers, input metadata, session data reads, and document memory- cloud development with file watching and automatic synchronization- dashboard and CLI playground sessions- immutable deployments promoted through aliases such as `production`diff --git a/docs/agents/sessions.mdx b/docs/agents/sessions.mdxindex 0eca7c0d..d754c9e6 100644--- a/docs/agents/sessions.mdx+++ b/docs/agents/sessions.mdx@@ -5,7 +5,15 @@ description: "Understand durable conversations and multi-turn agent work"A session is a durable conversation with a deployed agent. Each turn appendsinput and streamed runtime events to the session, allowing clients to resume a-conversation without rebuilding its history locally.+conversation without rebuilding its history locally. The events are listed on+[Session events](/agents/events).++A session pins the deployment it was created on. Advancing Development or+promoting to Production changes which deployment new sessions get; turns sent+to an existing session keep running the code it started with, including its+declared tools and memory resources. To run new code, start a new session.+Memory documents are not pinned: they belong to the project and environment,+so a new session bound to the same document reads what the old one saved.## Agent playground@@ -82,6 +90,16 @@ npx --package @opencomputer/cli opencomputer session "Draft a response"Use `--keep` on supported commands when the session should remain active afterthe command exits.+## From an application++Applications create sessions with the [management API](/agents/api): `POST+/api/managed-agents/sessions` with an API key, then turns and the event log+under that session. `startSessionOnDocument` in the+[TypeScript SDK](/reference/typescript-sdk#serverless-agents-helpers) creates+a memory document and a session bound to it in one call. In the browser, the+[`useAgent`](/agents/react) hook attaches to a session your server created+and renders its messages.+## Input sourcesInside an agent, `useInput().source` identifies how the current work arrived.