npm package: @10et/cli
Description: TENET — The operating system for AI agent teams
Author: Alec Taggart
Latest version: 1.11.19

<p align="center">
  <img src="https://10et.ai/favicon-192.png" width="48" height="48" alt="TENET">
</p>

<h1 align="center">TENET</h1>
<p align="center"><strong>The operating system for AI agent teams.</strong></p>
<p align="center">Context that compounds. Every session makes the next one smarter.</p>

<p align="center">
  <a href="https://www.npmjs.com/package/@10et/cli"><img src="https://img.shields.io/npm/v/@10et/cli?label=%4010et%2Fcli&color=black" alt="npm"></a>
  <a href="https://10et.ai">Website</a> ·
  <a href="https://docs.10et.ai">Docs</a> ·
  <a href="https://github.com/10et-ai/cli/issues">Issues</a>
</p>

---

## What Is TENET?

TENET is a CLI + MCP server that gives AI agents **persistent memory**, **eval-gated improvement loops**, and **multi-agent coordination** — installable in under two minutes alongside Claude Code, Cursor, or any LLM runtime.

Without TENET, every agent session starts from zero. With TENET, decisions compound. Agents learn what works for your specific codebase, team, and stack.

---

## Install

Requires Node.js 20+.

```bash
npm install -g @10et/cli
```

---

## Zero to Intelligence in Two Minutes

```bash
# Add TENET to any project
cd your-project
tenet init

# Detect your stack, wire up eval agents
tenet setup

# Everything running: hub, agents, IDE
tenet start
```

That's it. TENET auto-discovers your stack, scaffolds agents, and starts journaling context from the first session.

---

## Core Concepts

### Context Hub — The Memory Layer

TENET runs a local **Context Hub** daemon that MCP clients (Claude Code, Cursor, Pi) connect to. It's the shared memory layer across all agents working on your project.

```bash
tenet context-hub start    # Start the daemon
tenet context-hub status   # Check health, port, token
tenet context-hub stop
```

Every agent automatically gets access to:
- **Semantic memory** — past decisions, patterns, discoveries
- **Journal** — full session history, searchable
- **Kanban** — shared task board across agents
- **Event bus** — real-time coordination between agents
- **Experiment history** — what was tried, what worked

### MCP Tools (Available to Claude Code and any MCP client)

TENET exposes these tools directly to your AI runtime:

| Tool | What it does |
|------|-------------|
| `context_get` | Full project context dump |
| `context_search` | Semantic search across project history |
| `context_sessions` | List recent agent sessions |
| `context_status` | Hub health and stats |
| `memory_search` | FTS5-indexed semantic memory search |
| `memory_add` | Persist a decision or discovery |
| `memory_status` | Memory DB stats |
| `journal_write` | Append to session journal |
| `events_publish` | Emit an event to the MAP bus |
| `events_recent` | Recent events from the bus |
| `kanban_ls` | Show task board |
| `kanban_add` | Add a card |
| `kanban_pick` | Pop the top backlog item |
| `kanban_move` | Move card between columns |
| `build_dispatch` | Trigger a build agent |
| `eval_run` | Run an eval and get the score |
| `skill_list` | Browse available skills |
| `skill_load` | Load a skill into context |
| `query_experiment_history` | Search past experiment results |
| `transact_image` | Generate and pay for an image |
| `transact_music` | Generate and pay for music |
| `transact_price` | Quote a transaction |
| `transact_run` | Execute an atomic transaction |
| `transact_status` | Check transaction status |

Add to your project's `.mcp.json`:

```json
{
  "mcpServers": {
    "tenet-context": {
      "command": "tenet-context-hub-mcp",
      "args": ["--project-dir", "."]
    }
  }
}
```

### Agents

TENET agents are narrowly-scoped, eval-gated, and self-improving. They run in parallel, each on its own worktree, and only merge what passes eval.

```bash
tenet agent init <name>    # Scaffold agent (manifest + policy + flows)
tenet agent list           # All registered agents
tenet agent status         # Health, scores, last run
tenet agent setup          # Auto-detect stack → generate agents
```

The convergence pattern that actually works:

1. **Write a spec** describing what to build
2. **Decompose to binary checks** — each spec line becomes one eval assertion
3. **Score = passed / total** — agent sees gradient, converges in 1–3 rounds
4. **PR created automatically** when threshold passes

```bash
tenet build --spec specs/feature.md --name my-feature
# generates eval/build/my-feature.ts + .tenet/agents/build-my-feature.toml
```

### Flows — Declarative Agent Pipelines

Flows are typed pipelines that coordinate agents, evals, and actions:

```bash
tenet flow run nightly-eval    # Strategize → run agents → train → sync
tenet flow run overnight       # Autonomous loop until morning
tenet flow run pr-triage       # Eval-gated PR review
tenet flow list                # All flows + run history
tenet flows                    # Manage declarative event flows
```

Flow nodes: `action` (shell), `compute` (JS), `agent`, `eval-gate`. All state is persisted to disk — flows resume after crashes.

### Policy Head — RL Training Loop

Every agent action produces `(state, action, reward)` tuples. TENET trains a policy head on your project's actual history.

```bash
tenet train policy-head        # Train (transformer by default)
tenet train status             # Data stats, model info, threshold
tenet train check              # Is training threshold met?
tenet train eval               # Per-tool accuracy report
tenet train export             # Export data for external tools
```

The policy head learns what actions work for YOUR codebase — not generic advice, but personalized from your sessions.

### Pi Fleet — Parallel Agent Waves

Run parallel agent waves across VMs for maximum throughput:

