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.

In this guide, you’ll trigger a Friday workflow from your application, stream its progress in real time, and retrieve the results.

Prerequisites

  • Friday platform installed and running
  • At least one space loaded with a signal configured (Friday ships with starter spaces you can use)
  • The daemon API is available at http://localhost:18080
Friday ships with starter spaces for pull request code review and Jira bug fixes. You can use any of these to follow along — replace the workspace and signal IDs in the examples with your own. Run curl http://localhost:18080/api/workspaces to see what’s loaded.

Trigger a signal

Every workflow in Friday starts with a signal. Your application sends a POST request with a payload, Friday runs the job, and returns results via JSON or a real-time stream.

Asynchronous request

Send a POST request and get a JSON response when the job completes:
curl -X POST http://localhost:18080/api/workspaces/frozen_taco/signals/fix-bug \
  -H 'Content-Type: application/json' \
  -d '{
    "payload": {
      "issue_key": "PROJ-123",
      "repo_url": "https://bitbucket.org/myteam/myrepo"
    }
  }'
Response:
{
  "message": "Signal completed",
  "status": "completed",
  "workspaceId": "frozen_taco",
  "signalId": "fix-bug",
  "sessionId": "sess_abc123"
}
The request blocks until the job finishes. For long-running jobs, use SSE streaming or trigger the signal and poll for status separately.

Stream results in real time

Add the Accept: text/event-stream header to get a real-time SSE stream as the job executes:
curl -N -X POST http://localhost:18080/api/workspaces/frozen_taco/signals/fix-bug \
  -H 'Content-Type: application/json' \
  -H 'Accept: text/event-stream' \
  -d '{"payload": {"issue_key": "PROJ-123"}}'
SSE event stream:
data: {"type":"data-session-start","data":{"sessionId":"sess_abc123"}}

data: {"type":"text-delta","delta":"Reading Jira ticket..."}

data: {"type":"job-complete","data":{"success":true,"sessionId":"sess_abc123","status":"completed"}}

data: [DONE]
Intermediate events follow the Vercel AI SDK UIMessageChunk format (text-delta, tool-input-available, tool-output-available, etc.). Atlas adds custom data events prefixed with data- (e.g. data-session-start, data-agent-start).

Check run status

After triggering a signal, use the sessionId from the response to check on the run.

Get run details

curl http://localhost:18080/api/sessions/sess_abc123

List runs for a space

curl 'http://localhost:18080/api/sessions?workspaceId=frozen_taco'

Cancel a running job

curl -X DELETE http://localhost:18080/api/sessions/sess_abc123

Retrieve artifacts

Agents can produce artifacts — summaries, reports, database files, and other data generated during a run.

List artifacts

curl 'http://localhost:18080/api/artifacts?workspaceId=frozen_taco&limit=10'

Get an artifact

curl http://localhost:18080/api/artifacts/art_xyz

Export a database artifact as CSV

Artifacts created from CSV uploads are stored as SQLite databases. Use the /export endpoint to download them back as CSV:
curl -o export.csv http://localhost:18080/api/artifacts/art_xyz/export

Upload a file

curl -X POST http://localhost:18080/api/artifacts/upload \
  -F 'file=@data.csv' \
  -F 'workspaceId=frozen_taco'
Supported file types include CSV, PDF, DOCX, PPTX, images, audio, and plain text. CSV files are automatically converted to SQLite databases for use with the Data Analyst agent.

Send a chat prompt

You can also send freeform prompts to a space. The response streams back via SSE.
curl -N -X POST http://localhost:18080/api/workspaces/frozen_taco/chat \
  -H 'Content-Type: application/json' \
  -d '{
    "id": "chat-001",
    "message": {
      "role": "user",
      "content": "What signals are configured in this space?"
    }
  }'
Use the same id to continue a conversation across multiple messages.

Common patterns

CI/CD: trigger a code review on every pull request

Call the Friday API from a GitHub Actions workflow to review pull requests automatically:
.github/workflows/friday-review.yml
name: Friday PR Review
on:
  pull_request:
    types: [opened, synchronize]

jobs:
  review:
    runs-on: ubuntu-latest
    steps:
      - name: Trigger Friday review
        run: |
          curl -X POST "${{ secrets.FRIDAY_URL }}/api/workspaces/${{ secrets.FRIDAY_WORKSPACE }}/signals/review-pr" \
            -H 'Content-Type: application/json' \
            -d "{\"payload\": {\"pr_url\": \"${{ github.event.pull_request.html_url }}\"}}"
Set FRIDAY_URL to your daemon’s public URL (the webhook tunnel URL if running locally) and FRIDAY_WORKSPACE to your space ID.

Backend service: trigger and poll

For backend services that need to trigger a job and wait for the result:
interface SignalResult {
  sessionId: string;
  status: string;
}

interface Session {
  status: "completed" | "running" | "failed";
  [key: string]: unknown;
}

async function runFridayJob(
  workspaceId: string,
  signalId: string,
  payload: Record<string, unknown>
): Promise<Session> {
  // 1. Trigger the signal
  const triggerResponse = await fetch(
    `http://localhost:18080/api/workspaces/${workspaceId}/signals/${signalId}`,
    {
      method: "POST",
      headers: { "Content-Type": "application/json" },
      body: JSON.stringify({ payload }),
    }
  );

  if (!triggerResponse.ok) {
    throw new Error(`Failed to trigger signal: ${triggerResponse.status}`);
  }

  const { sessionId } = (await triggerResponse.json()) as SignalResult;

  // 2. Poll for completion
  while (true) {
    const session: Session = await fetch(
      `http://localhost:18080/api/sessions/${sessionId}`
    ).then((r) => r.json());

    if (session.status === "completed") return session;
    if (session.status === "failed") throw new Error("Job failed");

    await new Promise((r) => setTimeout(r, 2000));
  }
}

// Usage
const result = await runFridayJob("frozen_taco", "fix-bug", {
  issue_key: "PROJ-123",
});
For production use, prefer SSE streaming over polling — it’s more efficient and gives you real-time progress.

Discover spaces and signals

Before triggering signals, you may need to find which spaces and signals are available:
# List all spaces
curl http://localhost:18080/api/workspaces

# Get a space's full config (includes signals, jobs, agents)
curl http://localhost:18080/api/workspaces/frozen_taco
The workspace response includes the signals object with each signal’s schema — use this to know what payload fields are expected.

Next steps

API reference

Full endpoint reference with request and response schemas for every API operation.

Signals

Learn about signal types — webhooks, cron schedules, Slack triggers, and more.

Spaces

Understand how spaces organize agents, jobs, and signals into deployable units.

Jobs

How jobs compose agents into multi-step pipelines with data contracts.