Skip to content

Getting Started

Installation

pip install opentime
pip install opentime[rest]
pip install opentime[langchain]
pip install opentime[all]
git clone https://github.com/SyntheticCognitionLabs/OpenTime.git
cd OpenTime
docker compose up -d

Choose Your Integration

Your Setup Best Integration Guide
Claude Code MCP + Passive Hooks MCP + Hooks
Cursor MCP + Passive Hooks MCP + Hooks
Windsurf MCP + Passive Hooks MCP + Hooks
Cline (VS Code) MCP + Passive Hooks MCP + Hooks
GitHub Copilot MCP + Passive Hooks MCP + Hooks
Claude Desktop MCP MCP
ChatGPT / GPT-4 OpenAI Functions OpenAI & Gemini
Gemini OpenAI Functions OpenAI & Gemini
LangChain agent LangChain Tools LangChain
Custom agent REST API REST API
Team deployment Docker + REST API Docker + Team Setup

Core Concepts

Events & Correlation IDs

OpenTime tracks time by recording events. The most important pattern is the task start/end pair:

1. Start a task    → returns a correlation_id
2. Do the work
3. End the task    → pass the correlation_id to pair it with the start

The correlation ID ensures correct pairing even when multiple tasks of the same type run simultaneously.

Task Types

Every event has a task_type — a label like "code_generation", "test_run", "file_download". Use consistent names so OpenTime can build accurate statistics.

Per-Agent Learning

Each agent builds its own time-task database. Over time, OpenTime learns how long your specific agent takes for each task type. This is the key insight: a Claude Code agent's coding speed is very different from a data entry bot's.

Duration Statistics

After recording task pairs, you can query statistics:

  • Mean / Median / P95 — How long does this task type typically take?
  • Timeout recommendation — What timeout should I set based on historical data?
  • Approach comparison — Which path is actually faster given my agent's speed?

What's Next

  1. Set up your integration
  2. Add passive hooks for automatic tracking
  3. Use prompt templates so your agent uses OpenTime proactively
  4. Deploy for your team