Link copied!
AI

Amigo: Universal Marketing AI Bot

A universal Telegram bot leveraging Mastra workflows, knowledge graph memory, and multi-provider aggregation for marketing tasks.

C
Croco.Team · 4 min read · May 2026
01

What is Amigo?

Amigo is Croco.Team's universal Telegram bot for marketing operations. Rather than separate tools for content, social media, and analytics, Amigo provides a unified interface to everything a modern marketing team needs — driven by AI and augmented by persistent memory.

02

Command System

Amigo exposes 20+ commands covering the complete marketing workflow:

/trends surfaces current trending topics relevant to your industry, with source attribution and engagement metrics. /content generates content ideas, outlines, and full drafts based on trending signals and campaign requirements. /script creates video scripts, podcast outlines, and presentation narratives. /reels generates short-form video concepts optimized for TikTok, Instagram Reels, and YouTube Shorts.

/image prompts AI image generation for social posts, ads, and marketing materials. /plan creates detailed marketing plans with timelines, resource requirements, and success metrics. /analyze provides audience insights, competitor analysis, and performance diagnostics.

/search performs deep research across multiple sources simultaneously. /translate handles content translation with cultural adaptation rather than literal word-for-word conversion. /marketing generates multi-channel campaign copy adapted for each platform's requirements. /twitter creates optimized tweets, threads, and replies. /linkedin produces professional posts, articles, and engagement strategies.

Additional commands cover blog content, note-taking, memory management, and integration with external services like Notion and Google Workspace.

03

Multi-Source Aggregation

The bot aggregates content and data from multiple sources:

SociaVault provides Twitter, Reddit, and TikTok content streams with engagement analytics and trend detection. HikerAPI connects to Instagram for competitor monitoring and content inspiration. YouTube API enables video research, transcript extraction, and trending video analysis. Firecrawl handles web research and competitor content monitoring. OpenRouter serves as the primary LLM interface with access to multiple models through a single API.

Each source maintains cached results with 30-minute expiration, avoiding redundant API calls while ensuring freshness for time-sensitive work.

04

Knowledge Graph Memory

Amigo maintains a persistent knowledge graph backed by PostgreSQL with pgvector for semantic search. Entity extraction identifies people, companies, products, and concepts mentioned in conversations. Relationship tracking builds connections between entities over time.

The memory system enables Amigo to reference previous conversations, remember user preferences, and build on established context. Rather than starting each interaction cold, the bot accumulates organizational knowledge that benefits all team members.

Outline integration provides additional memory — notes, journals, and folders sync bidirectionally with the Outline wiki server. New pages created in Outline become searchable in Amigo; conversations in Amigo can create or update Outline pages.

05

Model Architecture

Amigo uses 10 distinct model roles rather than hardcoding specific models:

Chat handles conversational interactions with warmth and context awareness. Structured drives JSON-output tasks, form completion, and data extraction. Writer produces marketing copy, blog posts, and social content. Plan generates project plans, strategies, and roadmaps. Translate manages cross-lingual content with cultural adaptation.

Marketing optimizes campaigns, analyzes funnels, and generates conversion-focused copy. Embedding creates vector representations for semantic search and similarity detection. Image handles image generation prompts. Voice processes audio transcription and synthesis. Video manages video analysis and clip generation.

06

Workflow Pipeline

All output passes through a format-output filter that applies LLM-based transformation — ensuring consistent tone, correct formatting, and appropriate detail levels. A polish-output step applies regex transformations and additional LLM cleanup for final refinement.

The pipeline ensures consistent quality regardless of which underlying model generated the initial response.

07

Critical Configuration Note

When using reasoning models through OpenRouter, the @preset/manager must have Reasoning set to OFF. Reasoning models sometimes return null content, breaking the bot's expectations. Disabling reasoning ensures stable output for all operations.

08

Deployment

Amigo runs in Docker Compose with three services: the bot itself on port 50501, PostgreSQL with pgvector on port 50504, and the Outline wiki server on port 50505. The Mastra workflow orchestration (pinned to v1.33.1) coordinates multi-step tasks across the agent system.

C
Croco.Team

Continue Reading
Link copied!