```bash
tenet pi fleet spawn 8         # Spawn 8 agent VMs
tenet pi fleet status          # Running agents, tuple counts, health
tenet pi fleet collect         # Pull tuples, dedup, append to buffer
tenet pi fleet destroy         # Tear down the wave
```

---

## Daily Workflow

```bash
# Morning
tenet morning                  # What happened overnight
tenet brief                    # 5-line org status: PRs, agents, signal, next action
tenet hud                      # Full campaign dashboard

# During the day
tenet pivot                    # Checkpoint (journal + commit)
tenet scorecard                # Throughput, cost, convergence, coverage
tenet status                   # Project health

# Night
tenet peter autoresearch --rounds 5   # Overnight improvement loop
tenet schedule                        # Smart scheduling based on epistemic map
```

---

## Key Commands Reference

### Project Lifecycle

| Command | What it does |
|---------|-------------|
| `tenet init` | Initialize TENET in a project |
| `tenet setup` | Auto-detect stack, scaffold agents |
| `tenet start` | One-command activation (init → setup → launch) |
| `tenet repair` | Fix a broken `.tenet/` directory |
| `tenet doctor` | Health check + auto-repair |
| `tenet migrate` | Upgrade `.jfl/` → `.tenet/` naming |

### Context & Memory

| Command | What it does |
|---------|-------------|
| `tenet context-hub start/stop/status` | Manage hub daemon |
| `tenet context-hub ensure` | Ensure hub is running, auto-start if not |
| `tenet context-hub hooks` | Wire Claude Code HTTP hooks |
| `tenet memory add <text>` | Add a memory entry |
| `tenet memory search <query>` | Semantic search memories |
| `tenet memory list` | Browse all memories |

### Agents & Evals

| Command | What it does |
|---------|-------------|
| `tenet agent init <name>` | Scaffold a new agent |
| `tenet build --spec <file>` | Generate build agent from spec |
| `tenet peter agent <name>` | Run an agent with eval gating |
| `tenet peter autoresearch` | Full autonomous improvement loop |
| `tenet eval status` | Scores and trends |

### Services & Orchestration

| Command | What it does |
|---------|-------------|
| `tenet services` | Interactive TUI for all services |
| `tenet service-agent` | Manage service MCP agents |
| `tenet orchestrate` | Multi-service workflows |
| `tenet scope` | View and manage service context scopes |
| `tenet onboard` | Onboard a repo as a service agent |

### Task & Project Management

| Command | What it does |
|---------|-------------|
| `tenet kanban` | Task board (backlog → in_progress → eval → done) |
| `tenet linear link/sync` | Bidirectional GitHub ↔ Linear sync |
| `tenet connect` | Link external systems (M365, Google, Slack, Notion) |
| `tenet scorecard` | Project health scorecard |
| `tenet ceremony` | Post-cycle analysis |
| `tenet synopsis` | Work summary (journal + commits + code) |

### Skills

Skills are reusable instruction sets that improve through usage:

```bash
tenet skills list              # Browse installed + available
tenet skills install <name>    # Install from registry
tenet skills create <name>     # Scaffold a new skill
tenet skills publish           # Publish to the skill shed
```

### Secrets

```bash
tenet secrets set KEY=value    # AES-256-GCM encrypted
tenet secrets get KEY
tenet secrets list
```

---

## Project Structure

```
.tenet/                         # Workspace state (local, git-tracked)
├── agents/*.toml               # Agent configs (name, eval, constraints)
├── journal/                    # Session journals (JSONL, one file per session)
├── eval.jsonl                  # Eval results history
├── memory.db                   # SQLite memory + FTS5 index
├── flows/                      # Flow definitions + run state
├── context-hub.pid             # Hub process file
├── context-hub.token           # Auth token for MCP clients
└── config.json                 # Workspace config

packages/pi/                    # Pi AI runtime extensions
├── extensions/                 # Session lifecycle, tools, telemetry
├── skills/                     # Skill definitions (SKILL.md + learnings)
└── src/                        # Pi binary

src/                            # CLI source
├── commands/                   # All CLI commands
├── lib/                        # Core libraries
│   ├── memory-db.ts            # SQLite + FTS5 memory layer
│   ├── memory-search.ts        # Semantic + BM25 search
│   ├── flow-engine.ts          # Flow runtime
│   ├── agent-guards.ts         # Worktree + git validation (async)
│   ├── hub-multiplexer.ts      # Multi-project hub daemon (Hono)
│   └── training-buffer.ts      # RL tuple collection
└── mcp/                        # MCP server implementations
```

---

## Works With

TENET is the context layer underneath, not a replacement for your AI runtime.

- **Claude Code** — add `.mcp.json`, all tools available automatically
- **Cursor** — same MCP config
- **Pi** — native integration via `tenet pi`
- **Any MCP client** — `tenet-context-hub-mcp` is a standard MCP server

---

## Platform

The free tier runs entirely locally. Connect to the platform for:

- Cloud dashboard and sync
- Hosted overnight agents
- Team memory sharing
- Telemetry digest and alerts

```bash
tenet login
tenet sync        # Push workspace data
tenet cockpit up  # Local Cockpit (docker compose)
```

---

## Links

- **npm**: [@10et/cli](https://www.npmjs.com/package/@10et/cli)
- **Website**: [10et.ai](https://10et.ai)
- **Docs**: [docs.10et.ai](https://docs.10et.ai)
- **Skills Registry**: [github.com/10et-ai/skills](https://github.com/10et-ai/skills)
- **Issues**: [github.com/10et-ai/cli/issues](https://github.com/10et-ai/cli/issues)

## License

MIT