whatisgithub

What is cockpit-core?

murudan/cockpit-core — explained in plain English

Analysis updated 2026-05-18

3PythonAudience · developerComplexity · 3/5Setup · easy

In one sentence

A Python library that watches AI agents while they run and stops risky, irreversible actions before a workflow silently goes wrong.

Mindmap

mindmap
  root((cockpit-core))
    What it does
      Watches agent workflows
      Predicts drift
      Gates risky actions
    Tech stack
      Python
      NumPy
    Use cases
      Refund agent gate
      Invoice reconciliation
      Drift tracking
    Audience
      Developers
      Agent builders
    Integrations
      OpenAI Agents SDK
      LangGraph

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Wrap an AI agent function so it gets watched for silent failures.

USE CASE 2

Gate risky actions, like refunds, behind a human approval check.

USE CASE 3

Track gradual workflow drift over time before it causes a bad outcome.

USE CASE 4

Build a local, redacted history of past agent runs to tune detection.

What is it built with?

PythonNumPy

How does it compare?

murudan/cockpit-core0marildo/imago0xdfi/glm-5.2-1m-4x-dgx-spark
Stars333
LanguagePythonPythonPython
Setup difficultyeasyeasyhard
Complexity3/52/55/5
Audiencedevelopergeneralresearcher

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 30min

Needs numpy, the rest of the test suite has no other dependencies.

So what is it?

Cockpit-core is a Python tool built to watch AI agents while they work and catch problems before they cause real damage. Instead of only checking whether a task finished, it tries to predict where a workflow is heading and step in at the boundary, right before an action that cannot be undone. The idea behind it is that AI agents often fail quietly: they make up a plausible looking input, get back an empty or wrong result, and then report success anyway. Cockpit-core exists to catch that kind of mistake before it happens, not after the fact. The project describes agent failures using a nine state model of how a workflow can drift away from being healthy, either in reversible ways, such as losing context, stalling, drifting from the original goal, or losing track of the truth, or in ways that cannot be undone, such as false completion, runaway behavior, being taken over, or firing an irreversible action. Cockpit-core tracks a workflow's phase, its health, and who currently has control, and combines two detection methods: one that checks for sudden false completions, and one that tracks gradual drift over time using a simple statistical average. The project states that testing on real traces showed these two methods cover most of the failures they measured. Using it is meant to be simple. A developer can add one line to wrap an existing agent function, or use a more detailed set of calls to observe each step, mark phase changes, and gate risky, irreversible actions behind a check that a human can approve or deny. It ships with adapters for the OpenAI Agents SDK and LangGraph, so it can plug into agents built with those frameworks without much extra setup. There is also a local, customer owned option to save records of past workflow runs, with rules for redacting sensitive information such as emails or secrets, so a team can build a history of runs and use it to tune the detectors to their own workload. Cockpit-core comes with a test suite and seven example workflows in the repository, showing situations like a refund agent and an invoice reconciliation task. It is aimed at developers building or maintaining AI agents who want an early warning before a costly mistake ships.

Copy-paste prompts

Prompt 1
Show me how to wrap my Python agent function with cockpit.observe to catch failures early.
Prompt 2
Help me use cockpit's before_action gate to hold irreversible actions like refunds for approval.
Prompt 3
Explain how to connect cockpit-core to my LangGraph agent using its adapter.
Prompt 4
Walk me through setting up a redacted trace sink so I can log my agent's past runs safely.

Frequently asked questions

What is cockpit-core?

A Python library that watches AI agents while they run and stops risky, irreversible actions before a workflow silently goes wrong.

What language is cockpit-core written in?

Mainly Python. The stack also includes Python, NumPy.

How hard is cockpit-core to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is cockpit-core for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.