> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.alephant.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.alephant.io/_mcp/server.

# Agent Finance

> Track cost, revenue, external spend, and margin for agents, workflows, and paid endpoints

Agent Finance connects operational activity to financial outcomes.

Alephant tracks the cost of model calls, tool calls, workflow execution, and paid endpoint activity so teams can understand not only what agents did, but what each run cost and whether a monetized capability is profitable.

## Financial Signals

| Signal                      | Meaning                                                                        |
| --------------------------- | ------------------------------------------------------------------------------ |
| Token cost                  | LLM provider cost from input and output tokens                                 |
| Tool or API spend           | External API, tool, or workflow cost triggered during a run                    |
| Outbound payment spend      | x402 or payment-rail spend when an agent buys access to an external capability |
| Endpoint revenue            | Revenue from buyers calling a paid Alephant-managed endpoint                   |
| Platform or settlement fees | Fees associated with payment, settlement, or platform operation                |
| Known margin                | Revenue minus known model cost, external spend, and fees                       |

## Why Margin Matters

AI endpoints can get usage while losing money per call. A paid workflow may charge a buyer, then spend more on model calls, external APIs, retries, or downstream paid endpoints than it earns.

Alephant helps teams monitor:

* Cost per request
* Cost per run
* Cost per session
* Cost per workflow
* Revenue per endpoint call
* Known margin per endpoint, agent, or workflow
* Budget and spend risk by workspace, department, member, agent, or Virtual Key

## Example: Paid Research Endpoint

One paid endpoint call might include:

1. Buyer pays for the endpoint.
2. Alephant verifies payment requirements.
3. Endpoint policy checks buyer access, price, and rate limits.
4. The research workflow runs through Alephant Gateway.
5. The workflow makes model calls and external data API calls.
6. Alephant records revenue, token cost, external spend, latency, and status.
7. The dashboard shows known margin for that call.

## Cost Control Before Margin Loss

Agent Finance is connected to policy controls:

* Stop a run when workspace or agent budget is exhausted.
* Throttle expensive workflows before runaway loops continue.
* Restrict paid endpoint execution to allowed buyers or price ceilings.
* Route simple model tasks to lower-cost models.
* Alert operators when margin, latency, error rate, or usage changes unexpectedly.

## Related Pages

* [Budget Management](/docs/overview/fin-ops-budget/budget-management)
* [Cost Analytics](/docs/overview/fin-ops-budget/cost-analytics)
* [Agent Run Tracing](/docs/overview/core-concepts/agent-run-tracing)
* [Paid Endpoints](/docs/overview/monetize/paid-endpoints)