Source: https://anchor-sdk.dev/
Package: anchor-ai-sdk@0.1.7

[OPEN SOURCE · EARLY ALPHA](https://github.com/hrithikkoduri/anchor-ai-sdk/releases)

# A loop is easy.  
The rest is Anchor.

Your strategy. Your tools. Anchor SDK handles the infrastructure between “do this” and actually done. Context, recovery, and sandboxed work in one TypeScript harness.

[Build your agent](https://anchor-sdk.dev/docs.html#quickstart) [Explore the harness](https://anchor-sdk.dev/#harness)

$`npm install anchor-ai-sdk`

TypeScript-native MIT licensed Your model. Your machine.

ANCHOR RUNTIMErun\_08f2

TASK IN

Fix the retry logic. Report the test results.

workspace / main

THE AGENT LOOP

Reason

Act

Observe

↳

repeat, with context

Memory Guardrails Revival

EVENT STREAMILLUSTRATIVE RUN

00:01read\_filesrc/client.ts

00:03edit\_filedeadline fixed

00:05run\_tests42 passedpost-run a83f2d1

Not just an answer. An evidence trail.

THE MODEL THINKS. THE HARNESS HOLDS.

ONE CONTRACT.  
**YOUR STACK.**

OpenAI-compatible models

+

![](/assets/heyo-CJ5BkoQS.png)Heyo Computer

![](data:image/svg+xml,%3csvg%20width='32'%20height='30'%20viewBox='0%200%2032%2030'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cmetadata%3eE2B%20size-specific%20symbol%20artwork%3c/metadata%3e%3cpath%20d='M24.1279%207.75171V11.7029H12.3447C12.0571%2011.703%2011.8232%2011.9367%2011.8232%2012.2244V12.5027C11.8232%2012.7903%2012.0571%2013.024%2012.3447%2013.0242H24.1279V16.9753H12.3447C12.0571%2016.9755%2011.8232%2017.2092%2011.8232%2017.4968V17.7751C11.8233%2018.0627%2012.0572%2018.2955%2012.3447%2018.2957H24.1279V22.2478H10.4717C9.03605%2022.2475%207.87209%2021.0829%207.87207%2019.6472V10.3513C7.87229%208.91577%209.03617%207.75206%2010.4717%207.75171H24.1279Z'%20fill='black'/%3e%3c/svg%3e)E2B

![](data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20version='1.1'%20viewBox='0%200%20340%20268'%3e%3c!--%20Official%20Docker%20black%20mark,%20from%20Docker-Logos-1.zip.%20--%3e%3cdefs%3e%3cstyle%3e.st0{fill:none}.st1{fill:%230f121b}.st2{clip-path:url(%23clippath)}%3c/style%3e%3cclipPath%20id='clippath'%3e%3crect%20class='st0'%20width='339.5'%20height='268'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20class='st2'%3e%3cpath%20class='st1'%20d='M334,110.1c-8.3-5.6-30.2-8-46.1-3.7-.9-15.8-9-29.2-24-40.8l-5.5-3.7-3.7,5.6c-7.2,11-10.3,25.7-9.2,39,.8,8.2,3.7,17.4,9.2,24.1-20.7,12-39.8,9.3-124.3,9.3H0c-.4,19.1,2.7,55.8,26,85.6,2.6,3.3,5.4,6.5,8.5,9.6,19,19,47.6,32.9,90.5,33,65.4,0,121.4-35.3,155.5-120.8,11.2.2,40.8,2,55.3-26,.4-.5,3.7-7.4,3.7-7.4l-5.5-3.7h0ZM85.2,92.7h-36.7v36.7h36.7v-36.7ZM132.6,92.7h-36.7v36.7h36.7v-36.7ZM179.9,92.7h-36.7v36.7h36.7v-36.7ZM227.3,92.7h-36.7v36.7h36.7v-36.7ZM37.8,92.7H1.1v36.7h36.7v-36.7ZM85.2,46.3h-36.7v36.7h36.7v-36.7ZM132.6,46.3h-36.7v36.7h36.7v-36.7ZM179.9,46.3h-36.7v36.7h36.7v-36.7ZM179.9,0h-36.7v36.7h36.7V0Z'/%3e%3c/g%3e%3c/svg%3e)Docker

Local

[Bring your own](https://anchor-sdk.dev/docs.html#contract)

+ 01 / THE HARNESS

## Built for the turns  
that don’t go to plan.

Models can reason.  
Give yours the system to keep going.

### A context window is not a memory.

Agents can keep notes on disk while older conversation is summarized. Built-in tools attempt to spill oversized output to sandbox files for later reads.

Durable notesContext compactionRecoverable spill

[Under the hood](https://anchor-sdk.dev/docs.html#memory)

.anchor/notes.mdILLUSTRATION

01

\# Current task

Fix retry behavior in the HTTP client.

02

\## What I know

The timeout resets on every attempt.

03

\## Next move

Patch the deadline. Test the slow path.

context compacted → notes preserved

↳Persistence primitives, with storage you control.

[Queue or interjectKeep working, or switch at a safe turn boundary.](https://anchor-sdk.dev/docs.html#messages)[Background commandsOpt-in Heyo jobs. Engine-delivered results.](https://anchor-sdk.dev/docs.html#background)[Events and trace sinksAttach live events or a stored journal.](https://anchor-sdk.dev/docs.html#traces)

+ ONE MACHINE INTERFACE

## Your sandbox.  
Not another integration to rebuild.

Configure an E2B template, a Heyo image, or a Docker image. Anchor adapts the machine lifecycle and execution surface so the agent and its built-in tools use the same `Sandbox` interface.

createstartexeccheckpoint

A shared conformance suite tests the contract. Provider accounts, toolchains, and optional capabilities still differ. The layer can also be used without an agent.

[Configure your sandbox](https://anchor-sdk.dev/docs.html#machine)

heyo-provider.mjsJAVASCRIPT

```
import { heyo } from "anchor-ai-sdk/sandbox/heyo";

// Configuration fragment. requiredEnv validates host configuration.
// Complete runnable setup is in the docs.
const provider = heyo({
  token: requiredEnv("HEYO_TOKEN"),
  server: requiredEnv("HEYO_SERVER"),
  namespace: requiredEnv("HEYO_NAMESPACE"),
  image: requiredEnv("HEYO_IMAGE"),
  imageKind: "artifact",
  imageStore: requiredEnv("HEYO_IMAGE_STORE"),
  sizeClass: "small",
  diskSizeGb: 10,
});

const sandbox = provider.create({ repoUrl, ref: "main" });
// Start it, then pass sandbox to runAgent.
```

+ 02 / COMPLETED EVAL RECORDS

## Nine of ten.  
The record is open.

Anchor vs. mini-swe-agent.  
10 SWE-bench Lite tasks. Parasail GLM 5.3.  
9 resolved for each arm. Different failure paths.

[Inspect the benchmark](https://anchor-sdk.dev/benchmarks.html)

RESOLVED**9/10**both harnesses

RESOLVED / 10 TASKSCOMPLETED PARASAIL RECORDS

![](data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2096%2096'%20fill='none'%20role='img'%20aria-label='Anchor'%3e%3ctitle%3eAnchor%3c/title%3e%3cg%20stroke='%23F2592C'%20stroke-width='9'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3ccircle%20cx='48'%20cy='15'%20r='7.5'%20/%3e%3cpath%20d='M48%2022.5V78'%20/%3e%3cpath%20d='M33%2035h30'%20/%3e%3cpath%20d='M21%2055c2%2018%2013%2027%2027%2027s25-9%2027-27'%20/%3e%3cpath%20d='M21%2055l-4.5-5.5'%20/%3e%3cpath%20d='M75%2055l4.5-5.5'%20/%3e%3c/g%3e%3c/svg%3e)Anchor**9/10**

mini-swe-agent**9/10**

A selected sample, with different budgets. Mini’s remaining task has a recorded patch-extraction failure.  
Anchor records $4.3162; mini usage is not reported. No cost comparison is claimed for this round.

+ 03 / YOUR AGENT. NOT OUR OPINIONS.

## Small pieces.  
A harness of your own.

Phases shape the approach. Tools do the work. Compose them into an agent; bring the model and runtime. No custom agent loop to maintain.

1.  [01 Phases → strategy](https://anchor-sdk.dev/docs.html#phases)
2.  [02 Tools → agent](https://anchor-sdk.dev/docs.html#custom-agents)
3.  [03 Agent → complete harness](https://anchor-sdk.dev/docs.html#assembled)

[Build from primitives](https://anchor-sdk.dev/docs.html#primitives)

MODEL AND SANDBOX CONFIGURATION STAY IN YOUR APP.

[Why Anchor is built this way](https://anchor-sdk.dev/philosophy.html)

agent.mjsJAVASCRIPT

```
import { readFileTool, searchTool, runAgent } from "anchor-ai-sdk";

export const phases = [
  { id: "inspect", goal: "Read the relevant code." },
  { id: "respond", goal: "Explain findings with file references." },
];

export const strategy = {
  name: "review",
  phases,
  requiresSandbox: true,
  systemPrompt: () => phases
    .map(({ id, goal }) => `${id}: ${goal}`).join("\n"),
};

export const agent = {
  name: "reviewer", strategy,
  tools: [searchTool, readFileTool],
};

// Supply your llm and a started sandbox. Full setup is in the docs.
const result = await runAgent(
  { task: "Explain the retry behavior" },
  { llm, sandbox, agent },
);
```

[Add state, controls, and traces](https://anchor-sdk.dev/docs.html#assembled)

+ A FEW GOOD QUESTIONS

## Small surface.  
Strong foundations.

### 

### 

### 

### 

###
