Skip to main content

Get Started

Follow these steps to instrument your first LLM application with Anyway.
1

Create an Account

Sign up at app.anyway.sh and create your first project.Once logged in, navigate to Developer > API Keys and create a new SDK API key.
Keep your API key secure. Never commit it to version control.
2

Install the SDK

Install the Anyway Python SDK using pip (requires Python 3.10+):
pip install anyway-sdk
3

Initialize the SDK

from anyway.sdk import Traceloop

Traceloop.init(
    app_name="my-app",
    api_endpoint="https://collector.anyway.sh/",
    headers={"Authorization": "your-api-key"}
)
4

Trace Your LLM Calls

The SDK automatically instruments LLM calls from OpenAI, Anthropic, and other providers.Add workflow and task structure to your traces:
from anyway.sdk.decorators import workflow, task
from openai import OpenAI

client = OpenAI()

@task(name="chat")
def chat(prompt: str) -> str:
    response = client.chat.completions.create(
        model="gpt-4o-mini",
        messages=[{"role": "user", "content": prompt}]
    )
    return response.choices[0].message.content

@workflow(name="answer_question")
def answer_question(question: str) -> str:
    return chat(question)

result = answer_question("Hello!")
5

View Your Traces

Open the Anyway Dashboard and navigate to Traces.You’ll see your workflow and task spans with:
  • Execution hierarchy (workflow → tasks)
  • Duration and timing for each operation
  • Request and response data
  • Token usage and cost estimates
Click on any trace to see the full span tree.

Next Steps

Python SDK

Configure the Python SDK.

JavaScript SDK

Configure the JavaScript SDK.

Tracing Concepts

Learn about distributed tracing.

Cost Tracking

Monitor your AI spend.

Need Help?

Contact Support

Have questions? We’re here to help.