# Integrations

Choose the integration that fits your agent's host, from in-process SDK capture to harness plugins, local hooks and OpenTelemetry push.

## Choose by integration surface

| Surface | Recommended when | Boundary |
| --- | --- | --- |
| **Python SDK** | A Python agent, or any CLI agent you launch yourself | Runs in your process. Practice tasks, production capture, approved pair handed back |
| **Node SDK** | A JavaScript or TypeScript agent | Runs in your process. Production capture with `fw.turn()`, practice tasks with `fw.serve()`, approved pair handed to your agent |
| **Node SDK as a plugin: OpenClaw** | An OpenClaw agent | Full workflow, applied for you. Needs conversation access |
| **Node SDK as a plugin: DeepSeek Harness** | A `dsh` agent | Records tool outcomes only |
| **goose hook** | A goose agent | Installed by `agent-flywheel install-hooks`. Records outcomes; claims practice tasks only with `PERCEPTEYE_AGENT_MODE=training` |
| **OpenTelemetry push** | An agent already exporting GenAI spans | No install. Production traffic only, no practice tasks |
| **Agent Skill / Claude Code plugin** | An operator managing training from an agent client | Server-side, approval-gated training. Uses an `mck_` key |

Quick routing:

-   Python or CLI agent → [Python SDK](https://docs.percepteye.ai/sdk-python.md)
-   JavaScript or TypeScript agent → [Node SDK](https://docs.percepteye.ai/sdk-node.md)
-   OpenClaw or DeepSeek Harness → [Node SDK as a plugin](https://docs.percepteye.ai/sdk-node.md#openclaw-and-deepseek-harness)
-   Already on OpenTelemetry → [OpenTelemetry push](https://docs.percepteye.ai/guides-opentelemetry-push.md)
-   Operator training controls → [Agent Skills](https://docs.percepteye.ai/integrations.md#agent-skills)

## Python SDK

| Framework | How it's captured | Code in your agent |
| --- | --- | --- |
| **LangChain** | `langchain` adapter, auto-bound | None |
| **LangGraph** | `langchain` adapter; attributes each call to its node via `langgraph_node` | None |
| **Google ADK** | `adk` adapter, auto-bound | None |
| **Any CLI agent** | `fw.serve(["my-agent", "run"], ...)` | None |
| **Any structured CLI** | A `CommandOutputAdapter`; the generic `StreamFormat` parser reconciles tool lifecycles | None |
| **prime-agent** (example) | argv + `PrimeAgentOutputAdapter` ([example](https://github.com/percepteye-ai/agent-flywheel/tree/main/examples/prime_agent)) | None |
| **Custom adapter** | One entry-point factory in the `agent_flywheel.adapters` group | None |

| Method | Purpose |
| --- | --- |
| `serve()` | Practice tasks |
| `attach()` | Production capture |
| `record_tool_call()` | One explicit tool outcome |

The zero-instrumentation claim is enforced by a test: a LangChain agent with no `agent_flywheel` import still reports every tool call.

## Node plugin

**OpenClaw:** tool outcome recording, practice tasks, production capture, and applying the approved prompt and model. Conversation access must be enabled explicitly.

```bash
openclaw plugins install @percepteye/agent-flywheel
```

**DeepSeek Harness:** records `tools/result` outcomes only. No practice tasks, no production capture, no prompt or model changes.

```bash
dsh plugin --profile <name> add @percepteye/agent-flywheel
```

To run practice tasks for a DeepSeek Harness agent, serve it as a CLI agent through the Python SDK, with `endpoint_env=("DEEPSEEK_BASE_URL", "DEEPSEEK_API_KEY")`. See [CLI agents](https://docs.percepteye.ai/guides-cli-agents.md).

## goose

```bash
pip install agent-flywheel
agent-flywheel install-hooks
agent-flywheel status
```

The goose plugin records each tool call's outcome. With a key set and training mode, it also claims a practice task at `SessionStart` and reports the session as its result at `Stop`. In production it only records. [Worked example](https://github.com/percepteye-ai/agent-flywheel/tree/main/examples/goose).

## goose and Gemini CLI hooks (standalone)

The standalone hooks package installs into goose or Gemini CLI without the Python SDK:

```bash
goose plugin install https://github.com/percepteye-ai/agent-flywheel-hooks
gemini extensions install https://github.com/percepteye-ai/agent-flywheel-hooks
```

The hooks use only the Python standard library and write trajectory-compatible `tool_calls.jsonl`. Set `PERCEPTEYE_TRAJECTORY_DIR` to choose the output directory; without it the recorder stays inert. Local only: no upload, no practice tasks, no model or prompt changes.

| Host event | Outcome |
| --- | --- |
| goose `PostToolUse` | `ok` |
| goose `PostToolUseFailure` | `failed` |
| Gemini CLI `AfterTool` with an error | `failed` |
| Gemini CLI `AfterTool` without an error | `unknown` |

Failure-rate reporting excludes `unknown` from the denominator.

## OpenTelemetry

Push GenAI spans to `POST $PERCEPTEYE_CONTROL_PLANE_URL/agents/<agent_id>/otlp/v1/traces` with the agent's `pefw_` key. See [OpenTelemetry push](https://docs.percepteye.ai/guides-opentelemetry-push.md).

## Agent Skills

### Canonical Agent Skill

`percepteye-agent-training` lets an operator manage Mission Control training from Codex, Cursor, Gemini CLI, GitHub Copilot and VS Code, Claude, and other Agent Skills clients. It uses OpenTelemetry GenAI traces or SDK data, launches and monitors server-side training, and handles approval, results and promotion. It does not train locally, and every promotion stays approval-gated.

### Claude Code marketplace plugin

A distribution wrapper for the canonical skill, not a separate SDK.

```bash
claude plugin marketplace add percepteye-ai/percepteye-claude-plugin
claude plugin install percepteye@percepteye
```

Invoke it with `/percepteye:percepteye-agent-training`. Requires Python `>=3.9`, HTTPS access to Mission Control, and an account. It uses a customer-automation key (`mck_`): see [Authentication](https://docs.percepteye.ai/authentication.md).

---
Source: https://docs.percepteye.ai/#integrations · Index: https://docs.percepteye.ai/llms.txt
