Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Linear 7 min read Case study mediumAdept

How we built Linear Agent

Linear Agent is constrained by boundaries rather than scripted paths: a fundamentals-focused system prompt, tools designed so invalid actions are impractical, and an explicit model of Linear's product concepts. Because the agent has many shallow product tools rather than a few deep ones like a coding agent, capabilities are packaged as "system skills" (metadata, prompt fragment, tools) that are preloaded from context or loaded on demand to keep context small. Linear deliberately avoided exposing the SDK, CLI or GraphQL API, trading breadth for predictability. A custom harness on a durable workflow engine supports dynamic tool injection that preserves the provider prefix cache, contextual tool-call approval, and suspending a parent agent while sub-agents run asynchronously.

Related posts

  • Harness, Scaffold, and the AI Agent Terms Worth Getting Right

    Hugging Face easyNovice

    A glossary of AI agent terms that are often conflated. The model is a stateless LLM. Scaffolding is the behavior-defining layer around it: system prompt, tool descriptions, output parsing and context management. The harness is the execution loop that calls the model, runs tool calls and decides when to stop, and an agent is model plus harness. Further entries cover context engineering, policy, tool use, skills and sub-agents, plus RL training terms (environment, trainer, rollout, reward and rubrics), with pointers to TRL's GRPOTrainer, OpenEnv and Verifiers.

  • Our approach to building the Agent Interaction SDK

    Linear mediumAdept

    Linear integrates AI agents into its workspace as first-class users through a new OAuth actor mode (actor=app), which creates a dedicated agent user with its own token, developer-requested scopes and admin-controlled team access. Two opt-in scopes, app:assignable and app:mentionable, let developers choose how interactive an agent is without breaking existing apps. Raw notification webhooks left developers to reconstruct context, so they were replaced by "agent sessions" that deliver structured context and track lifecycle state. A delegation model keeps a human assignee accountable while an agent acts on the issue.

  • Context Engineering with Deep Agents: How To Remember Without Keeping Everything In Context

    LangChain mediumAdept

    Long-running agents suffer "context rot" as tool output, history and instructions accumulate, so Deep Agents moves context out of the active window via middleware hooks in the agent loop rather than deleting it. FilesystemMiddleware offloads tool results over ~20,000 tokens (and user messages over 50,000) to files and shows only a preview. SummarizationMiddleware condenses older messages at 85% of the context window while keeping recent ones verbatim and writing the originals to recoverable files. SkillsMiddleware uses progressive disclosure to load task instructions only when relevant, subagents isolate noisy work in separate contexts, and MemoryMiddleware persists learned preferences in a plain markdown file that survives switching model providers.

  • You Should Write An Agent

    Fly.io mediumAdept

    An LLM agent is just a loop around a stateless chat API: keep a list of messages, replay it on every call, and when the model emits a function_call, run the tool and append its output. A few dozen lines of Python against the OpenAI Responses API produce a working tool-using agent that decides on its own to ping multiple Google hosts. MCP is barely a technology, just a plugin interface for agents you don't control, and context engineering is a real, legible programming problem of budgeting tokens across sub-agents, tools and summaries. Agent design leaves open problems around nondeterminism, grounding, inter-agent interchange formats and cost, and each design iteration takes about 30 minutes, so engineers should build one themselves.

  • Building Long-Running Agents with ScaleDown and Deep Agents

    LangChain mediumAdept

    The langchain-scaledown integration offloads context-management decisions in long-running agents (summarizing history, compressing tool results, extracting fields, classifying state) from frontier LLMs to ScaleDown's small, task-specific constrained decoding models, which ScaleDown reports are far faster and cheaper on these narrow tasks. It ships middleware for LangChain and Deep Agents. Summarization replaces history past a trigger fraction. Tool compression adds a compression_query argument that cut a docs page by about 90%. Extraction copies exact values from user messages into agent state. A custom Classify-based circuit breaker can stop looping or drifting runs. ScaleDown calls can also route through the LangSmith LLM Gateway for tracing and spend limits, while open-ended generation stays on a general-purpose model.

The quest for software engineering knowledge.

Look:
Layout: