@amends-dev/harness
Contract0.2.0
Runs an agent, such as opencode or one in your own process over an Effect AI language model, and streams every agent's turns in one format.
Packages
Run any agent in any sandbox from your own Effect program. Contracts say what every implementation agrees on, and each adapter implements one over one system.
bun add @amends-dev/harness @amends-dev/sandboxWhat every implementation agrees on. Depend on a contract, and choose the adapter behind it when the program runs.
Contract0.2.0
Runs an agent, such as opencode or one in your own process over an Effect AI language model, and streams every agent's turns in one format.
Contract0.2.1
Sandboxes that agents work in: the contract every sandbox provider implements, with Effect's own file system and processes inside, and the conformance suites each provider runs.
Contract0.2.0
Channels that bring external conversations in: the contract every channel transport implements, receiving what a system sends and replying in its conversations.
Contract0.2.0
Typed append-only logs over host storage: positions, commits that span logs, idempotent appends, paged reads, and live tails, with a memory implementation and the suites every adapter runs.
Contract0.2.1
Tools from MCP servers and HTTP APIs in one shape, assembled into the toolkit an agent calls, with search and code mode to present many tools as few, and the conformance suites each source runs.
Each implements one contract over one system, with only that system's dependencies.
Implements codemode0.2.0
opencode's code mode as the runtime of @amends-dev/toolkit's code mode: the code a model writes runs on an interpreter that reaches nothing but the tools it is given.
Implements harness0.2.0
An agent in your own process for the @amends-dev/harness contract: a loop over an Effect AI language model, with tools for the files and the shell of a sandbox.
Implements harness0.2.0
Claude Agent SDK behind the amends sandbox bridge.
Implements harness0.2.0
Codex app-server as an agent for the amends harness contract
Implements harness0.2.0
opencode as an agent for the @amends-dev/harness contract: opencode works in a sandbox behind its bridge, which the agent's template installs there.
Implements sandbox0.2.0
Sandboxes on Daytona for the @amends-dev/sandbox contract: a Linux machine of its own for each sandbox, made from a snapshot of its template's version.
Implements sandbox0.2.0
Sandboxes on E2B for the @amends-dev/sandbox contract.
Implements sandbox0.2.0
Sandboxes as directories on this machine, for the @amends-dev/sandbox contract: for development, tests, and agents you would trust on this machine anyway.
Implements sandbox0.2.0
Sandboxes on Vercel for the @amends-dev/sandbox contract.
Quick start
From an adapter: amends's own agent over an Effect AI model, or opencode in a sandbox.
Every agent gets the same sessions and turns, streamed in one format.
Release a session as JSON and resume it later, on any host and on any agent.
import { AmendsAgent, Models } from "@amends-dev/harness-amends"
import { Agent, Harness } from "@amends-dev/harness"
import { Config, Effect, Layer } from "effect"
import { FetchHttpClient } from "effect/http"
const program = Effect.gen(function* () {
const agent = yield* AmendsAgent.make({
model: {
provider: "anthropic",
model: "claude-sonnet-5-5",
protocol: "anthropic-messages",
url: "https://api.anthropic.com/v1",
apiKey: yield* Config.Redacted("ANTHROPIC_API_KEY"),
contextWindow: 200_000
}
})
const harness = Harness.make(agent)
const session = yield* harness.createSession({ id: Agent.SessionId.make("hello") })
const answer = yield* session.generate({ prompt: "Say hello in one word." })
return answer.text
}).pipe(Effect.provide(Models.layer.pipe(Layer.provide(FetchHttpClient.layer))))An integration connects amends to another system. Each kind has a contract, and each implementation is a package of its own.
Implement the harness contract, and every host runs your agent's turns in the same stream.
Writing an adapter →Implement the sandbox contract, then run its conformance suites against your provider.
Writing a provider →Implement the channel transport contract to bring one system's conversations in.
Writing a transport →