# Dirigent

<p align="center">
  <img src="dirigent.svg" alt="Dirigent" width="64" height="64">
</p>

<p align="center">Core libraries for the Dirigent agent orchestration platform.</p>

---

Dirigent is a multi-agent orchestration platform built around the Agent-Client Protocol (ACP). This repository contains the foundational library crates — the building blocks used by downstream tools such as [dirigate](https://git.g4b.org/dirigence/dirigate) and [fermata](https://git.g4b.org/dirigence/fermata).

> **Downstream mirror.** Active development happens in an upstream monorepo. This repository is an export of the core library crates and is updated on each release. Issues and contributions should be directed to the upstream project.

---

## Crates

| Crate | Description |
|-------|-------------|
| `dirigent_protocol` | ACP protocol types — messages, events, and RPC definitions |
| `dirigent_core` | Multi-connector orchestration runtime |
| `dirigent_tools` | Tool sandbox and execution abstractions |
| `dirigent_fermata` | Policy gate for AI coding agents (`.botignore` / `botignore.toml`) |
| `dirigent_auth` | User authorization model |
| `dirigent_config` | Configuration management |
| `dirigent_acp_api` | ACP server for incoming agent connections |
| `dirigent_archivist` | Event-driven session archival |
| `dirigent_process` | Child process management |
| `dirigent_taskrunner` | Background task runner |
| `dirigent_anth` | Claude Code JSONL session parser |
| `dirigent_inspector` | Session inspection tools |
| `dirigent_projects` | Project management primitives |
| `dirigent_matrix` | Matrix integration for session sharing |
| `dirigent_zed` | Zed editor integration |
| `dirigent_langfuse` | Langfuse observability integration |
| `dirigent_chatgpt` | ChatGPT `conversations.json` parser |
| `dirigent_codex` | OpenAI Codex session parser |
| `dirigent_testing` | Test utilities |
| `opencode_client` | OpenCode.ai HTTP client |

---

## Usage

### Library crates (via git dependency)

Add a crate to your `Cargo.toml`:

```toml
[dependencies]
dirigent_protocol = { git = "https://git.g4b.org/dirigence/dirigent", path = "crates/dirigent_protocol" }
dirigent_core     = { git = "https://git.g4b.org/dirigence/dirigent", path = "crates/dirigent_core" }
```

Replace `dirigent_protocol` / `dirigent_core` with the crate you need. All crates follow the same pattern.

### Binary crates (cargo install)

**fermata** — policy gate CLI and Claude hook adapter:

```bash
cargo install --git https://git.g4b.org/dirigence/dirigent --features cli
```

**anth** — Claude Code session inspector:

```bash
cargo install --git https://git.g4b.org/dirigence/dirigent --bin anth_bear --features dirigent-paths
```

---

## License

Licensed under either of

- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or <https://www.apache.org/licenses/LICENSE-2.0>)
- MIT License ([LICENSE-MIT](LICENSE-MIT) or <https://opensource.org/licenses/MIT>)

at your option.
