Skip to main content

Installation

Choose your language and install the SDK:
pip install artanis

Initialize

Create an Artanis client with your API key:
from artanis import Artanis

artanis = Artanis(api_key="sk_...")  # or set ARTANIS_API_KEY env var
Get your API key from the Artanis Dashboard.

Your First Trace

Create a trace to capture an AI operation with full state management:
# Start a trace with context
trace = artanis.trace("answer-question")

# Capture input and state
trace.input(question="What is your refund policy?")
trace.state({
    "model": "gpt-5.1",
    "temperature": 0.7,
    "context_docs": retrieved_docs
})

# Your AI logic
response = llm.generate(prompt)

# Capture output
trace.output(response)

# Trace is automatically sent with full state for replay
State capture enables you to replay this exact scenario later, even after updating your model or prompts.

View & Analyze Your Trace

Open the Artanis Dashboard to:
  • Search traces - Find all traces by error type, user, or custom filters
  • Analyze errors - See automatic categorization of why things failed
  • Replay scenarios - Test fixes against the captured state
  • Create eval sets - Label traces and export them for testing

Connect Slack Feedback

When customers report issues in Slack, Artanis automatically matches them to traces:
  1. Install the Artanis Slack bot in your workspace
  2. When feedback arrives, the bot finds the relevant trace
  3. View the feedback directly in your trace timeline
No manual linking required - the bot uses smart matching to connect feedback to the right traces based on timing and context.

Next Steps

Now that you have tracing set up, explore these resources: