BridgeSessionState.
Anthropic client
For Claude Code / OpenClaw / Hermes / self-built Anthropic-shaped agents. Replaceanthropic.Anthropic() with TelosAnthropicTransport; all other .messages.create() calls stay the
same:
Constructor parameters
| Parameter | Default | Description |
|---|---|---|
api_key | $ANTHROPIC_API_KEY | Anthropic API key |
base_url | None (SDK default) | can point at a local proxy for debugging |
session_id | "telos-session" | keep the same id for the same conversation; the key for multi-turn cache accumulation |
harness_name | None (auto-detect) | force "openclaw" / "hermes" |
engine_name | "anthropic" | usually left alone |
usage_log | None | jsonl path; one line appended per call (normalized usage) |
prompt_trace_log | None | jsonl path; records IR layout / plan / accumulation diagnostics |
session_state | None (new’d internally) | pass explicitly when multiple transports share one conversation |
Harness auto-detection: a system containing
<system-reminder> / <command-message>, or a message
with a thinking block → picks hermes; otherwise openclaw. See
Harness integration for the full order.OpenAI client
For telos / mini_swe_runner / self-built OpenAI-shaped agents:telos harness and uses a custom _ir_to_chat_completions to
produce the wire — preserving OpenAI’s tool_calls / role=tool structure rather than inlining it
into text.
Sharing one conversation across transports
If a conversation is handled by multiple transport instances (for example, the client is rebuilt after a retry), passBridgeSessionState in explicitly so the second instance sees the accumulated ref-pool
and counters:
Multi-turn state accumulation
How cross-turn state is held and observed, on both paths.