> For the complete documentation index, see [llms.txt](https://docs.revenium.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.revenium.io/get-started/quickstart/examples.md).

# Examples

Most AI reporting starts with tokens, latency, and provider invoices. That is useful infrastructure telemetry, but it does not answer the business question: did the agent create value?

The hard part of scaling AI agents is closing that gap. A workflow can look healthy technically while still being economically unclear. It may call the right models, use the right tools, and complete the right steps, but finance and operations still need to know what the work produced, what it cost, and where human escalation changed the economics.

These examples show the outcome-based pattern Revenium is designed to support. Each scenario connects model cost, tool cost, trace behavior, and a terminal business outcome so teams can evaluate agent work as unit economics, not just usage.

Here is a quick tour of a sample deployment .\
The intent of these examples is to answer the question: **did the agent produce more value than it cost?** So each one meters *everything* the agent does — the model calls, the external tools it reaches for, and the points where it hands off to a person — tied to a business outcome.

And that's the interesting part: some steps are **fully automated** — the agent calling tools like data enrichment, CI, or a knowledge base on its own — and some keep a **human in the loop**, where the agent escalates to a person. Revenium meters **both**, so you get the true, all-in cost set against the real value produced.<br>

{% embed url="<https://youtu.be/KzlYIxm1G2U>" %}

## The Measurement Pattern

Each scenario follows the same loop:

1. The agent performs a recognizable business workflow.
2. Model calls and tool actions are metered with business context.
3. Related steps are joined into a trace.
4. The workflow reports an outcome for the job.
5. Revenium compares the cost of the work with the value it created or protected.

That pattern is reusable across agentic systems. The examples here focus on outcome-based workflows because they make the value question explicit: revenue generated, engineering work deflected, or support cost avoided.

## The Three Scenarios

| Scenario                      | What It Measures                                                                                           |
| ----------------------------- | ---------------------------------------------------------------------------------------------------------- |
| **AI Sales Agent**            | Revenue attribution — converted pipeline value vs. enrichment, model, and human review cost.               |
| **AI Coding Workflow**        | Engineering value — deflected engineering effort across PR review, test gen, RCA, release gates, dep risk. |
| **AI Customer Support Agent** | Deflection economics — tickets resolved without human handling vs. escalation and upsell value.            |

Each scenario has its own page in this section:

* [AI Sales Agent Example](/get-started/quickstart/examples/ai-sales-agent.md)
* [AI Coding Workflow Example](/get-started/quickstart/examples/ai-coding-workflow.md)
* [AI Customer Support Agent Example](/get-started/quickstart/examples/ai-customer-support.md)

## Source & Setup

The runnable code lives in the public Revenium Python SDK. Installation, environment variables, exact commands, payload details, and tunables are maintained there:

* **Examples README (canonical):** [github.com/revenium/revenium-python-sdk/blob/main/examples/agentic\_outcomes/README.md](https://github.com/revenium/revenium-python-sdk/blob/main/examples/agentic_outcomes/README.md)
* **Shared runtime (used by all three scenarios):** [examples/agentic\_outcomes/ directory](https://github.com/revenium/revenium-python-sdk/tree/main/examples/agentic_outcomes)

```bash
# the example scripts live in the SDK repo — clone it, install the SDK, then run from inside the repo
git clone https://github.com/revenium/revenium-python-sdk.git
cd revenium-python-sdk
pip install revenium-python-sdk
# then run any scenario, e.g.:
python examples/agentic_outcomes/sales.py --count 5
```

Set `REVENIUM_API_KEY` (a write-scope key, `rev_sk_…`, generated at [app.revenium.ai → Integrations](https://app.revenium.ai/connections/sdk-setup)) before running.

For a first run, use a demo team or clearly named demo data so the sample does not mix with production traffic. Start small, confirm the run appears in the expected Revenium views, then increase volume only if you need a denser dashboard sample.

## What Revenium Should Show

Use the examples to review the same workflow from several angles:

* [**ROI and unit economics**](/track-and-control-costs/analyze-roi-and-unit-economics.md): value generated or avoided cost compared with AI, tool, and human escalation costs.
* [**Logs and traces**](/optimize-performance/debug-logs-and-traces.md): the exact sequence of model calls, tool actions, timings, and outcome linkage for an individual job.
* [**Latency and performance**](/optimize-performance/monitor-latency-and-performance.md): workloads that are unusually slow, expensive, or transaction-heavy.
* [**Agent decision costs**](/instrument-your-agents/analyze-decision-costs.md) and [**tool usage**](/instrument-your-agents/monitor-agent-tool-usage.md): movement of work between agent roles and the economic impact of external tools.

The usual review path is: start in ROI, choose a representative job, then inspect the trace and performance details behind it.

## Related Reading

For current product updates, see the [Revenium changelog](/get-started/changelog.md). For broader writing on AI economics, outcomes, cost control, and agent operations, see the [Revenium blog](https://www.revenium.ai/blog).

## Notes

* Values are illustrative demo values, not performance or ROI guarantees.
* Prompt details in the UI depend on your workspace prompt-capture settings.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.revenium.io/get-started/quickstart/examples.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
