DEV Community

Ekrem MUTLU
Ekrem MUTLU

Posted on • Originally published at eqhoids.com

How to Give Your AI Agent a Real Identity in 5 Minutes

How to Give Your AI Agent a Real Identity in 5 Minutes

You've built an AI agent. It can reason, call tools, and handle tasks. But the moment you need it to actually talk to someone -- send a Telegram message, receive an email reply, deliver a voice note -- you're suddenly knee-deep in bot registration, SMTP configs, and webhook plumbing.

I kept running into this with my own projects. The agent logic was straightforward. The communication layer was always the time sink. So I built EqhoIDs -- one API to provision a full real-world identity for any AI agent.

This tutorial walks through setting up an agent that can communicate via Telegram and email in under 5 minutes.

What You'll Build

An AI agent identity with:

  • A Telegram bot that can send and receive messages
  • A dedicated email address (yourbot@eqhoids.com)
  • A webhook that receives all inbound messages from both channels

Prerequisites

Step 1: Install the SDK

Python:

pip install eqhoids
Enter fullscreen mode Exit fullscreen mode

Node.js:

npm install eqhoids
Enter fullscreen mode Exit fullscreen mode

We'll use Python for this tutorial, but the Node.js SDK mirrors the same API.

Step 2: Create an Agent Identity

This is the core of EqhoIDs -- one call to create an agent with a dedicated email address and webhook support.

Using curl:

curl -X POST https://eqhoids.com/v1/agents \
  -H "X-API-Key: eqho_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "my-assistant", "description": "Project support agent"}'
Enter fullscreen mode Exit fullscreen mode

Response:

{
  "id": "8337007e-0fe3-41ef-...",
  "name": "my-assistant",
  "email_address": "my-assistant-a1b2c3@eqhoids.com",
  "telegram_enabled": true,
  "email_enabled": true,
  "webhook_url": null,
  "is_active": true
}
Enter fullscreen mode Exit fullscreen mode

Using the Python SDK:

from eqhoids import EqhoIDs

client = EqhoIDs(api_key="eqho_YOUR_KEY")

agent = client.create_agent(
    name="my-assistant",
    description="Project support agent"
)

print(f"Agent ID: {agent['id']}")
print(f"Email: {agent['email_address']}")
Enter fullscreen mode Exit fullscreen mode

The agent gets a unique email address automatically. Now let's set a webhook and optionally connect Telegram.

Step 3: Configure Webhook and Telegram

Set your webhook URL (where inbound messages will be delivered):

client.update_agent(agent["id"], webhook_url="https://your-server.com/webhook")
Enter fullscreen mode Exit fullscreen mode

Connect a Telegram bot (bring your own bot token from @botfather):

client.connect_telegram(agent["id"], bot_token="123456:ABC-DEF...")
Enter fullscreen mode Exit fullscreen mode

Now your agent can receive messages via Telegram and email, both forwarded to your webhook.

Step 4: Send a Message

Your agent can send messages through any connected channel.

Send a Telegram message:

client.send_message(
    agent_id=agent["id"],
    to="123456789",  # Telegram user/chat ID
    content="Hello! I'm your project assistant. How can I help?",
    channel="telegram"
)
Enter fullscreen mode Exit fullscreen mode

Using curl:

curl -X POST https://eqhoids.com/v1/messages/send \
  -H "X-API-Key: eqho_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "8337007e-0fe3-41ef-...",
    "channel": "telegram",
    "to": "123456789",
    "content": "Hello from my agent!"
  }'
Enter fullscreen mode Exit fullscreen mode

Send a voice message (Pro plan, powered by ElevenLabs):

client.send_message(
    agent_id=agent["id"],
    to="123456789",
    content="This text will be converted to speech and sent as audio.",
    channel="telegram",
    voice=True
)
Enter fullscreen mode Exit fullscreen mode

Step 5: Receive Messages via Webhook

When someone messages your agent on Telegram or sends an email to its address, EqhoIDs delivers the message to your webhook URL as a POST request with HMAC signature verification.

The payload for a Telegram message:

{
  "event_type": "message.received",
  "agent_id": "8337007e-0fe3-41ef-...",
  "channel": "telegram",
  "from_id": "123456789",
  "content": "Can you check the build status?",
  "content_type": "text"
}
Enter fullscreen mode Exit fullscreen mode

Here's a minimal Flask handler that replies automatically:

from flask import Flask, request, jsonify
from eqhoids import EqhoIDs

app = Flask(__name__)
client = EqhoIDs(api_key="eqho_YOUR_KEY")

@app.route("/webhook", methods=["POST"])
def handle_message():
    data = request.json
    agent_id = data["agent_id"]
    channel = data["channel"]
    from_id = data["from_id"]
    text = data["content"]

    # Process the message with your AI logic
    response_text = your_ai_function(text)

    # Reply through the same channel
    client.send_message(
        agent_id=agent_id,
        to=from_id,
        content=response_text,
        channel=channel
    )

    return jsonify({"status": "ok"})
Enter fullscreen mode Exit fullscreen mode

That's it. Your agent now has a persistent identity that people can reach through Telegram or email, and you can process and reply to messages programmatically.

What You'd Normally Have to Do

For context, here's what EqhoIDs replaces:

  1. Telegram: Register a bot with BotFather, store the token, set up a webhook URL, parse Update objects, handle message types, manage chat IDs
  2. Email: Set up SMTP for sending, configure inbound email routing (MX records, email workers), parse MIME messages, handle bounces
  3. Voice: Choose a TTS provider (ElevenLabs, Google, etc.), manage API keys, handle audio encoding, deliver audio files through channels
  4. Webhook routing: Build a router that normalizes messages from different sources into a common format, implement HMAC verification

Each one of these is a day of work at minimum, plus ongoing maintenance. EqhoIDs handles all of it behind one API with one X-API-Key header.

Pricing

Plan Monthly Agents Messages Channels
Starter $19 1 500 Telegram, Email
Pro $49 5 5,000 + Voice
Business $99 25 25,000 All channels

Wrapping Up

The gap between "AI agent that can think" and "AI agent that can communicate" shouldn't take days to close. EqhoIDs exists to make that gap trivially small.

If you're building agents that need real-world communication channels, I'd genuinely like to hear what's working and what's missing. Drop a comment or reach out through the site.

Top comments (0)