docs/publishing/config/pricing.mdx
Charge for your Agentic product with a flexible, declarative pricing model built on top of Stripe's subscription billing.
Agentic supports almost any combination of fixed and usage-based billing billing models, both at the MCP level, at the tool-call level, and at the custom metric level (e.g., tokens, image transformations, etc).
<Tip> Pricing can feel a little complicated to set up. Feel free to [reach out to us](/contact) once you're ready to start charging for your product, and I'd be happy to help you set everything up. </Tip>Examples: "Free", "Starter Monthly", "Pro Annual", etc.
</ResponseField> <ResponseField name='slug' type='string' required> A unique slug for the pricing plan which acts as a stable identifier across deployments.Should be lower-kebab-cased. Should be stable across deployments.
For all plans aside from free, the slug should include the interval
as a suffix so pricing plans can be uniquely differentiated from each
other across billing intervals.
Examples: free, starter-monthly, pro-annual, etc.
One of day, week, month, or year.
You can use this to limit the number of API requests that can be made by a customer during a given interval.
If not set, the pricing plan will inherit the default platform rate-limit
set by defaultRateLimit in the Agentic project config.
You can disable rate-limiting for this pricing plan by setting
rateLimit.enabled to false.
See Rate Limits for more details.
</ResponseField> <ResponseField name='lineItems' type='array' required> List of LineItems which are included in the PricingPlan.Note: Agentic currently supports a max of 20 LineItems per pricing plan.
See PricingPlanLineItem for details.
</ResponseField>Each Pricing Plan Line Item corresponds to one Stripe Product, one Stripe Price, and possibly one Stripe Meter if the line-item is metered.
The base slug is reserved for a plan's default licensed line-item.
The requests slug is reserved for charging using metered billing based
on the number of request made during a given billing interval.
All other PricingPlanLineItem slugs are considered custom LineItems.
Should be stable across deployments, so if a slug refers to one type of product / line-item / metric in one deployment, it should refer to the same product / line-item / metric in future deployments, even if they are configured differently. If you are switching between a licensed and metered line-item across deployments, they must use different slugs.
</ResponseField> <ResponseField name='label' type='string'> Optional label for the line-item which will be displayed on customer bills.If unset, the line-item's slug will be used as the label.
Specified in the smallest currency unit (e.g. cents for USD).
So 100 = $1.00 USD, 1000 = $10.00 USD, etc.
</ResponseField> </Tab> <Tab title="Metered Line Item"> Metered line-items are used to charge for **usage-based services**. <ResponseField name='usageType' type='string' required> The type of usage to charge for. `metered` in this case. </ResponseField> <ResponseField name='unitLabel' type='string'> Optional label for the line-item which will be displayed on customer bills.If unset, the line-item's slug will be used as the unit label.
per_unit indicates that the fixed amount (specified in unitAmount) will be charged per unit of total usage.
tiered indicates that the unit pricing will be computed using a tiering strategy as defined using tiers and tiersMode.
Only applicable for per_unit billing schemes.
Specified in the smallest currency unit (e.g. cents for USD).
So 100 = $1.00 USD, 1000 = $10.00 USD, etc.
</ResponseField> <ResponseField name='tiersMode' type='string'> Defines if the tiering price should be `graduated` or `volume` based.In volume-based tiering, the maximum quantity within a period
determines the per unit price.
In graduated-based tiering, the per-unit price changes successively
as the quantity grows.
This field requires billingScheme to be set to tiered.
This field requires billingScheme to be set to tiered.
One of unitAmount or flatAmount must be provided, but not both.
Should be a number or inf for the maximum tier.
Specified in the smallest currency unit (e.g. cents for USD).
So 100 = $1.00 USD, 1000 = $10.00 USD, etc.
</ResponseField> <ResponseField name='flatAmount' type='number'> The fixed amount to charge per billing interval for this pricing tier.Specified in the smallest currency unit (e.g. cents for USD).
So 100 = $1.00 USD, 1000 = $10.00 USD, etc.
</ResponseField> </Expandable> </ResponseField> <ResponseField name='defaultAggregation' type='object' default="{ formula: 'sum' }"> Specifies how events are aggregated for the Stripe Meter. <Expandable title="properties"> <ResponseField name='formula' type='string' default='sum' required> Specifies how events are aggregated for a Stripe Meter.Allowed values:
sum - Sum each event's value during the period.count - Count the number of events during the period.If not set, sum will be used.
Cannot be combined with tiers.
Must be a positive number.
</ResponseField> <ResponseField name='round' type='string' required> After division, either round the result `up` or `down`. </ResponseField> </Expandable> </ResponseField> </Tab> </Tabs>This example shows a free monthly pricing plan which is used by default for projects that don't specify any pricing plans.
import { defineConfig } from '@agentic/platform'
export default defineConfig({
// ...
pricingPlans: [
{
name: 'Free',
slug: 'free',
lineItems: [
{
slug: 'base',
usageType: 'licensed',
amount: 0
}
]
}
]
})
This example has 2 pricing plans, the default free plan and a fixed-price $4.99 / month basic plan with a 7-day trial.
import { defaultFreePricingPlan, defineConfig } from '@agentic/platform'
export default defineConfig({
// ...
pricingPlans: [
defaultFreePricingPlan,
{
name: 'Basic',
slug: 'basic',
trialPeriodDays: 7,
lineItems: [
{
slug: 'base',
usageType: 'licensed',
amount: 499 // $4.99 USD
}
]
}
]
})
import { defineConfig } from '@agentic/platform'
export default defineConfig({
// ...
pricingPlans: [
{
name: 'Free',
slug: 'free',
lineItems: [
{
slug: 'base',
usageType: 'licensed',
amount: 0
}
],
// Free but limited to 20 requests per day
rateLimit: {
limit: 20,
interval: '1d'
}
},
{
name: 'Pay-As-You-Go',
slug: 'pay-as-you-go',
lineItems: [
{
slug: 'requests',
usageType: 'metered',
billingScheme: 'tiered',
tiersMode: 'volume',
// $0.00467 USD per request up to 999 requests per month
// then $0.00053 USD for unlimited further requests that month
tiers: [
{
upTo: 999,
unitAmount: 0.467
},
{
upTo: 'inf',
unitAmount: 0.053
}
]
}
],
// Limit to 1000 requests per day
rateLimit: {
limit: 1000,
interval: '1d'
}
}
]
})
Every time you make a chance to your project's pricing and create a new deployment, Agentic will lazily upsert any related Stripe resources (products, prices, meters, subscriptions, customers, etc).
If a particular Stripe resource hasn't changed between deployments, Agentic will continue using the existing Stripe resources, which is important for customers who may have signed up for subscriptions before you made a change to your pricing.
</Info>