For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign inBook a demo
DocsReferenceChangelog
DocsReferenceChangelog
  • Introduction
    • Overview
    • Errors
  • SDK
    • Overview
    • Decorators
      • Flow
      • Prompt
      • Tool
    • Run Evaluation
  • API
LogoLogo
Sign inBook a demo
On this page
  • Introduction
  • Common Patterns
SDK

Decorators Overview

Auto-instrumentation for AI features

Was this page helpful?
Previous

Flow Decorator

Automatic tracing for AI features
Next
Built with

Introduction

Humanloop provides a set of decorators that help you instrument your AI features with minimal code changes. These decorators automatically create and manage Logs on the Humanloop platform, enabling monitoring, evaluation, and improvement of your AI applications.

DecoratorPurposeCreatesDocumentation
promptInstrument LLM provider callsPrompt LogsLearn more →
toolDefine function calling toolsTool LogsLearn more →
flowTrace multi-step AI featuresFlow Log with tracesLearn more →

Common Patterns

All decorators share these common characteristics:

  • Path-based organization: Each decorator requires a path parameter that determines where the File and its Logs are stored in your Humanloop workspace.
  • Automatic versioning: Changes to the decorated function or its parameters create new versions of the File.
  • Error handling: Errors are caught and logged, making debugging easier.
  • Minimal code changes: Decorate existing code and adopt the Humanloop SDK gradually.