> ## Documentation Index
> Fetch the complete documentation index at: https://docs.everestagi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Everest SDK

> Compress completed tool output on your server before it reaches the agent.

Call this on your server after a tool finishes, before adding its output to the agent's context.

```ts theme={null}
// Install: npm install ./everestagi-sdk-0.1.2.tgz
// Keep EVEREST_API_KEY on the server, out of client code and tool environments.
import { EverestClient } from '@everestagi/sdk'

const everest = new EverestClient({ apiKey: process.env.EVEREST_API_KEY! })

export async function compressOutput(output: string, goal: string) {
  const result = await everest.compress({ output, goal })
  return result.applied ? result.text : output
}
```

`output` is the completed tool output; `goal` is the agent's current task. Skips, timeouts and API failures keep the original text. The SDK never runs or reruns tools.

Supports Node.js 18+ and Bun 1.3.x, with ESM and CommonJS. You can optionally pass `focus`, `command` and `signal` to `compress`, or set `timeoutMs` when creating the client.

Using Everest directly with Codex instead of integrating a product? See the [CLI guide](/cli).
