Profile

Generate a summary

Retrieve a deterministic, LLM-ready summary of a user’s memory and context. This endpoint compiles all available user data — including events, documents, and inferred traits — into a concise, text-based summary optimized for downstream reasoning and personalization.

GET /summary

Purpose

Use this endpoint when your agent or system needs a stable, up-to-date overview of a user.
Summaries are ideal for:

  • Initializing LLM prompts with consistent background context.

  • Providing user-aware grounding for reasoning and scheduling.

  • Generating cached, deterministic representations of the user profile.

Each summary is tuned to a purpose (e.g., work-style, persona, or preferences) and can be truncated to a specified length.

Endpoint

Headers

Authorization: x-api-key: <token>

Query Parameters

Parameter

Type

Required

Description

user_id

string

Yes

Unique identifier of the user.

purpose

string

Optional

Defines what kind of summary to generate (work-style, persona, decision-style, etc.).

max_chars

integer

Optional

Limit the character length of the returned summary.

freshness_days

integer

Optional

Restrict the summary to data ingested within a certain time window (e.g., 30 for the last 30 days).

Example Request

Example cURL

curl "https://api.fastino.ai/summary?user_id=usr_42af7c&purpose=work-style&max_chars=1000" \
  -H "Authorization: x-api-key: sk_test_123" \
  -H "Content-Type: application/json"

Example Response

{
  "user_id": "usr_42af7c",
  "generated_at": "2025-10-11T16:05:00Z",
  "purpose": "work-style",
  "summary": "Ash Lewis is a founder-engineer who prefers concise, async communication. Works best in deep-focus blocks (9–12 PT) and schedules meetings after 1 PM."
}

Response Fields

Field

Type

Description

user_id

string

The user ID this summary was generated for.

generated_at

string

ISO 8601 UTC timestamp when the summary was generated.

purpose

string

The purpose tag for this summary (e.g., persona, work-style).

summary

string

Deterministic text summary of the user’s preferences, habits, or behavior.

Behavior

  • Summaries are deterministic — given the same input data, you’ll receive the same output.

  • If no purpose is specified, the default general summary is returned.

  • The response text can be safely embedded in model prompts or serialized into other systems.

  • Summaries refresh automatically as new ingested data becomes available.

Error Responses

HTTP Code

Error Code

Description

400

INVALID_REQUEST

Missing or malformed query parameters.

401

UNAUTHORIZED

Invalid or missing API key.

404

USER_NOT_FOUND

No profile data found for the given user_id.

500

SERVER_ERROR

Internal error — retry after short delay.

Example:

{
  "error": {
    "code": "USER_NOT_FOUND",
    "message": "No user found with ID usr_42af7c"
  }
}

Example Implementation (Python)

import requests

BASE_URL = "https://api.fastino.ai"
HEADERS = {"Authorization": "x-api-key: sk_live_456"}

params = {
    "user_id": "usr_42af7c",
    "purpose": "work-style",
    "max_chars": 1000,
    "freshness_days": 365
}

r = requests.get(f"{BASE_URL}/summary", params=params, headers=HEADERS)
print(r.json()["summary"])

Best Practices

  • Use meaningful purpose values to tailor the summary for specific agent tasks (e.g., persona, decision-style, schedule-context).

  • Cache summaries locally when used frequently; they update only when new data is ingested.

  • Keep max_chars under 2000 for efficient model embedding and prompt usage.

  • Use freshness_days for time-sensitive applications to limit the data window.

  • If building with multiple agents, standardize purpose tags for consistency.

Related Endpoints

Endpoint

Description

POST /query

Ask a natural-language question about the user.

POST /chunks

Retrieve top-k user snippets for grounding.

POST /ingest

Feed new user data for learning and summary updates.

Summary:
Use GET /summary to generate a structured, purpose-specific summary of any user.
These summaries are deterministic, composable, and ideal for grounding model behavior and agent reasoning.

On this page