<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/build-your-own-personal-assistant-2oqdu8xuc" -->

---
title: Build your own personal assistant | daily.dev
description: A walkthrough shows how to build a personal assistant bot on top of the AgentField control plane: a ~20-line stateless reasoner that uses session-scoped memory...
canonical: https://daily.dev/posts/build-your-own-personal-assistant-2oqdu8xuc
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Build your own personal assistant | daily.dev
og:description: A walkthrough shows how to build a personal assistant bot on top of the AgentField control plane: a ~20-line stateless reasoner that uses session-scoped memory...
og:url: https://daily.dev/posts/build-your-own-personal-assistant-2oqdu8xuc
og:image: https://api.daily.dev/og/posts/2Oqdu8Xuc.png
og:image:alt: Build your own personal assistant
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Build your own personal assistant

**[AgentField.ai](https://daily.dev/sources/agentfield)** · 8 min read · 0 upvotes · 0 comments

## Summary

A walkthrough shows how to build a personal assistant bot on top of the AgentField control plane: a ~20-line stateless reasoner that uses session-scoped memory (keyed by an X-Session-ID header) to remember recent chat turns, combined with a ~70-line Telegram bridge (plain httpx, no SDK) that long-polls getUpdates and forwards messages to the reasoner's execute endpoint. The reasoner uses tools="discover" to call other registered agents dynamically. Includes full code for both the reasoner and bridge, curl commands to verify per-session memory, and guidance on switching from long-polling to Telegram webhook mode (via AgentField's generic_bearer source) when running on a server instead of a laptop.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://agentfield.ai/blog/build-your-own-personal-assistant>

## Questions this post answers

### How do I give an LLM-based chat assistant memory of previous messages in the same conversation?

Use a session id that stays stable per conversation (for example, a Telegram chat id) and scope memory storage to that id. On each message, load the stored history for that session, append the new user message, call the model with the recent history as context, then store the updated history back under the same session key so the next call sees it.

_Developers wiring up memory for chat agents compare approaches like this on daily.dev._

### How do I connect a Telegram bot to a custom AI agent backend without using a chat SDK?

Write a small bridge that long-polls Telegram's getUpdates endpoint, posts each incoming message as a plain HTTP request to your agent's execute endpoint with a per-chat session header, then sends the returned reply back via Telegram's sendMessage endpoint. A full working version is about 70 lines of Python using only httpx, no Telegram SDK required, and advances Telegram's offset per update_id to avoid reprocessing messages.

_Anyone scripting a chatbot bridge can browse similar integration patterns on daily.dev._

### Should I use long polling or webhooks for a Telegram bot backend?

Start with long polling, since it works from a laptop behind NAT with no public URL and requires no extra infrastructure. Switch to webhook mode only once the bot needs to run always-on from a server; Telegram then POSTs updates to a public URL, authenticated via the X-Telegram-Bot-Api-Secret-Token header which can be verified against a generic bearer-token source that rejects unsigned requests with a 401.

_Developers deciding between polling and webhooks for bot infrastructure can find more on daily.dev._

## Similar posts on daily.dev

- [Personal, Agentic Assistants: A Practical Blueprint for a Secure, Multi-User, Self-Hosted Chatbot](https://daily.dev/posts/personal-agentic-assistants-a-practical-blueprint-for-a-secure-multi-user-self-hosted-chatbot-zqvpgegff) · Towards Data Science · 3 upvotes · 0 comments
- [How I Built an Agentic AI Research Assistant Using LangGraph and Large Language Models](https://daily.dev/posts/how-i-built-an-agentic-ai-research-assistant-using-langgraph-and-large-language-models-dg5wempfs) · Medium · 0 upvotes · 0 comments
- [One Telegram contact to rule my team of AI agents](https://daily.dev/posts/one-telegram-contact-to-rule-my-team-of-ai-agents-qgiolsxxe) · RUBYLAND · 1 upvotes · 0 comments

---

Tags: [#python](https://daily.dev/tags/python), [#ai-agents](https://daily.dev/tags/ai-agents)

[View this post on daily.dev](https://daily.dev/posts/build-your-own-personal-assistant-2oqdu8xuc)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Build your own personal assistant","url":"https://daily.dev/posts/build-your-own-personal-assistant-2oqdu8xuc","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/build-your-own-personal-assistant-2oqdu8xuc"},"datePublished":"2026-10-02T17:45:21.896Z","dateModified":"2026-10-03T17:36:43.697Z","description":"A walkthrough shows how to build a personal assistant bot on top of the AgentField control plane: a ~20-line stateless reasoner that uses session-scoped memory...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/0816149cfd2ddf68cf9810ffab724c8b?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/0816149cfd2ddf68cf9810ffab724c8b?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"AgentField.ai","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"AgentField.ai","logo":"https://media.daily.dev/image/upload/s--VLFHaedl--/f_auto/v1791063152/squads/33beeb91-1f14-4d9b-9cf8-db7d9f69160a?_a=BAMAMicg0","url":"https://daily.dev/squads/agentfield"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/build-your-own-personal-assistant-2oqdu8xuc","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"python,ai-agents","timeRequired":"PT8M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"AgentField.ai","item":"https://daily.dev/squads/agentfield"},{"@type":"ListItem","position":3,"name":"Build your own personal assistant"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/build-your-own-personal-assistant-2oqdu8xuc#faq","mainEntity":[{"@type":"Question","name":"How do I give an LLM-based chat assistant memory of previous messages in the same conversation?","acceptedAnswer":{"@type":"Answer","text":"Use a session id that stays stable per conversation (for example, a Telegram chat id) and scope memory storage to that id. On each message, load the stored history for that session, append the new user message, call the model with the recent history as context, then store the updated history back under the same session key so the next call sees it. Developers wiring up memory for chat agents compare approaches like this on daily.dev."}},{"@type":"Question","name":"How do I connect a Telegram bot to a custom AI agent backend without using a chat SDK?","acceptedAnswer":{"@type":"Answer","text":"Write a small bridge that long-polls Telegram's getUpdates endpoint, posts each incoming message as a plain HTTP request to your agent's execute endpoint with a per-chat session header, then sends the returned reply back via Telegram's sendMessage endpoint. A full working version is about 70 lines of Python using only httpx, no Telegram SDK required, and advances Telegram's offset per update_id to avoid reprocessing messages. Anyone scripting a chatbot bridge can browse similar integration patterns on daily.dev."}},{"@type":"Question","name":"Should I use long polling or webhooks for a Telegram bot backend?","acceptedAnswer":{"@type":"Answer","text":"Start with long polling, since it works from a laptop behind NAT with no public URL and requires no extra infrastructure. Switch to webhook mode only once the bot needs to run always-on from a server; Telegram then POSTs updates to a public URL, authenticated via the X-Telegram-Bot-Api-Secret-Token header which can be verified against a generic bearer-token source that rejects unsigned requests with a 401. Developers deciding between polling and webhooks for bot infrastructure can find more on daily.dev."}}]}
```

