# Edgar the On-Call AI Software Engineer

> Source: <https://github.com/kana-ai/edgar>
> Published: 2026-12-01 21:39:09+00:00

**Key takeaway:** EDGAR persists each workflow stage to Postgres before the next begins, so a run resumes after a crash or restart, and it never merges its own pull request — it waits up to 14 days for a person to merge or close it.

EDGAR reads a card from your tracker, works out what to change, and opens a pull request that passed your checks and a code review. A person merges it. When EDGAR is stuck, it stops and asks a person one clear question. It runs on your own server, works with the coding agent you already use (Claude Code, the Claude Agent SDK or Codex), and keeps everything in one Postgres database.

**EDGAR is early: get it from [Releases](https://github.com/kana-ai/edgar/releases).** The engine, the API, the command line, the sandbox, the card-to-pull-request workflow and the extensions work today. See [Status](#status).

A card goes through these stages. Each agent stage is its own session, in its own sandbox. Each step is saved in Postgres before the next one starts, so a run survives a crash or a restart and goes on from where it stopped.

| Stage | What EDGAR does | 
|---|---|
| **Triage** | Reads the card and decides whether the work is clear and in scope. | 
| **Plan** | Finds the root cause when the project asks for it, then writes the plan for the change. | 
| **Checkout** | Makes a fresh checkout of the repository for the run. | 
| **Implement** | Makes the change on its own branch, `edgar/<run id>` . | 
| **Verify** | Runs your project's checks. | 
| **Review** | A reviewer reads the change, a second agent tests each finding, and a fixer applies the real ones. | 
| **Pull request** | Lists what no check proved, then pushes the branch and opens a draft pull request. | 
| **CI** | Waits for your CI, fixes a check that fails, then marks the pull request ready. | 
| **Merge and deploy** | Waits up to 14 days for a person to merge or close the pull request; EDGAR never merges. It can then wait for the deploy. | 

When EDGAR is stuck at any stage, it stops and asks a person. [Workflows](https://github.com/kana-ai/edgar/blob/main/docs/concepts/workflows.md) lists every step.

`edgar init` writes a workspace that you can read and change. You keep it in Git, except for `.env`.

```
my-workspace/
├── edgar.toml                       # The workspace: its name, its projects, the database and the server
├── edgar.config.ts                  # The extensions you mount, such as GitHub and Linear
├── projects/<name>/edgar.toml       # One project: its repositories, where its work comes from, its checks
├── agents/<name>/AGENT.md           # Instructions for an agent, in plain words
├── skills/workspace-rules/SKILL.md  # A skill any agent can load
├── README.md                        # What this workspace is and how to start it
├── .gitignore                       # Keeps .env out of Git
├── .env                             # Your tokens, written with mode 600; never committed
└── .env.example                     # The same variable names with no values; safe to commit
```

You mount extensions in TypeScript. EDGAR checks every option when it loads the file, and so does your editor once you [install the SDK from npm](https://github.com/kana-ai/edgar/blob/main/docs/operating/releasing.md#use-the-sdk-from-npm):

``` js
import { defineConfig } from '@edgar/core';
import { claudeCode } from '@edgar/extension-claude-code';
import { github } from '@edgar/extension-github';
import { linear } from '@edgar/extension-linear';

export default defineConfig({
  extensions: [github({ repos: ['your-org/api'] }), linear({ teams: ['ENG'] }), claudeCode()],
});
```

A project names its repository, where its work comes from, and the checks a change must pass:

```
[project]
name = "api"

[[repositories]]
url = "https://github.com/your-org/api"

[[feeders]]
mount = "linear"
workflow = "card.to-pr"

[[checks]]
name = "unit-tests"
run = "bun test"
```

The [configuration reference](https://github.com/kana-ai/edgar/blob/main/docs/reference/configuration.md) lists every key.

- **Card** : a ticket or an issue in your tracker, such as Linear or GitHub Issues. Scanner findings and log incidents become cards too.
- **Run** : one card going through a workflow. Every step of a run is saved.
- **Workflow** : the list of steps EDGAR takes for a card.`card.to-pr` is the main one.
- **Extension** : a TypeScript package that connects EDGAR to something outside it: a tracker, a code host, a chat, a log source or a coding agent.
- **Runtime** : the coding agent that does an agent step: Claude Code, the Claude Agent SDK or Codex.
- **Workspace** : the folder that holds your settings.**Project** : one entry in it, with its repositories and checks.

You need [Bun](https://bun.sh) 1.4.5, Git and Docker. On Linux, agent sessions run in a systemd sandbox.

Open this repository in your coding agent and ask it to set up EDGAR with the [`edgar-quickstart`](https://github.com/kana-ai/edgar/blob/main/skills/edgar-quickstart/SKILL.md) skill. The agent runs the commands. You choose the extensions and paste the tokens.

```
# 1. Install the dependencies and create a workspace outside the repository
bun install
bun run edgar init "$HOME/edgar-workspace"

# 2. Start the database with the password init generated
docker compose --env-file "$HOME/edgar-workspace/.env" up -d database

# 3. Fill in your tokens in $HOME/edgar-workspace/.env, then check everything
bun run edgar doctor "$HOME/edgar-workspace"

# 4. Start the server and the workers
EDGAR_WORKSPACE="$HOME/edgar-workspace" bun run edgard
```

`edgar doctor` checks your files, your extensions, every variable they need and the database, and each problem comes with its fix. The [quickstart](https://github.com/kana-ai/edgar/blob/main/docs/get-started/quickstart.md) shows what you should see at each step.

- **Agents never hold your push token.** Only EDGAR's own process pushes branches and opens pull requests. It pushes a card's change only to a branch named`edgar/<run id>` . A pull request review pushes only the fixes the author approved, to that pull request's own branch, never to the default branch.
- **A person merges.** EDGAR opens the pull request and waits for a person. It never merges on its own.
- **Each session is fenced in.** It runs as its own system user, with no direct network. It reaches the model only through EDGAR's local proxy, which holds the real keys and refuses requests that would make the provider fetch other URLs.
- **Every command an agent runs goes through a guard** before it runs.
- **Outside text is treated as data.** Card text, comments, logs and chat messages are marked as untrusted before an agent sees them. Someone outside your team can never start a code change.
- **Extensions reach only the hosts they declare** , and only over https.
- **The server uses its own database role** , with fewer rights than the owner role that runs migrations.
- **Secrets stay out of the record.** Tokens are removed from transcripts before they are saved.

Every run, step, check and cost is saved. The command line reads all of it through the API. Set `EDGAR_SOCKET` on the server, or `EDGAR_URL` from elsewhere, as [the command line reference](https://github.com/kana-ai/edgar/blob/main/docs/reference/cli.md#api-commands) says:

```
bun run edgar runs list
bun run edgar runs show <run>
bun run edgar runs timeline <run>
bun run edgar runs transcript <run>
bun run edgar usage --from 2026-11-01 --to 2026-12-01   # spend; needs the Admin role
```

The web app in [`apps/web`](https://github.com/kana-ai/edgar/blob/main/apps/web) shows the same runs, their stages and what waits for a person.

| Extension | What it gives EDGAR | 
|---|---|
| `github` | Issues as work, the code host for branches and pull requests | 
| `linear` | Linear issues as work, with comments and status written back | 
| `email` | The same notices as Slack, and EDGAR's own health, by email through SendGrid | 
| `slack` | Posts in a thread per run, questions with buttons, answers | 
| `docker` | Container logs on the same host, turned into incidents | 
| `google-cloud-logging` | Cloud Logging entries, turned into incidents | 
| `google-cloud-secret-manager` | The workspace's secrets, read from Secret Manager | 
| `aikido` | Open Aikido security issues as work items | 
| `vanta` | Failing Vanta compliance tests as work items | 
| `uptimerobot` | UptimeRobot monitors that are down, turned into incidents | 
| `claude-code` | Claude Code as a runtime | 
| `claude-sdk` | The Claude Agent SDK as a runtime | 
| `codex` | Codex as a runtime | 
| `google-iap` | Sign-in through Google's Identity-Aware Proxy | 
| `edgar-self` | EDGAR's own failed runs, turned into incidents it can fix | 

The built-in workflows, such as `card.to-pr`, live in [` extensions/workflows`](https://github.com/kana-ai/edgar/blob/main/docs/concepts/workflows.md). They are always loaded and are not mounted.

To write your own, read [Writing an extension](https://github.com/kana-ai/edgar/blob/main/docs/guides/writing-an-extension.md).

When a maintainer pushes a version tag, [CI](https://github.com/kana-ai/edgar/blob/main/docs/operating/releasing.md) builds Linux tarballs with checksums and build provenance and publishes them as a [GitHub Release](https://github.com/kana-ai/edgar/releases). It also publishes the SDK and the extensions to npm as `@kana-ai/edgar-*`, except the runtimes `claude-code`, `claude-sdk` and `codex`, which build on the server.

**Works today:** `edgar init` and `edgar doctor`; the server (` edgard`), with its API, its MCP endpoint and the engine, in one process or as separate `serve` and `work` processes; workflows that survive restarts, with retries, leases, waits and an outbox; the `card.to-pr` workflow on a worker that has the session settings; agent sessions in a sandbox, with a guard and a model proxy that counts spend; a command for nearly every API route; the web app; and every extension in the table above.

**Not yet:**

- Setup and upgrade commands and a container image.

| I want to | Read | 
|---|---|
| Install EDGAR and run it once | [Install](https://github.com/kana-ai/edgar/blob/main/docs/get-started/install.md) ·[Quickstart](https://github.com/kana-ai/edgar/blob/main/docs/get-started/quickstart.md) | 
| Understand the parts | [Concepts](https://github.com/kana-ai/edgar/blob/main/docs/README.md#concepts) | 
| Connect GitHub, Linear, Slack, logs or a coding agent | [Guides](https://github.com/kana-ai/edgar/blob/main/docs/README.md#guides) | 
| Write my own extension | [Writing an extension](https://github.com/kana-ai/edgar/blob/main/docs/guides/writing-an-extension.md) | 
| Look up a command, a key, a variable or an error code | [Reference](https://github.com/kana-ai/edgar/blob/main/docs/README.md#reference) | 
| Run EDGAR on a server | [Self-hosting](https://github.com/kana-ai/edgar/blob/main/docs/operating/self-hosting.md) | 
| Cut a release | [Releasing](https://github.com/kana-ai/edgar/blob/main/docs/operating/releasing.md) | 
| See complete setups | [Examples](https://github.com/kana-ai/edgar/blob/main/examples/README.md) | 

EDGAR stands on the work of these projects and companies. Thank you.

| Technology | What EDGAR uses it for | Made by | 
|---|---|---|
| [Bun](https://bun.sh) | Runs every part of EDGAR, and installs and tests it. | [@oven-sh](https://github.com/oven-sh) | 
| [TypeScript](https://www.typescriptlang.org) | The language of EDGAR and of every extension. | [@microsoft](https://github.com/microsoft) | 
| [PostgreSQL](https://www.postgresql.org) | Stores every run, step and setting. | [@postgres](https://github.com/postgres) | 
| [ParadeDB](https://www.paradedb.com) | The database image: Postgres with search and vectors. | [@paradedb](https://github.com/paradedb) | 
| [Turborepo](https://turborepo.com) | Runs the checks and tests of every package. | [@vercel](https://github.com/vercel) | 
| [Next.js](https://nextjs.org) | The web console. | [@vercel](https://github.com/vercel) | 
| [Anthropic](https://www.anthropic.com) | Models for agent sessions. | [@anthropics](https://github.com/anthropics) | 
| [OpenAI](https://openai.com) | Models for agent sessions. | [@openai](https://github.com/openai) | 

EDGAR also connects to these services through its extensions:

| Service | Extension | Made by | 
|---|---|---|
| [GitHub](https://github.com) | `github` | [@github](https://github.com/github) | 
| [Linear](https://linear.app) | `linear` | [@linear](https://github.com/linear) | 
| [Slack](https://slack.com) | `slack` | [@slackapi](https://github.com/slackapi) | 
| [Twilio SendGrid](https://sendgrid.com) | `email` | [@sendgrid](https://github.com/sendgrid) | 
| [Google Cloud](https://cloud.google.com) | `google-cloud-logging` ,`google-cloud-secret-manager` ,`google-iap` | [@GoogleCloudPlatform](https://github.com/GoogleCloudPlatform) | 
| [Docker](https://www.docker.com) | `docker` | [@docker](https://github.com/docker) | 
| [Aikido Security](https://www.aikido.dev) | `aikido` | [@AikidoSec](https://github.com/AikidoSec) | 
| [Vanta](https://www.vanta.com) | `vanta` | [@VantaInc](https://github.com/VantaInc) | 
| [UptimeRobot](https://uptimerobot.com) | `uptimerobot` | [@uptimerobot](https://github.com/uptimerobot) | 

Each of these keeps its own name, trademarks and licence. Listing them here does not mean they endorse EDGAR.

Start with [AGENTS.md](https://github.com/kana-ai/edgar/blob/main/AGENTS.md) and the [contribution guide](https://github.com/kana-ai/edgar/blob/main/CONTRIBUTING.md). Everyone who takes part follows the [code of conduct](https://github.com/kana-ai/edgar/blob/main/CODE_OF_CONDUCT.md). Report a security problem as the [security policy](https://github.com/kana-ai/edgar/blob/main/SECURITY.md) says, never in a public issue.

EDGAR is licensed under [Apache 2.0](https://github.com/kana-ai/edgar/blob/main/LICENSE). Its database image, ParadeDB, includes the `pg_search` extension, which has its own licence (AGPL-3.0).
