instinct-cli 0.2.1

Help AI agents learn from outcomes and make better next decisions. Portable agent skill and Rust CLI for Claude Code, Codex and MCP, powered by Helix DB.
# Instinct

[![Give your AI better instincts. Koščák Labs.](https://raw.githubusercontent.com/koscak-labs/instinct/fbfdb8d0222dd389b8d2f132282197c785a7a898/docs/assets/readme/instinct.jpg)](https://koscak.ai/instinct/)

[![Try the replay](https://raw.githubusercontent.com/koscak-labs/instinct/fbfdb8d0222dd389b8d2f132282197c785a7a898/docs/assets/readme/try.png)](https://koscak.ai/instinct/replay/) [![Install Instinct](https://raw.githubusercontent.com/koscak-labs/instinct/fbfdb8d0222dd389b8d2f132282197c785a7a898/docs/assets/readme/install.png)](https://github.com/koscak-labs/instinct#install-instinct)

Instinct helps an AI agent **learn from what happened and make a better next decision**. It records the move that worked, the evidence and the condition that would make it wrong. When a familiar situation comes up, even a fresh agent can act on that experience. A confirmed success strengthens the lesson. A miss gives the agent a reason to reconsider.

## Install and try it

With Rust 1.89 or later, run the offline demo.

```sh
cargo install --locked instinct-cli
instinct demo
```

The agent should use Tess’s accepted format for her usual client update, then set the lesson aside for a birthday toast. The demo uses a disposable bank. Run `instinct skill` for the agent instructions or `instinct skill --guide` to connect a persistent bank. [Set up Claude Code, Codex or another agent](https://github.com/koscak-labs/instinct#install-instinct)

## How an agent earns an instinct

| At the badge desk | What the agent learns to do |
| --- | --- |
| Two guests share a name on a corrected print sheet. | Claude compares the failed run with the accepted sheet. The seat ID distinguishes guests with the same name. |
| A new event has different guests and another duplicate name. | Codex applies that method to the new roster and checks the four badges against the current desk rules. |
| The desk changes its pickup rule. | The agent follows the new rule. Past success tells it which assumption to check. |

The trial used fictional rosters. In the native-tool run, Codex retrieved the right lesson and still asked for the desk note. Given the Instinct skill as well, a fresh Codex applied the lesson and printed all four badges. In a separate control, pasting the lesson directly into the prompt also worked. [Inspect the inputs, controls and outputs](https://github.com/koscak-labs/instinct/tree/main/bench/relay)

[![Four correct badges in the Claude to Codex handoff.](https://raw.githubusercontent.com/koscak-labs/instinct/fbfdb8d0222dd389b8d2f132282197c785a7a898/docs/assets/readme/handoff.jpg)](https://koscak.ai/instinct/replay/#proof)

## Inside the engine

The Rust CLI uses an embedded Helix DB bank and local retrieval to find a relevant lesson at decision time. A lesson carries its scope, observed results, hits, misses and exceptions. The engine supports lexical RAG retrieval offline and optional embeddings. Trusted agents can share a bank through MCP. [Explore the architecture](https://github.com/koscak-labs/instinct/blob/main/skills/instinct/references/architecture.md)

## Contribute an instinct

Have a lesson another agent should learn? The opt-in community bank is open for review. Each proposed instinct needs a recognizable situation, a first move, evidence and an exception. [Join the community bank review](https://github.com/koscak-labs/instinct/pull/16) · [Contribute to Helix DB](https://github.com/koscak-labs/instinct/blob/main/CONTRIBUTING.md)

Created by Filip Koščák at Koščák Labs. [Apache-2.0 license](https://github.com/koscak-labs/instinct/blob/main/LICENSE)