Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.hellofriday.ai/llms.txt

Use this file to discover all available pages before exploring further.

Write agents in Python — the Friday platform handles the rest. Your agent runs as a Python subprocess with access to LLMs, HTTP, and MCP tools through the ctx interface.

How it works

Your agent is a Python function with two inputs and one output:
def execute(prompt: str, ctx: AgentContext) -> Result:
    # prompt: what the job FSM passed as input
    # ctx:    bridges to Friday's capabilities (LLMs, HTTP, MCP tools)
    # Result: structured data back to the platform
The @agent decorator registers your function with Friday. Call run() in the __main__ block — that’s how the subprocess connects to the daemon.

Quick example

agent.py
from friday_agent_sdk import agent, ok, AgentContext

@agent(
    id="my-agent",
    version="1.0.0",
    description="Summarizes text with an LLM",
)
def execute(prompt: str, ctx: AgentContext):
    result = ctx.llm.generate(
        messages=[{"role": "user", "content": f"Summarize this: {prompt}"}],
        model="anthropic:claude-haiku-4-5",
    )
    return ok({"summary": result.text})

if __name__ == "__main__":
    from friday_agent_sdk import run
    run()
The @agent decorator registers metadata. Host capabilities on ctx handle LLM calls, HTTP requests, MCP tools, and streaming. ok() returns structured data to the platform.

Development setup

Install the SDK locally for IDE support. The SDK is a Python package — Friday runs your agent as a subprocess, but you need the package locally for autocomplete and type checking. 1. Clone the SDK repository:
git clone git@github.com:friday-platform/agent-sdk.git ~/agent-sdk
2. Create a virtual environment and install the SDK:
cd my-agent-project
uv venv
source .venv/bin/activate  # or: .venv\Scripts\activate on Windows
uv pip install -e ~/agent-sdk/packages/python
3. Configure VS Code: Create .vscode/settings.json in your agent project:
{
  "python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python",
  "python.analysis.typeCheckingMode": "basic",
  "[python]": {
    "editor.defaultFormatter": "charliermarsh.ruff",
    "editor.formatOnSave": true
  }
}
Install the Ruff extension for linting and formatting. Reload VS Code after creating the settings. Verify: Open any .py file and check that from friday_agent_sdk import agent shows no import errors.
Let an agent write your agent. The writing-friday-python-agents skill works in Claude Code and other coding agents. It covers the full SDK, so agents you generate register cleanly the first time.

Prerequisites

  • Python 3.11+ (for IDE support and local testing)
  • A running Friday daemon (friday daemon status)
  • An Anthropic API key

Get started

Quickstart

Build a text analysis agent from scratch in under 10 minutes.

How agents work

The subprocess model, host capabilities, and registration.

Guides

Call LLMs

Models, structured output, error handling.

HTTP requests

External API calls through the fetch layer.

MCP tools

GitHub, databases, and other MCP servers.

Structured input

Parse JSON from enriched prompts.

Stream progress

Real-time UI updates during execution.

Reference

@agent decorator

Metadata, environment, MCP, and LLM configuration.

AgentContext

Execution context and capability availability.

ctx.llm

LLM generation methods and response types.

ctx.http

HTTP fetch and response handling.

ctx.tools

MCP tool listing and invocation.

ctx.stream

Progress and intent emission.

Result types

ok(), err(), and AgentExtras.

Parse utilities

parse_input() and parse_operation().