Template Variables Reference

May 19, 2026 · View on GitHub

This document describes the variables available in the follow-up agent's system prompt template (linkedin/templates/prompts/follow_up_agent.j2) and the data structures from LinkedIn's Voyager API.

Agent System Prompt Variables

The follow-up agent template receives these named variables (not a spread profile dict):

VariableTypeDescriptionExample
self_namestringThe logged-in user's name (from /in/me/ marker)"Jane Doe"
product_docsstringProduct/service description from Campaign
campaign_objectivestringCampaign goal from Campaign
booking_linkstringCalendar link from Campaign"https://www.cal.eu/your-link/15min"
full_namestringLead's first + last name"John Smith"
headlinestring or nullLead's profile headline"VP of Engineering at Acme"
current_companystring or nullCompany from first position"Acme Corp"
locationstring or nullLocation as displayed on profile"San Francisco, California"
messages_exchangedintegerTotal number of messages exchanged with this lead (inbound + outbound)5

Voyager API Profile Structure

The profile data parsed by linkedin/api/voyager.py contains the following fields. These are stored in Lead.profile_data (JSONField) and used internally for enrichment and qualification, though only a subset is passed to the agent template.

Top-Level Fields

FieldTypeDescription
first_namestringFirst name
last_namestringLast name
full_namestringFirst + last name combined
headlinestring or nullProfile headline / tagline
summarystring or nullThe "About" section text
public_identifierstring or nullLinkedIn handle (URL slug)
urlstringFull LinkedIn profile URL
location_namestring or nullLocation as displayed on profile
geodict or nullStructured geographic info
industrydict or nullIndustry info
positionslist of dictsWork experience entries
educationslist of dictsEducation entries
connection_degreeint or nullConnection degree (1 = connected, 2 = 2nd, 3 = 3rd)
connection_distancestring or nullRaw distance value from the API
urnstringLinkedIn internal URN identifier

Positions

Each entry in the positions list:

FieldTypeDescription
titlestringJob title
company_namestringCompany name
company_urnstring or nullLinkedIn URN for the company
locationstring or nullPosition-specific location
descriptionstring or nullRole description text
date_rangedict or nullStart/end dates (see below)
urnstring or nullLinkedIn internal URN for this position

Educations

Each entry in the educations list:

FieldTypeDescription
school_namestringSchool or university name
degree_namestring or nullDegree type
field_of_studystring or nullField/major
date_rangedict or nullStart/end dates (see below)
urnstring or nullLinkedIn internal URN

Date Range

Position and education entries may have a date_range dict:

{
  "start": {"year": 2020, "month": 3},
  "end": {"year": 2024, "month": 12}
}
  • start and end are dicts with year (int or null) and month (int or null).
  • A null end means the position is current.

Geo and Industry

The geo and industry fields are dicts with API-specific keys:

geo.defaultLocalizedNameWithoutCountryName  →  "San Francisco Bay Area"
industry.name                                →  "Computer Software"

Null Safety

Many fields can be null. In Jinja2 templates, use the default filter or conditional checks:

{{ headline | default("a professional") }}
{% if positions %}Current company: {{ positions[0].company_name }}{% endif %}