Filsfils(1) for people who read the source

Your own AI agent, on your own server.

Fils is the full source of a Telegram agent built on Claude Code. One script puts it on a Linux server you control. Read every line, change any of it, keep all of it.

You also pay for a server, about $6 a month, and a Claude subscription, from $20 a month. Both in your name, nothing to us after the $49.

$ git clone git@github.com:you/fils.git && cd fils
$ cp .env.example .env    # bot token, group id, OpenAI key
$ bash deploy.sh          # Node, Claude Code, systemd units
$ systemctl start openviking paperclip claude-bridge
$ journalctl -u claude-bridge | grep MENU
[MENU] published 7 commands: new, hire, ask, compact, mute, unmute, claude_login
Install, start to the bot's first log line.Example output

Install

Four things before you run deploy.sh. The step-by-step guide in the repo covers creating each account, the smoke test and troubleshooting.

Then finish in Telegram. After this you manage the agent by talking to it.

/claude_login      # sign in to Claude from the chat, the token survives restarts
/new               # this topic now has its own session
/hire researcher   # a worker of its own for this topic

The repo

This is the file list from the repo's README, with the places you will actually open marked in pencil.

.env.examplecopy to .env and fill instart here
deploy.shone-shot remote bootstrapset your server IP
hire-agent.shCLI helper to create Paperclip agents
run-worker.shstarts a single worker process
mcp-config.jsonMCP servers wired into every agent
openviking-mcp.mjsmemory_recall / memory_store over MCP
set-session.mjswrites per-agent session metadata
src/TypeScript: bridge, sessions, agents, schedulerthe bridge itself
package.jsonbridge dependencies
.claude/skills/one folder per skillnew folder = new skill
├── browser-use/browser automation playbook
├── gmail/Gmail REST API helpers
├── google-calendar/Calendar REST API helpers
├── image-gen/image generation
├── video-gen/short-form video generation
├── job-scheduling/job schema, UTC cron, report-on-change
├── file-delivery/file processing, QA before attaching
├── whatsapp-ops/liveness check, pairing, reply watches
└── tg-watch/your Telegram account over HTTP
server-files/everything that lives on the box
├── gowa/WhatsApp engine, unit + .env template
├── wa-watchdog/30-min link check, Telegram alerts
├── hooks/now-hook.pyexact date and weekday in every prompt
├── memory-selftest/hourly memory recall self-test
├── shared-rules.mdappended to every agent's prompthouse rules
└── scheduled-jobs.jsonseed for the scheduler
agent-prompts/example worker identitiescopy one, rename it
├── spanish-teacher/CLAUDE.md
├── media-creator/CLAUDE.md
└── hourly-reviewer/CLAUDE.md

Shortened: a few launcher scripts and the resource-hub folder are left out here. Secret files (Google OAuth client, Gemini and fal keys) are not in the repo; you drop them on the server.

What it does

Topics are agents
Each topic in your Telegram group gets its own persistent Claude Code session. A lead agent owns every topic until you /hire <name> a worker for it.
Memory
Long-term semantic memory (OpenViking) on your disk. An hourly self-test alerts you in Telegram if recall breaks, even when the health check is green.
WhatsApp
Optional. Link your number with /wa_pair. A watchdog alerts when the link drops. Reply watches wake the agent when a contact answers.
Your Telegram
Optional daemon that holds your own Telegram account: history, sending on your behalf, reply watches.
Gmail, Calendar
Per-user Google sign-in from the chat with /connect_google.
Scheduler
Recurring jobs on cron. A seed jobs file and an hourly status digest as a working example.
Task tracker
Agents log tasks and status in Paperclip, set up on first boot.
Browser
A browser automation skill for sites without an API.
Voice, images, video
Voice replies through ElevenLabs. Skills for image and short video generation.
Quiet runs
One progress line, edited in place, so a run makes no noise until the answer. Long answers stream paragraph by paragraph.
Cost control
Drops to a cheaper model once a session passes the budget share you set. /mute a topic and nothing there reaches Claude.

Make it yours

Everything is a plain file in your repo. No plugin store, no admin panel. Change a file, redeploy.

You want to changeEdit
The agent's name and identitysrc/agents.tssystem prompt
How new workers are briefedgenerateAgentSystemPrompt() in src/agents.ts
A worker's personality and jobagent-prompts/<name>/CLAUDE.mdexamples: spanish-teacher, media-creator, hourly-reviewer
Rules every agent followsserver-files/shared-rules.md
What the agent knows how to do.claude/skills/one folder per skill: gmail, browser-use, image-gen, job-scheduling and more
Tools available to every agentmcp-config.jsonadd any MCP server
Recurring jobsserver-files/scheduled-jobs.jsonor copy src/cron-review.ts and register it in scheduler.ts
Models and session budget.envCEO_MODEL, CEO_FALLBACK_MODEL, CEO_MAX_BUDGET_USD
Commands in the Telegram "/" menusrc/index.tspublished to the menu on restart
The task trackersrc/paperclip.ts, src/paperclip-logger.ts

Compared

Fils is the shaded column. The row that matters most is ‘If you stop paying’.

FilsOpen-source frameworksHosted assistants
Where memory and files liveYour serverYour serverTheir cloud
Source you can editAll of itYes, often large codebasesNo
Model billingYour Claude subscriptionUsually an API key, pay per tokenCredits inside a monthly plan
If you stop payingKeeps running, the code is yoursKeeps runningExport files, then it's gone
Monthly fee to the vendorNoneNoneMonthly subscription
SkillsFiles in your repoOften a third-party storeVendor-curated
Someone to callAn install call and two check-ins, with SetupCommunity forumsSupport desk

Price

$49Code, paid once
  • Private GitHub repo with the full source
  • Deploy script and step-by-step guide
  • All updates
  • Private community

For you if you are fine with SSH and a .env file. No terminal? Take Setup below.

Get the code
$499

Setup, once

Everything in Code, plus we install it with you on a call, on your server, and check in after one week and after one month.

Book a setup
Ask

Team, per project

Agents per role and shared memory for a small company. See the team page.

Write to us
Fils Code, once$49
Server, 12 × ~$6~$72
Claude, 12 × from $20from $240
First year, roughlyfrom ~$361

Server and Claude are billed to you by them, not by us. Memory search uses your own OpenAI key on top.

Optional extras run on your own keys too: ElevenLabs for voice replies, Gemini for images, fal.ai for short video. Open-source stand-ins exist, but they need a much bigger server, so we don't recommend them. We'll tell you where to get these cheapest, or bundled.

Questions

Does my data leave my server?

Memory, files and chat history stay on your disk. Each request to the model goes to Anthropic under your own account. Memory search uses an OpenAI embeddings key that you provide. Nothing passes through us.

What do I pay besides the $49?

A server, from about $6 a month, and a Claude subscription, which starts at $20 a month. Both are in your name.

What do I need to know to run it?

SSH, a terminal, and editing a .env file. The code is TypeScript if you want to go deeper. If you'd rather not touch a server, take Setup.

Can I use it for clients?

You can run it for yourself and for your clients. You can't sell the code itself as a product.