Skip to content

Latest commit

 

History

History
40 lines (28 loc) · 1.75 KB

File metadata and controls

40 lines (28 loc) · 1.75 KB

Follow-up Messaging

Follow-up messages are generated by an agentic system powered by the configured LLM. There is no per-account template file — the agent decides what to say based on conversation history, campaign context, and the lead's profile.

How It Works

When a connected lead is due for follow-up, the daemon runs a ReAct agent (linkedin/agents/follow_up.py) that can:

  1. Read the conversation history with the lead.
  2. Send one or more short messages — human-like LinkedIn DMs (1-3 sentences each).
  3. Mark the conversation as completed — when the lead booked, declined, or went cold.
  4. Schedule the next follow-up — to check back later.

The agent's behavior is guided by a system prompt template at linkedin/templates/prompts/follow_up_agent.j2, which receives campaign context (product docs, objective, booking link) and lead profile data.

Configuration

Follow-up behavior is controlled by:

  • Campaign fields (via Django Admin or onboarding):

    • product_docs — product/service description, used as context for the agent.
    • campaign_objective — campaign goal, used as context for the agent.
    • booking_link — included naturally in messages when suggesting a meeting.
  • LLM settings (via .env or environment variables):

    • LLM_API_KEY — required for the agent to function.
    • AI_MODEL — model used for message generation.
    • LLM_API_BASE — optional base URL for OpenAI-compatible providers.

Available Variables in the System Prompt

The agent template receives specific named variables (self_name, full_name, headline, current_company, location, messages_exchanged), not the full profile dict.

See the Template Variables Reference for the complete list.