Skip to Content
Getting StartedQuickstart

Quickstart

Follow the same three steps as Connect Morse : instrument your agent, map success, and read your first brief. The setup wizard handles API-key generation and trace verification within this flow; its final Finish screen completes setup.

The three steps

  1. Instrument — generate an environment-scoped API key during onboarding, install the SDK for your runtime, and run your agent once to verify a trace lands.
  2. Map success — confirm your agents and define what a successful run means for each.
  3. Read your first brief — inspect the ranked list and its evidence. Verdicts stay neutral or withheld while labeled telemetry builds a baseline.

1. Instrument

Generate your API key during onboarding, then choose a runtime below. After adding the snippet, run your agent once — for example python my_agent.py for the direct Python SDK, or your framework’s equivalent entry script. Return to the wizard’s Verify screen to confirm a trace landed.

Pick a runtime

Both languages are supported, with the same adapters on each side.

Python — direct instrumentation via a context manager, plus LangChain, LangGraph, OpenAI, OpenAI Agents, Anthropic, and Claude Agent SDK.

TypeScript — direct instrumentation via run(), plus LangChain, LangGraph, OpenAI Agents, Anthropic, Claude Agent SDK, and the Vercel AI SDK.

The Python snippets follow. For the TypeScript equivalents see Frameworks → TypeScript.

Python SDK (direct)

Direct instrumentation of any Python function via a context manager.

pip install morse-ai
import morse_ai morse_ai.init(api_key=MORSE_API_KEY) with morse_ai.run("my-agent") as r: # your agent logic here result = "Hello, world!" r.record(success=True, outcome="completed", cost=0.04)

LangChain

Automatic chain/agent tracing via a callback handler — no code inside the chain changes.

pip install morse-ai[langgraph] langchain
import morse_ai from morse_ai.adapters.langchain import MorseCallbackHandler morse_ai.init(api_key=MORSE_API_KEY) handler = MorseCallbackHandler(agent_name="my-agent") # Add the callback to any LangChain chain or agent chain = your_chain.with_config(callbacks=[handler]) chain.invoke({"input": "Hello, world!"})

LangGraph

Per-node span capture plus automatic sub-agent topology from graph structure.

pip install morse-ai[langgraph] langgraph
import morse_ai from morse_ai.adapters.langchain import MorseCallbackHandler morse_ai.init(api_key=MORSE_API_KEY) handler = MorseCallbackHandler(agent_name="my-graph") # Pass the callback when invoking your StateGraph config = {"callbacks": [handler]} result = your_graph.invoke({"messages": [...]}, config=config)

OpenAI Agents

Runner is patched automatically — every agent run and handoff is traced.

pip install morse-ai[openai_agents] openai-agents
import morse_ai from morse_ai.adapters.openai_agents import install from agents import Agent, Runner morse_ai.init(api_key=MORSE_API_KEY) install() # patches Runner automatically — no further changes needed agent = Agent(name="my-agent", instructions="You are a helpful assistant.") result = Runner.run_sync(agent, "Hello, world!")

Anthropic

Every messages.create call on the wrapped client is traced, including cache/token usage.

pip install morse-ai[anthropic] anthropic
import morse_ai from morse_ai.adapters.anthropic import wrap import anthropic morse_ai.init(api_key=MORSE_API_KEY) # Wrap your Anthropic client — every messages.create call is traced client = wrap(anthropic.Anthropic()) with morse_ai.run("my-agent"): response = client.messages.create( model="claude-opus-4-5", max_tokens=1024, messages=[{"role": "user", "content": "Hello, world!"}], )

Claude Agent SDK

claude_agent_sdk.query is patched automatically — existing code works unchanged.

pip install morse-ai claude-agent-sdk
import morse_ai from morse_ai.adapters.claude_agent_sdk import install import claude_agent_sdk morse_ai.init(api_key=MORSE_API_KEY) install() # patches claude_agent_sdk.query automatically # Your existing claude_agent_sdk code works unchanged result = claude_agent_sdk.query("Hello, world!")

2. Map success

In the wizard’s Map & outcome screen, confirm which agents you are running and define what a successful run is for each — for example, a confirmed booking, an extraction that passed validation, or a ticket routed to the right queue. Label outcomes from your code, confirm them in the UI, or both. This is the evidence the brief is built on.

3. Read your first brief

Complete setup using Finish, then start with the ranked list in your dashboard. Open a trace to inspect its evidence. First traces and cost are available as telemetry arrives; ranked verdicts need labeled outcomes and enough baseline history. Thin evidence leaves a row neutral or withheld rather than inventing a score. Compare weekly briefs once enough history is available to judge whether a change helped.

Finish completes setup even if your first trace has not arrived yet. A later trace appears on your dashboard, and you can revisit earlier setup screens before finishing.

  • Introduction — what Morse AI correlates and why.
  • Traces — where your first trace shows up once it lands.
Last updated on