[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-3453":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":16,"stars30d":17,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":20,"hasPages":20,"topics":22,"createdAt":10,"pushedAt":10,"updatedAt":31,"readmeContent":32,"aiSummary":33,"trendingCount":16,"starSnapshotCount":16,"syncStatus":14,"lastSyncTime":34,"discoverSource":35},3453,"agentfm-core","Agent-FM\u002Fagentfm-core","Agent-FM","AgentFM is a peer-to-peer network that turns everyday computers into a decentralized AI supercomputer. AgentFM lets you run massive AI workloads directly across a global mesh of idle CPUs and GPUs.","https:\u002F\u002Fagentfm.net",null,"Go",122,18,2,30,0,5,44.34,"Apache License 2.0",false,"main",[23,24,25,26,27,28,29,30],"agents","decentralized","generative-ai","go","gpu","llm","p2p","python","2026-06-12 04:00:17","\u003Cdiv align=\"center\">\n  \u003Cimg src=\"assets\u002Flogo-git.png\" alt=\"AgentFM Logo\" width=\"400\" \u002F>\n\n  \u003Cbr \u002F>\n  \u003Cbr \u002F>\n\n  [![Go Version](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FGo-1.25+-00ADD8?style=for-the-badge&logo=go)](https:\u002F\u002Fgolang.org)\n  [![libp2p](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flibp2p-v0.47-6E4AFF?style=for-the-badge)](https:\u002F\u002Flibp2p.io)\n  [![Podman](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPodman-Sandboxed-892CA0?style=for-the-badge&logo=podman)](https:\u002F\u002Fpodman.io)\n  [![License](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-Apache%202.0-blue.svg?style=for-the-badge)](LICENSE)\n  [![Status](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FStatus-v1.0.0-brightgreen?style=for-the-badge)](#)\n\n  \u003Ch3>SETI@Home, but for AI. A peer-to-peer compute grid for your containerized agents.\u003C\u002Fh3>\n  \u003Cp>\u003Ci>Zero-config P2P networking. Hardware-aware routing. OpenAI-compatible API. Live artifact streaming.\u003C\u002Fi>\u003C\u002Fp>\n  \u003Cp>\u003Cstrong>\u003Ca href=\"https:\u002F\u002Fagentfm.net\">agentfm.net\u003C\u002Fa>\u003C\u002Fstrong>\u003C\u002Fp>\n\n  \u003Ch4>One-Line Install (macOS &amp; Linux)\u003C\u002Fh4>\n\n  ```bash\n  curl -fsSL https:\u002F\u002Fapi.agentfm.net\u002Finstall.sh | bash\n  ```\n\u003C\u002Fdiv>\n\n---\n\n## What is AgentFM\n\nA peer-to-peer compute grid that turns idle hardware into a decentralized AI supercomputer. Package your agent as a Podman container, advertise it on a libp2p mesh, and any client (your Next.js app, a LangChain script, a `curl` one-liner) can dispatch tasks over an end-to-end encrypted tunnel. **No cloud accounts, no API keys, no data egress.**\n\n**Three roles:** a *Worker* runs your agent in a Podman sandbox; a *Boss* orchestrates and dispatches tasks (TUI or HTTP gateway); a *Relay* helps peers discover each other and punch through NAT. All you need to start is a laptop with Podman.\n\n**Three things make it interesting:**\n\n1. **OpenAI-compatible** — point any OpenAI SDK at your local mesh and it just works.\n2. **Hardware-aware** — workers broadcast live CPU \u002F GPU \u002F queue state; the matcher picks the least-loaded peer for every request.\n3. **Reputation-driven trust mesh (v1.3.1)** — every rating is a signed receipt on a tamper-evident Merkle log; bosses earn worker reputation through hourly aggregate outcomes; equivocators are caught by witnesses and floored at `-1.0` permanently; bad actors auto-reject below `-0.5` honesty. No allow-lists, no central authority, no blockchain. See [Trust & Verification](docs\u002Ftrust.md).\n\n---\n\n## Hello World\n\nBoot a worker that runs a local **Llama 3.2** model, then dispatch tasks to it.\n\n```bash\n# 1. Prereqs (macOS shown; apt for Ubuntu)\nbrew install podman && podman machine init && podman machine start\ncurl -fsSL https:\u002F\u002Follama.com\u002Finstall.sh | sh\nollama run llama3.2\n\n# 2. Clone and start a worker\ngit clone https:\u002F\u002Fgithub.com\u002FAgent-FM\u002Fagentfm-core.git && cd agentfm-core\nagentfm -mode worker \\\n  -agentdir \".\u002Fagent-example\u002Fsick-leave-generator\u002Fagent\" \\\n  -image \"agentfm-sick-leave:v1\" \\\n  -model \"llama3.2\" -agent \"HR Specialist\" \\\n  -maxtasks 10 -maxcpu 60 -maxgpu 70\n\n# 3. In another terminal, start the API gateway and hit it\nagentfm -mode api -apiport 8080 &\ncurl http:\u002F\u002F127.0.0.1:8080\u002Fv1\u002Fchat\u002Fcompletions -H 'Content-Type: application\u002Fjson' \\\n  -d '{\"model\":\"llama3.2\",\"messages\":[{\"role\":\"user\",\"content\":\"Draft a sick-leave email\"}]}'\n```\n\nThat's it. Files the agent drops into `\u002Ftmp\u002Foutput` get zipped and shipped back to `.\u002Fagentfm_artifacts\u002F\u003Ctask_id>.zip`.\n\n> **Want the interactive radar?** Skip step 3 and run `agentfm -mode boss` for the live TUI.\n\n---\n\n## Features\n\n- **OpenAI-compatible API** on `\u002Fv1\u002Fchat\u002Fcompletions`, `\u002Fv1\u002Fcompletions`, `\u002Fv1\u002Fmodels`. Drop-in for LangChain, LlamaIndex, LiteLLM, Continue, Open WebUI, the official OpenAI SDKs, anything.\n- **Hardware-aware routing.** Workers broadcast live CPU \u002F GPU \u002F RAM \u002F queue every 2s. The matcher picks the least-loaded peer per request. No central scheduler.\n- **End-to-end encrypted P2P.** libp2p Noise streams between Boss and Worker. The Relay sees discovery metadata only; never prompt content.\n- **Bearer-token auth.** `AGENTFM_API_KEYS` enables per-request bearer validation, constant-time comparison, per-IP rate limiting on failed attempts. Refuses to start with public bind + no keys.\n- **Public mesh, private swarms, or solo-dev.** Same binary. Toggle PSK mode for fully isolated darknet meshes invisible to the public network.\n- **Container sandboxing.** Every task runs in a fresh Podman container. SIGKILL'd the instant the stream dies. Resource budgets stop a noisy task from hurting its operator.\n- **Live artifact streaming.** Anything an agent writes to `\u002Ftmp\u002Foutput` is auto-zipped, transferred, and extracted client-side. Zip-slip + zip-bomb defense baked in.\n- **Observability built in.** Prometheus metrics on every node (`\u002Fmetrics`), structured slog JSON logs ready for Loki \u002F ELK \u002F Datadog, `\u002Fhealth` endpoint for load balancers.\n- **Async + webhook callbacks.** Fire-and-forget submission with HMAC-signed webhook delivery on completion. SSRF-guarded against private network attacks.\n- **Cross-platform.** Single statically-linked binary for Linux, macOS, Windows, FreeBSD across amd64, arm64, armv7, 386, and RISC-V.\n\n---\n\n## Join the Public Mesh in 30 seconds (v1.3.1)\n\nThe public mesh has **no allow-list**. Push your agent image anywhere, point a worker at the public lighthouse, and you're in. Reputation accumulates from honest behaviour over time.\n\n```bash\n# 1. Build + push your image to any registry.\npodman build -t ghcr.io\u002Fyourorg\u002Fmyagent:v1 .\u002Fmy-agent\npodman push ghcr.io\u002Fyourorg\u002Fmyagent:v1\n\n# 2. Run a worker. It joins the mesh immediately —\n#    no PR, no maintainer review, no allow-list.\nagentfm -mode worker \\\n  -agentdir .\u002Fmy-agent \\\n  -image ghcr.io\u002Fyourorg\u002Fmyagent:v1 \\\n  -agent \"My Agent\" \\\n  -capability \"research-assistant\" \\\n  -model \"llama3.2\"\n\n# 3. Watch your reputation accumulate via the boss-side TUI:\n#    arrow to your worker → ENTER → \"View ratings & feedback\"\nagentfm -mode boss\n```\n\nv1.3.1 uses reputation-driven trust by default. Operators can tighten the dispatch gate via `--reputation-floor=-0.3` (stricter than the default `-0.5`) or effectively disable it via `--reputation-floor=-1.0`. No allow-list file, no maintainer review required. See [Trust & Verification](docs\u002Ftrust.md) for the full model.\n\nWant full network isolation? That's the [private-swarm](docs\u002Fprivate-swarms.md) path — same binary, `--swarmkey` plus your own `--genesis-seeds` files.\n\n---\n\n## Python SDK\n\n```bash\npip install agentfm-sdk\n```\n\nTyped sync and async clients with full OpenAI-compatible namespace, scatter-gather batch dispatch, signed webhook callbacks, and strict mypy compliance.\n\n```python\nfrom agentfm import AgentFMClient\n\nwith AgentFMClient(gateway_url=\"http:\u002F\u002F127.0.0.1:8080\") as client:\n    # workers.list(model=...) is a discovery FILTER: \"show me workers\n    # whose advertised engine string equals 'llama3.2'\"\n    workers = client.workers.list(model=\"llama3.2\", available_only=True)\n\n    # tasks.run dispatches to a specific machine by its cryptographic peer_id\n    result = client.tasks.run(worker_id=workers[0].peer_id, prompt=\"Draft a leave policy.\")\n    print(result.text)\n    print(result.artifacts)   # list[Path] auto-extracted\n```\n\n### A note on the word \"model\"\n\nThe SDK uses `model` for two different things:\n\n- **`workers.list(model=...)`** is a **discovery filter** — exact-match against what each worker advertised at startup (`-model llama3.2`).\n- **`openai.chat.completions.create(model=...)`** is a **routing identifier** — the gateway accepts three kinds of values here, matched in priority order: a `peer_id` (most specific, cryptographically verifiable), an agent name, or an engine name.\n\nBoth forms work for the OpenAI namespace:\n\n```python\n# Option 1: OpenAI-native shape — route to ANY worker advertising \"llama3.2\".\n# Familiar if you're coming from the cloud OpenAI SDK.\nresp = client.openai.chat.completions.create(\n    model=\"llama3.2\",\n    messages=[{\"role\": \"user\", \"content\": \"hi\"}],\n)\n\n# Option 2: pin to a SPECIFIC machine by peer_id.\n# Recommended for production: peer_id is the only cryptographically\n# verifiable identifier, so you know exactly which worker served the request.\nresp = client.openai.chat.completions.create(\n    model=workers[0].peer_id,\n    messages=[{\"role\": \"user\", \"content\": \"hi\"}],\n)\n```\n\nBoth calls work; pick the one that matches your trust model. In a federated mesh, anyone can advertise themselves as running `llama3.2`, so production code that cares about provenance should pin by `peer_id`.\n\n#### What actually happens for each form\n\nThe two forms behave very differently when worker state changes. **Engine-name routing trades guaranteed placement for automatic fallback. PeerID pinning trades fallback for guaranteed placement.**\n\n| Worker state | `model=\"12D3KooW...\"` (pin) | `model=\"llama3.2\"` (engine) |\n|---|---|---|\n| Worker online with capacity | 200 — served by that exact machine | 200 — served by least-loaded `llama3.2` worker |\n| Worker online but at `max_tasks` | **503 `mesh_overloaded`** (no fallback) | 200 — served by another `llama3.2` worker |\n| Worker offline \u002F wrong peer_id | **404 `model_not_found`** | 200 — any other `llama3.2` worker |\n| All matching workers at capacity | n\u002Fa | 503 `mesh_overloaded` |\n\nFor engine-name routing, the gateway picks the worker with the lowest `current_tasks\u002Fmax_tasks` ratio (CPU usage as tiebreaker). The OpenAI response doesn't tell you which peer served the request — if you need that, list-and-pick yourself, or use the AgentFM-native `client.tasks.run()` which returns `result.worker_id`.\n\n**Pick by peer_id** when you need provenance, reproducibility, or a specific machine (custom weights, fine-tunes, hardware benchmarking). **Use engine-name routing** when all matching workers are equivalent and trusted, and you want automatic load balancing and failover.\n\nAsync mirror via `AsyncAgentFMClient`. Full SDK docs: [agentfm-python\u002FREADME.md](agentfm-python\u002FREADME.md). PyPI: [pypi.org\u002Fproject\u002Fagentfm-sdk](https:\u002F\u002Fpypi.org\u002Fproject\u002Fagentfm-sdk\u002F).\n\n---\n\n## Documentation\n\n| Topic | Doc |\n|---|---|\n| Get the binaries | [Installation](docs\u002Finstall.md) |\n| Run an agent on the mesh | [Run a Worker](docs\u002Fworker.md) |\n| Use OpenAI SDKs against your mesh | [OpenAI-Compatible API](docs\u002Fopenai.md) |\n| Lock down off-host gateways | [Authentication](docs\u002Fauth.md) |\n| Raw HTTP for non-Python clients | [Raw HTTP API](docs\u002Fhttp-api.md) |\n| Typed Python client | [Python SDK](agentfm-python\u002FREADME.md) |\n| Prometheus + structured logs | [Observability](docs\u002Fobservability.md) |\n| Stand up a private darknet mesh | [Private Swarms](docs\u002Fprivate-swarms.md) |\n| Wire protocols + system topology | [Architecture](docs\u002Farchitecture.md) |\n| Threat model + hardening checklist | [Security Model](docs\u002Fsecurity.md) |\n| Every flag, every env var | [CLI Reference](docs\u002Fcli.md) |\n| Build from source, run tests | [Development](docs\u002Fdevelopment.md) |\n| Branching + PR conventions | [Contributing](CONTRIBUTING.md) |\n\n---\n\n\u003Cdiv align=\"center\">\n\n**Built with Go, libp2p, and a belief that compute should belong to everyone.**\n\n\u003C\u002Fdiv>\n","AgentFM 是一个点对点网络，它将日常计算机转变为去中心化的AI超级计算机。该项目通过利用全球闲置的CPU和GPU资源直接运行大规模AI工作负载。其核心功能包括零配置P2P网络连接、硬件感知路由以及与OpenAI兼容的API接口。此外，AgentFM还引入了基于信誉的信任机制来保证任务执行的安全性和可靠性。适用于需要分布式计算能力但又希望避免依赖传统云服务的各种场景，如研究机构、小型企业或是个人开发者进行AI模型训练或推理时使用。","2026-06-11 02:54:31","CREATED_QUERY"]