Slash command /offload compacts context window
The /offload command (alias /compact) frees up context window space by offloading messages to storage with a summary placeholder. The agent can retrieve the full history from the offloaded file if needed.
Slash command /context shows context-window usage report
The /context command opens a color-coded context-window usage report showing the model's context limit, used tokens, remaining capacity, and a breakdown between conversation and system prompt plus tools when available.
Slash command /tokens displays token usage breakdown
The /tokens command displays current context window token usage breakdown as a text summary in the conversation transcript.
Context usage includes provider-reported totals
Provider-reported totals in context-window reports remain distinct from local conversation estimates. When a provider total is unavailable, the report labels the conversation count as an estimate and marks the total usage as unavailable.
Context engineering definition and purpose
Context engineering is the practice of building and optimizing context to improve agent performance and capabilities. Context is the information an agent relies on to act, such as system instructions, tool definitions, and reference material. Agents behave inconsistently in production when their context is poorly managed.
Skill definition and structure
A skill is a versioned repo in the Context Hub that packages a reusable capability an agent can invoke. Skill repos usually contain a SKILL.md file in the root directory for instructions and usage guidance, and optional supporting files such as references, templates, and schemas. Examples include email formatting, code review, and web research.
Agent definition and structure
An agent is an AI system that completes tasks end to end using tools, skills, and subagents. An agent repo packages its configuration, including high-level instructions, linked skills and subagents, and tool configuration. Agent repos usually contain an AGENTS.md file for system prompt and operating instructions, and optional files such as tools.json and linked agents/* or skills/* entries. Examples include an email assistant, coding copilot, or customer support agent.
Skills vs. agents - when to use each
Skills are reusable context modules best used for reusable instructions, policies, or examples shared across agents. Agent repos are top-level bundles that define how an agent should operate, used for one agent's operating instructions, tools, and linked dependencies.
Linked repos in Context Hub
Context Hub commits support three entry types in files: file (inline file content), agent (link to another agent repo), and skill (link to another skill repo). When a linked agent or skill repo gets a new commit, LangSmith propagates that update to parent repos that reference it.
Context Hub vs. store backend
Context in LangSmith can be managed by two different backends: the Context Hub and a store backend. The Context Hub is an agent's long-term context store that tracks every change as a commit and supports versioning, sharing, and continuous improvement. A store backend is built for runtime state and holds information an agent accumulates while running, such as memories, conversation history, user preferences, learned facts, and other data that evolves per session or per user.
Context Hub versioning and commit management
Every change to a repo in the Context Hub creates a new commit. Commits are immutable, browsable, and comparable. You can see exactly what changed between two versions of an agent, revert to any prior commit if a change regresses behavior, tag important commits for easy reference, and promote a commit to an environment like Staging or Production so downstream agents pull a stable version rather than the latest edit.
Context Hub sharing and permissions
Every repo in the Context Hub lives in a workspace, and access depends on workspace permissions plus repo visibility. Private repos are visible only inside the workspace. Public repos can be discovered and pulled by anyone. Creating commits, adding tags, and promoting environments requires update access in the workspace.