• COST
  • SPEED
  • AUDIT
  • HUMAN

How to track token usage and latency with your agent

Connect LangSmith to your agent to turn raw trace data into clear answers about cost and speed.

Ask AI about this page

Our technology reaches across leading technology and enterprise teams.

  • Amazon
  • NVIDIA
  • Red Hat
  • Fidelity Investments
  • Intuit
  • OLX Brasil
  • Writesonic
  • Artium
  • Trolley
Bunny World Voxel Workspace

Short answer

How can I monitor my AI's token consumption and response times?

Your agent uses the LangSmith connector to pull recent traces from your project. This gives you a direct look at the token counts and timing for specific LLM calls. You'll see exactly where your budget and latency are going.

Where your data lands.

What you get from your traces.

Your agent processes your LangSmith data to highlight performance trends.

COST

Token usage breakdown

Your agent identifies which calls are burning through your token budget. You get a clear view of consumption patterns across different runs.

SPEED

Latency analysis

Find out which specific steps in your chain are slowing things down. Your agent flags high-latency calls for you to investigate.

AUDIT

Trace history

Your agent pulls a list of recent runs so you can audit specific interactions. This helps you verify that your prompts are behaving as expected.

HUMAN

Manual optimization

Your agent identifies the bottlenecks, but you decide how to rewrite prompts or change models to fix them. You stay in control of the actual logic changes.

The workflow

What your agent does when <the thing arrives>.

Your agent acts as a bridge between your chat interface and your LangSmith project data.

  1. Fetch traces

    Your agent reaches into your LangSmith project to grab the most recent execution data.

    langsmith_list_runs
  2. Calculate costs

    It looks at the token metadata within those runs to sum up usage for specific calls.

    langsmith_list_runs
  3. Measure timing

    Your agent compares start and end timestamps to find out how long each step took.

    langsmith_list_runs
  4. Report findings

    Your agent summarizes the most expensive or slowest runs so you can act on them.

    langsmith_list_runs

Vinkius Agentic Execution Platform

State the outcome. Agents take it from there.

You don't have to drive this run by hand. Inside the Vinkius Agentic Execution Platform, agents pick up the task above and carry it to the end: you set the limits, you watch the steps, you keep all decisions.

Run it in Vinkius

Agents carry the task to the end

Agents execute LangSmith tasks from end to end inside the Vinkius Agentic Execution Platform: set the outcome, and the steps run.

Take it to any compatible AI

One connection, any client

Same connection follows you to ChatGPT, Claude, Gemini and any other client you love. Switch whenever you want: your connection, your permissions and your record move with you.

Spaces

One Space per activity

A Space gathers the context, tools and tasks of one activity, so you coordinate several agents at once and follow each execution as it happens.

Limits

Autonomy inside limits you set

Permissions and spending limits are yours to define. Agents halt for your approval on anything sensitive, and you choose how far autonomy goes, step by step or end to end.

Record

All steps, on the record

Each action your agents take lands in a signed audit trail. Results are verified, mistakes are learned from, and an emergency stop is one click away.

Models

Included in your plan

A curated selection of AI models is included in your plan, and you can add your own through BYOK whenever you prefer.

Try it

Copy these to start.

Use these prompts to begin your analysis.

Starting points

Swap out the project names and timeframes to match your actual LangSmith setup.

LangSmith Connector

You're all set. Choose your MCP client and follow the setup instructions.

Connector linkhttps://edge.vinkius.com/vk_preview_JBueIzhraYvzf2S9aR0UP9Q6bjldfIBgmwxTvRHt/mcp

Claude Desktop

Follow the steps below to connect in seconds.

  1. 1In Claude Desktop, open Settings → Connectors.
  2. 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
  3. 3Click Add and start a new chat, LangSmith capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "langsmith-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_JBueIzhraYvzf2S9aR0UP9Q6bjldfIBgmwxTvRHt/mcp"
    }
  }
}
Copy into chat04
  • 01

    List the most recent runs from my 'production-agent' project in LangSmith.

  • 02

    Which of the recent traces in my 'test-suite' project had the highest token usage?

  • 03

    Show me the latency for the last five runs in my 'chatbot-v2' project.

  • 04

    Find any runs in my 'eval-project' that took longer than 5 seconds to complete.

  • Claude
  • ChatGPT
  • Cursor
  • VS Code
  • Windsurf
  • Claude Code
  • JetBrains
  • Cline

Start here

Connect LangSmith once, then ask.

Provide your LangSmith credentials once. Your connection stays encrypted, and you can immediately start asking your agent about your traces.

Connect LangSmith to your agent

FAQ

How this task behaves.

  • 01

    Can your agent change my LangSmith settings?

    No. Your agent can only read trace data. It cannot modify your LangSmith projects or settings.

  • 02

    Does your agent delete any of my traces?

    No. Your agent only has permission to list and read runs. It cannot delete or edit your history.

  • 03

    Can I see the exact prompt used in a trace?

    Yes, your agent can pull the input and output data from the traces it retrieves.

  • 04

    How recent is the data your agent sees?

    Your agent sees whatever recent runs are available in your LangSmith project based on your request.

  • 05

    Can your agent fix my slow LLM calls?

    No. Your agent can identify which calls are slow, but you have to manually adjust your code or prompts to fix them.

  • More questions about LangSmith? The Connector page answers them. See everything the LangSmith Connector can do

Building with AI? Ship this whole workflow in your product.

Vinkius Connect is the connectivity layer for AI builders. All the capabilities used on this page, from LangSmith to thousands more, arrive through one SDK, already maintained for you. One Application, unlimited seats, each with their own connectors and credentials, isolated and never exposed to Vinkius. No OAuth flows to write, no tokens to store, no APIs to chase.

Explore Vinkius Connect

TypeScript · Python · Java · Go · C# · PHP · Rust

  • 01

    Your customers bring their own keys.

    Each user connects their own apps and keeps their own credentials. Vinkius only sees the identifier your backend sends.

  • 02

    Whole catalog, kept current.

    LangSmith plus thousands more, maintained and growing daily. No integrations to write, no token storage, no OAuth plumbing.

  • 03

    Any agent, any model.

    Capabilities land as framework-neutral objects, with adapters for OpenAI, Anthropic, Gemini, the Vercel AI SDK, LangChain and more.

Connect LangSmith to Claude, Cursor, ChatGPT & more

From idea to done

See what gets done when the agents take over the busywork

Each workflow on this page runs on the same platform. Connect your tools once, and your agents keep working in any AI you trust.