Build the agent in the panel first — its instructions, which model it runs on, which tools it can call and what it knows. None of this is passed at call time; the agent already holds it.
GTWY panel · New agent
NameSupport agent
InstructionsCheck the order, apply the refund policy
Modelclaude-sonnet-4-6 · fallback gpt-4o
Toolsorders.lookup · stripe.refund
Knowledgerefund-policy.pdf
Test it in the panel before you publish. It is a much faster loop than testing through the API.
Step 02
Publish and get your auth key
Publishing is what makes the agent callable. You get an agent ID and an auth key — the key is shown once, so store it somewhere your server can read and nowhere else.
GTWY panel · Published
Agent IDagt_4127
Auth keygtwy_live_9f4c…a17e
StatusLive
Keep the auth key on your server. Never ship it to a browser — that is what embed tokens are for.
Step 03
Make the first call
Name the agent, send an input. Everything the agent needs it already has — the snippet below fills in a real prompt with two variables, so you can see the variables block populate.
Identifies this run in logs, traces and the usage API.
content / output_text
What the agent produced. A string unless you asked for structured output.
role
Always assistant on success — useful when parsing generically.
model
Which model actually served it — useful when fallback fired.
usage.cost
The run fee, deducted from your wallet as it executed.
What just happened
That last call was one run.
You sent one input. The agent you configured called a model, ran its tool, retrieved from its knowledge, checked the output and returned it. Five things, one run, one charge.
01Request inYour input, your auth key, the agent ID