filecoin-project / filecoin-project/devgrants
MemFOC — LangGraph BaseStore on Filecoin Onchain Cloud
- Dominant language
- No language data
- Stars
- 409
- Forks
- 311
- PR merge metrics
- No merged PRs in 30d
Description
# Open Grant Proposal: MemFOC — LangGraph BaseStore on Filecoin Onchain Cloud
**Project Name:** MemFOC
**Proposal Category:** Developer and data tooling
**Individual or Entity Name:** Individual
**Proposer:** panagot
**Project Repo(s):** https://github.com/panagot/memfoc
**(Optional) Filecoin ecosystem affiliations:** None
**(Optional) Technical Sponsor:** N/A
**Do you agree to open source all work you do on behalf of this RFP under the MIT/Apache-2 dual-license?:** Yes
# Project Summary
MemFOC is a Python library that implements LangGraph's `BaseStore` interface with Filecoin Onchain Cloud (FOC) as the durable storage layer and periodic FVM manifest anchoring for independent verification — PostgresStore ergonomics with content-addressed durability.
A working end-to-end prototype is already shipped: `FilecoinStore`, async sync worker, FastAPI demo, React dashboard, LangGraph agent graph, and 22 passing pytest tests with CI. Grant funding completes **production Filecoin integration** (Synapse on Calibration/mainnet, FVM contract, PyPI release) — not a greenfield build.
**Live demo:** https://memfoc-one.vercel.app
**Repository:** https://github.com/panagot/memfoc
## Impact
LangGraph agents need memory via `graph.compile(store=...)`. Teams today choose centralized Postgres, tool-based APIs (Mem0/Engram), or raw FOC storage without namespace semantics or recovery. [Filecoin RFS-1](https://filecoin.cloud/agents/rfs-1) identifies decentralized agent memory as a gap. MemFOC is the native LangGraph adapter: one line `graph.compile(store=FilecoinStore())`.
## Outcomes
At grant completion (30 days):
1. Real FOC uploads on **Calibration and mainnet** via Synapse/pynapse with verifiable CIDs
2. `MemoryManifest.sol` deployed; `flush_manifest()` emits on-chain `SnapshotCommitted`
3. `rebuild_index()` restores SQLite from manifest + FOC blobs (disaster recovery)
4. `pip install memfoc` on PyPI with standalone LangGraph example
5. Demo video: write → sync → manifest → rebuild flow
## Data Onboarding
Agent memory payloads (JSON) upload as content-addressed blobs to FOC. Namespace/key metadata lives in SQLite; manifest snapshots anchor CID lists on FVM periodically (not per-write gas). See [docs/VERIFICATION.md](https://github.com/panagot/memfoc/blob/main/docs/VERIFICATION.md).
## Development Roadmap
**Duration:** 30 days from contract signing
**Total ask:** $5,000
### M1 — Synapse + Calibration FOC (Days 1–14) — $2,500
- `SynapseBackend` via pynapse / synapse-filecoin-sdk
- Environment-based backend selection (local dev fallback preserved)
- Verifiable CIDs on Filecoin Calibration testnet
- USDFC payment flow documentation
- Dashboard observability for real upload status
- Expanded pytest coverage for sync/retry paths
**Acceptance:** Writes produce verifiable Calibration CIDs; async worker marks sync status correctly; local dev works without testnet credentials.
### M2 — FVM manifest + mainnet release (Days 15–30) — $2,500
- `MemoryManifest.sol` deployed to Calibration and mainnet
- `flush_manifest()` submits real FVM transactions
- `rebuild_index()` verified after simulated index loss
- PyPI publish: `pip install memfoc`
- Polished `examples/minimal_langgraph.py`
- 5-minute demo video for grant reporting
- Third-party verification guide
**Acceptance:** On-chain manifest event verifiable on explorer; PyPI install + quick start under 30 minutes; video published.
## Total Budget Requested
| Milestone # | Description | Deliverables | Completion Date | Funding |
|===|===|===|===|===|
| M1 | Synapse + Calibration FOC | SynapseBackend, Calibration CIDs, USDFC docs, tests | Day 14 | $2,500 |
| M2 | FVM + mainnet + PyPI | MemoryManifest.sol, mainnet deploy, PyPI, demo video | Day 30 | $2,500 |
| | | | **Total** | **$5,000** |
## Maintenance and Upgrade Plans
Apache 2.0 open source. Post-grant: LangGraph community outreach, Filecoin Slack (#grants-help), tutorial content. StorageBackend protocol isolates Synapse API changes; local dev backend preserves contributor UX without testnet credentials.
## Team
**Panagiotis Pollis** — sole developer
- **GitHub:** [panagot](https://github.com/panagot)
- **LinkedIn:** [panagiotis-pollis-33509831](https://www.linkedin.com/in/panagiotis-pollis-33509831/)
- **X:** [@PANAGOT](https://x.com/PANAGOT)
Independent web3 builder since 2014 (Bitcoin). Full-stack developer (Social Hackers Academy bootcamp). Previously founded Bitfortip.com (2015–2021), an early Bitcoin tipping/rewards platform.
**Recent shipped products (relevant to MemFOC):**
- **[Tracefunds](https://tracefunds.app)** — On-chain fund-flow intelligence for post-incident crypto tracing. Victims and investigators paste a drained wallet or transaction hash and receive fund-flow graphs, verification checklists, and exchange-ready abuse packs from public chain data only (no wallet connect). Multi-chain (Ethereum, Solana, Arbitrum, and others). Demonstrates production experience shipping verifiable, audit-friendly on-chain data products.
- **[Address Poisoning Detector](https://addresspoisoningdetector.com)** — Preventive monitoring for address-poisoning attacks on Arbitrum One & Nova. Scheduled scans, email/X/Telegram/webhook alerts when lookalike “dust” senders target a registered wallet. API + Pro tier. Demonstrates experience with background workers, public explorer integration, and user-facing security tooling at scale.
**Why MemFOC:** Same builder pattern — durable, verifiable data with clear recovery/audit paths — applied to LangGraph agent memory on Filecoin instead of incident tracing or wallet alerts.
## Team code repositories
- https://github.com/panagot/memfoc (grant project)
- https://tracefunds.app (production product)
- https://addresspoisoningdetector.com (production product)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading docs/VERIFICATION.md and the existing repository structure around FilecoinStore, SynapseBackend, flush_manifest(), rebuild_index(), and examples/minimal_langgraph.py. Review the 22 existing pytest tests before tackling the milestone work. Done means the stated Calibration and mainnet acceptance criteria are met, including verifiable CIDs, manifest recovery, PyPI installation, and the published demo.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fastapi, python, react, solidity, sqlite
- Domain
- api, backend, blockchain, cloud, databases, documentation, frontend, release, testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100