Skip to main content
🤖
OpenAI Agents SDK+Stompy

Handoffs between agents, with one record under them

A handoff passes the conversation. The record passes the reasons.

The Problem

A handoff in the Agents SDK passes control, and with it the conversation so far. What the first agent concluded last week is not part of it.

You can paste more into the instructions. It grows and goes stale, and nothing tells you which part is out of date.

How Stompy Helps

Stompy is a project the agents can read. Instructions stay short and point at it, and the agent searches when it needs the detail.

Register the two REST functions as function tools. Give the triage agent search only; give the agent that finalises a decision lock as well. The result is a record that people can also open, read and correct, because it is theirs.

Agents can also use the Stompy MCP tools directly by connecting to https://mcp.stompy.ai/mcp; the plain functions are the narrower choice.

Integration Walkthrough

1

Give the agents two plain functions

Two plain functions over the project's REST API. A project API key is minted by the project's owner while signed in, and works for that one project only. Read the project's own contexts and search with it; managing the project still needs a signed-in user.

import os
import httpx
BASE = "https://api.stompy.ai/api/v1/projects/my-project"
HEADERS = {"Authorization": f"Bearer {os.environ['STOMPY_PROJECT_KEY']}"}
def lock(topic: str, content: str) -> dict:
"""Keep a decision. Only called when the person asked for it."""
r = httpx.post(f"{BASE}/contexts", headers=HEADERS,
json={"topic": topic, "content": content})
r.raise_for_status()
return r.json()
def search(query: str) -> dict:
"""Find what the project already holds, by meaning."""
r = httpx.get(f"{BASE}/search", headers=HEADERS, params={"query": query})
r.raise_for_status()
return r.json()
2

Register them as function tools

The function_tool decorator exposes a function to an agent.

from agents import Agent, function_tool
triage = Agent(name="Triage", instructions="Search the project record before answering.", tools=[function_tool(search)])
finaliser = Agent(name="Finaliser", instructions="Keep a decision only when asked.", tools=[function_tool(search), function_tool(lock)])
3

Start from the brief

project_brief compiles the project's locked contexts and ticket summary into a short overview a new session can read. It is a summary of what you chose to keep, not a transcript.

project_brief(project="my-project")

What You Get

  • Instructions stay short and point to a record instead of repeating it
  • Reads and writes are separate tools, granted per agent
  • People can open and correct the same record the agents read
  • Versioned entries keep the history of a changed decision

Start your own record

Join the waitlist and we will tell you when your place is ready.