createExecutor from @agentmark-ai/prompt-core; there’s no AgentMark adapter package to install or version to track. You own the code: copy the closest one, drop it in, adjust the model mapping, and you’re done.
Every executor here takes the neutral render (formatted.text_config.model_name, formatted.messages, and for object prompts formatted.object_config.schema) and returns { text | object, usage }. The builder turns that into AgentMark’s wire protocol for you. If your SDK isn’t listed, the shape is identical. See Bring your own SDK for the full guide.
Vercel AI SDK
Wraps theai package’s generateText / streamText (and generateObject for structured output). This example does text with both one-shot and streaming paths:
OpenAI (raw SDK)
The officialopenai package’s chat.completions.create. Messages map straight through; structured output uses JSON-schema response format:
Anthropic (raw SDK)
The@anthropic-ai/sdk messages.create. Anthropic takes system as a top-level field and requires max_tokens, so split the system message out of the neutral render:
Python (AWS Bedrock)
Bedrock’sinvoke_model takes a different request shape from OpenAI: anthropic_version lives in the body (not a header), max_tokens is required, and the model ID is a full cross-region inference profile ID — not the short alias you put in the prompt’s model_name field. Map it explicitly.
The runner automatically stamps gen_ai.operation.name = "chat" and the config alias on the span, so the Requests view and cost attribution work without any extra code. If you want the full inference profile ID to appear in the dashboard (instead of the config alias), override gen_ai.request.model on the span after your call — set_attribute is last-write-wins:
Python (OpenAI)
The same shape in Python: acreate_executor handler returning an ExecutorTextResult with a canonical UsageData. At runtime formatted is the TextConfigSchema Pydantic model (not a dict), so use attribute access, and model_dump() the messages before handing them to your SDK:
object= for structured output and stream_text= / stream_object= async generators for streaming, the same handler set as TypeScript. See Bring your own SDK for the streaming and object handlers.
Agent frameworks (Pydantic AI, Mastra, Claude Agent SDK)
Agent frameworks follow the identical shape; the only difference is that your handler runs an agent loop instead of a single completion. Feed the neutral render’s messages into your agent, run it, and return its final output plus token usage:streamText handler and yield text-delta / tool-call / tool-result events as the agent emits them. See the streaming section of Bring your own SDK.
Serve it
Every executor above plugs into the same wiring. Register your loader and evals once, on the client (evals registered there both run in experiments and list in the New Experiment dialog), build a runner from it, and the deployed managed handler is one line:Validate whatever you build
Gate any executor, copied or hand-written, with the conformance suite. One call confirms a protocol-correct stream for every kind, streaming and one-shot, including the error path:Have questions?
Reach out any time:
- Email us at hello@agentmark.co for support
- Schedule an Enterprise Demo to learn about our business solutions