One night I was reviewing the billing side of my apps and put "revenue through the store" and "revenue through my own site" into the same table. I stopped typing. What stays in my hands, and whether I can see the customer at all, were completely different.
The moment after an agent works is exactly that fork. Where you sell decides your operating burden, your revenue ceiling, and how much you learn.
What I'd like to say first: decide what kind of distance you want from your customers before you decide on technology, and the channel mostly picks itself. Below I compare five paths, then write down the checkout code and usage-cap design you need if you sell directly.
Marketplace fees and review rules change, so treat every number here as an example of how to think, and check each platform's current terms before listing.
Pick three yardsticks first
I use these three:
- Take-home share: what's left after fees and cost of goods
- Customer distance: whether you can hear cancellation reasons and requests directly
- Time to first revenue: how long until the first payment lands
| Path | Take-home | Customer distance | Ramp-up | Best for |
|---|---|---|---|---|
| 1. Marketplace | Reduced by the platform fee | Far | Traffic arrives early | People with no audience |
| 2. Own site | Payment fees only | Close | Slow, depends on reach | People who keep publishing |
| 3. SaaS embed | Depends on platform terms | Middle | Months to onboard | Comfortable with B2B sales |
| 4. Consulting to product | High on projects, yours on product | Very close | Fastest | Domain experts |
| 5. Subscription | Moves with API cost | Close | Slow | Tools used daily |
Path 1 — List on an agent marketplace
You publish to an official or third-party marketplace and earn from usage. Think App Store or Play Store, for agents.
It suits general-purpose agents — translation, summarising, document cleanup — that don't depend on one industry. If you have no distribution of your own, borrowed traffic is a real help.
The price is distance. You pay a fee and you can't see the user. Cancellation reasons and the next feature people want rarely make it through the store.
Having run store apps for years, I know that kind of listing means improving from one short line in a review. I use a marketplace as a front door and, within its rules, leave a path back to my own site. That's my line.
Path 2 — Sell directly from your own site
You host the agent on your domain and charge with Stripe or similar. Fees shrink to the payment processor's cut, and you own pricing and the cancel flow.
The cost is that all acquisition is yours. Starting without an audience, expect the first months to produce almost nothing.
Checkout can stay small: create a session and keep the user and plan in metadata.
import Stripe from "stripe";
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!);
export async function POST(req: Request) {
const { userId, priceId } = await req.json();
const session = await stripe.checkout.sessions.create({
mode: "subscription",
line_items: [{ price: priceId, quantity: 1 }],
success_url: "https://example.com/billing/success",
cancel_url: "https://example.com/billing/cancel",
client_reference_id: userId,
subscription_data: { metadata: { userId } },
});
return Response.json({ url: session.url });
}Swap in whichever SDK or API actually runs your agent. What matters is that the billing check and usage count run before the agent starts — the cap section below covers it.
For a Next.js plus Cloudflare Workers setup with Stripe, I wrote the steps in the SaaS Stripe full-stack guide.
Path 3 — Embed in an existing SaaS
You ship an agent that runs inside Slack, Notion, Shopify and the like, through their app stores.
It works when the user base is clear and the agent is awkward on its own. For one person, a handful of business users on a single platform can be enough.
Mind the lead time. Corporate approval often takes weeks to months, a very different pace from a marketplace. Review, fees and data handling follow each platform's terms, so plan an exit for the day the platform changes direction.
Path 4 — Consulting first, product second
You build agents for companies as contract work, then extract what's common into a product. Cash arrives earliest, and you hear the customer's real vocabulary.
The order I follow:
- Automate the first client's workflow as it is.
- Extend to two or three clients in the same industry and list what they share.
- Cut out only the shared part as a general product.
- Move existing clients onto it and lower your operating load.
The biggest trap is staying in contract work. Landing the first client feels so good that productising keeps slipping. I cap contract work at three clients and spend everything after that on the product. Write that line down on day one.
For squeezing time out of contract work, see the AgentKit freelance workflow.
Path 5 — A subscription agent
One monthly price, plans split by usage or features. It suits tools people open every day and get better at using.
The accident-prone part is that cost scales with usage. Unlike fixed-cost SaaS, one heavy user can turn a month's profit into API bills.
So do this arithmetic before fixing plans. The numbers are examples only.
| Item | Example | Note |
|---|---|---|
| Monthly price | ¥1,480 | Placeholder |
| Monthly run cap | 200 runs | Always set one |
| API cost per run | ¥4 | Replace with your measured average |
| Cost in a month at the cap | ¥800 | ¥4 × 200 |
| Gross margin before payment fees | ¥680 | ¥1,480 − ¥800 |
The question is whether the heaviest month still avoids a loss. Test the worst case, not the average, and the pull of "unlimited" fades quickly.
Leave that table as hand arithmetic and you will forget to redo it every time you change a price or a cap. So I keep a tiny script that returns the worst-month margin. The 3.6% payment fee is an example; replace it with your processor's current rate.
import sys
def worst_month(price, cap, cost_per_run, fee_rate=0.036):
cost = cap * cost_per_run
fee = price * fee_rate
return {"cost": cost, "fee": round(fee), "margin": round(price - cost - fee)}
if __name__ == "__main__":
price, cap, unit = (float(x) for x in sys.argv[1:4])
r = worst_month(price, int(cap), unit)
print(r)
sys.exit(0 if r["margin"] > 0 else 1)Run with the example values (¥1,480 price, 200-run cap, ¥4 per run), python3 margin_check.py 1480 200 4 prints a margin of ¥627 after a ¥53 fee and exits 0. Raise the cost to ¥7.5 per run and the margin becomes −¥73 and the exit code is 1. I ran both cases to confirm. Put it in CI or a pre-listing checklist and a money-losing price can't slip through unnoticed.
Put the cap right after the billing check and before the agent call. I tripped here once: I read the remaining count and incremented it in a separate step, so two simultaneous requests both got through. Now the check and the increment are a single SQL statement.
type Plan = { name: string; monthlyLimit: number };
const PLANS: Record<string, Plan> = {
free: { name: "Free", monthlyLimit: 10 },
pro: { name: "Pro", monthlyLimit: 200 },
};
// check and increment in one statement so concurrent requests cannot exceed the cap
export async function reserveUsage(
db: D1Database,
userId: string,
plan: string
): Promise<boolean> {
const month = new Date().toISOString().slice(0, 7);
await db
.prepare("INSERT OR IGNORE INTO usage (user_id, month, used) VALUES (?, ?, 0)")
.bind(userId, month)
.run();
const res = await db
.prepare("UPDATE usage SET used = used + 1 WHERE user_id = ? AND month = ? AND used < ?")
.bind(userId, month, PLANS[plan].monthlyLimit)
.run();
return res.meta.changes === 1;
}This is a sketch assuming Cloudflare D1, and the usage table needs a unique constraint on (user_id, month). I haven't run it end to end in my own setup, so adjust how you read the affected-row count to your database.
When the cap is hit, don't just refuse — offer a top-up, and your heaviest users become a revenue line instead of a risk.
I approach the same idea from another angle in parallel agent quota budget design.
The five aren't exclusive
Most people combine two or three:
- Own site plus marketplace: the marketplace is the door, your site is the high-margin main line.
- Consulting plus product: protect cash flow while the product share grows.
- SaaS embed plus subscription: a B2B channel next to self-serve billing.
Whichever you choose, I tend to push exit design to later. Always keep one exit where the customer's voice reaches you. That's my rule.
I turned the go-to-market side into a 90-day plan in the agent product launch roadmap.
Today, try one line on paper for your own agent: what does the heaviest month cost? That number is where the choice of path starts.