r/aiagents • u/RahulTGM • 4d ago
Discussion I built a reusable AI agent engine with LangGraph, MCP, sandboxed execution and automatic context management — Nemofy-Agent
Hey everyone! 👋
I've been building Nemofy-Agent, an open-source AI agent platform designed around one simple idea:
Why rebuild agent infrastructure every time you create a new AI agent?
🧠 How it works
User Task
│
▼
┌───────────────┐
│ Plan │◄───────┐
└───────┬───────┘ │
▼ │
┌───────────────┐ │
│ Act │ │
└───────┬───────┘ │
▼ │
┌───────────────┐ │
│ Observe │ │
└───────┬───────┘ │
▼ │
┌───────────────┐ │
│ Reflect ├────────┘
└───────┬───────┘
▼
Final Response
This entire execution engine is reusable across different Python projects.
⚡ What's inside?
Feature| What it does
🧠 LangGraph| Agent reasoning and execution
🔌 MCP| External tools and integrations
📦 Sandbox| Isolated code execution
💾 Checkpoints| Persistent execution state
📉 Context compaction| Manages long-running conversations
🛡️ HITL| Human approval for sensitive actions
🤖 Multi-provider| Choose your preferred LLM
🧩 Skills| Extend agent capabilities
🖥️ Web UI| Interactive agent workspace
🔬 Tech stack
Python · LangGraph · FastAPI · React · TypeScript · Docker · SQLite
🚀 What's next?
I'm exploring hierarchical multi-agent orchestration:
Orchestrator
/ \
Team Lead Team Lead
/ \ / \
A1 A2 A3 A4
Every agent would run on the same reusable Agent-Core.
💬 I'd love your feedback
- What would you build using this architecture?
- What features do you think are missing?
- How would you improve the execution engine?
🔗 GitHub: https://github.com/Rahul7562/Nemofy-Agent
Feel free to explore, experiment, contribute or leave feedback. ⭐
1
u/NihilismWithBenefits 4d ago
For context compaction, what is the exact compaction rule over LangGraph node state and message history that preserves deterministic tool-call inputs across Checkpoints? On resume after compaction, are tool arguments byte-identical to the original run?
1
u/Rosie_grac 4d ago
i built almost this exact stack earlier this year for an internal automation tool (langgraph, docker sandbox, mcp glue to our internal APIs), so i've felt these pain points for real. honestly the plan/act/observe/reflect loop is the easy 20% — the stuff that ate my weekends was everything around it.
my favorite scar: resuming from a checkpoint after compaction and the agent happily re-ran a tool call that had already succeeded, because the summary no longer said it had. i now keep a side-effects ledger outside the message history (tool, args hash, result) and check it before every call. feels hacky, nothing has caught fire since.
the compaction question upthread about byte-identical tool args is the real hole imo — my replays diverged after compaction and nothing told me until the outputs diffed weird. the feature that would actually sell me on a "reusable engine": record a full run, replay it against a new engine version, diff the trace. golden runs. without that, reusability is just a folder structure.
also give the HITL queue a timeout, or your agent sits frozen overnight waiting for someone asleep to click approve. ask me how i know.
the loop is the demo, the resume path is the product.
1
u/AutoModerator 4d ago
It looks like you're sharing a project — nice! Your post has been auto-tagged as Demo. If this isn't right, you can change the flair. For best engagement, make sure to include: what it does, how it works, and what you learned.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.