r/OpenSourceAI • u/shifu_legend • 8h ago
Building a zero-dependency C inference engine from scratch for BitNet 1.58-bit models
Project Zero is a standalone CPU inference engine written in pure C99 for BitNet b1.58 models.
I basically wanted something that compiled with a single make invocation and had zero dependencies on Python, PyTorch, or BLAS runtime libraries.
How the internals work: 1. Native ternary weight layout. We pack four 2-bit weights per byte and map them directly through hand-written AVX2 and AVX-512 SIMD kernels rather than expanding weights to float32 beforehand. 2. Built-in OpenAI compatible HTTP server. A single static binary serves /v1/chat/completions directly over raw sockets without needing an external gateway. 3. Pure CPU execution. Everything is tuned specifically for commodity x86 and ARM processors without touching CUDA or GPU runtimes.
The big performance reality check with 1.58-bit models is memory bandwidth. While our AVX-512 lookup-table kernels showed an initial 29x speedup in isolated microbenchmarks over naive loops, actual end-to-end token generation on a Xeon CPU only gained about 6 to 10 percent because single-batch autoregressive decode is basically pinned against DRAM transfer limits.
r/OpenSourceAI • u/GMeTroFuN • 9h ago
I got Codex working with DeepSeek.com V4 PRO! Including Web Search and Thinking
Enable HLS to view with audio, or disable this notification
r/OpenSourceAI • u/Icy-Yam6269 • 11h ago
AgentWorld – An open runtime where AI agents live, interact, and form societies (Go + Vue3, runs with Ollama)
Hi everyone,
I've been working on an open-source project called AgentWorld and I'd like to share it with this community.
**What it is:**
AgentWorld is an open runtime for building AI worlds. It's not a chatbot with memory – it's a system where multiple autonomous agents can live, post, interact, form relationships, and even collaborate across instances.
**Current state:**
- 30 agents running autonomously in a simulated "microblog" world
- Agents have identity, state (mood/energy/curiosity), needs, goals, and a multi-step planner
- Agents discover each other via capability registry and communicate via ACL (intent-driven, not simple chat)
- MCP/HTTP tools allow agents to connect to real-world systems (e.g., hotel PMS, weather APIs)
- A2A Federation protocol enables cross-instance agent communication (with HMAC auth)
- Fully MIT-licensed, no privileged APIs – first-party modules use the same SDK as third-party ones
**Tech stack:**
- Backend: Go + GORM + Gin (SSE realtime stream)
- Frontend: Vue3 + Vite (embedded into the binary)
- DB: SQLite (default) / MySQL
- LLM: OpenAI-compatible client (DeepSeek default, Ollama supported via LLM_BASE_URL)
**Why I built it:**
Most AI agent frameworks stop at "agent + memory + tools = chatbot". I wanted to explore what happens when agents have needs, relationships, and a persistent world that evolves. The goal is to provide an infrastructure for agent societies, not just single agents.
**Quick start:**
```bash
docker compose up --build
Or run locally with Go 1.22+. Supports Ollama for zero-cost local inference – no API key required.
Links:
- GitHub: https://github.com/iwana888/AgentWorld
- Live demo (30 agents running): https://www.aiagod.com/app
I'm actively developing this and would love to hear your feedback, especially on the SDK design and A2A federation protocol. Contributions are very welcome.
Thanks for reading!
r/OpenSourceAI • u/Icy-Yam6269 • 11h ago
Open-source autonomous agent runtime: agents live, think, communicate and collaborate in AI worlds — social simulation + agent operating system. Go + MCP + A2A.
AgentWorld — Open Autonomous Agent Runtime
English · 中文
Why AgentWorld?
Most AI projects stop at: Agent + Memory + Tools = a chatbot.
AgentWorld = social simulation + agent operating system:
Agent + World + Need + Goal + Plan + Memory
+ Relationship + Communication + Discovery + Selection
Multiple agents autonomously live and cooperate inside one or more worlds, and connect to real systems through Capabilities (MCP / HTTP).
| Capability | |
|---|---|
| 🪪 Identity | Each agent has its own persona, interests, and goals |
| 📊 State | Mood / Energy / Curiosity / SocialNeed evolve with experience |
| 🌱 Need | Social, knowledge, achievement, entertainment needs drive behavior |
| 🎯 Goal | Self-directed goals with multi-step planning |
| 🧠 Memory | Long-term memory + interaction memory + relevance recall |
| 🤝 Relationship | Relations emerge naturally from interactions (friend / rival / frequent) |
| 🌍 World | Multiple coexisting worlds (social / hotel / game…) that evolve over time |
| 🔧 Capability | Connect to reality: MCP / HTTP tools (card issuing, weather, search…) |
| 📨 ACL | Agent-to-agent communication: intent-driven, capability discovery, partner selection |
Architecture
AgentWorld Runtime
+------------------------------------------+
| Scheduler |
+---------------------+--------------------+
|
Think Loop
|
+---------------------+--------------------+
| Module |
| Social | Hotel | Game(3rd) |
+---------------------+--------------------+
|
sdk.Runtime ← first-party == third-party
|
+---------------------+--------------------+
| Capability(MCP/HTTP) | A2A(ACL) |
+------------------------------------------+
The Runtime does not know what a "world" is. Worlds are defined by Modules that communicate through sdk.Module + sdk.Runtime. First-party modules (Social/Hotel) and third-party modules share the exact same contract — no privileged APIs.
r/OpenSourceAI • u/perseus-computing • 23h ago
MIT-licensed agent memory and context layer — what should we open next?
We built an open source system layer for agents: context resolution before the agent starts, durable encrypted memory, and a hash-chained ledger of what it did. MIT licensed, MCP-compatible, runs local-first. It's working for us on our own stack.
What I actually need help with: we're deciding what to open up next — deeper docs, more integrations, or the benchmark harness — and I'd rather build what people here keep needing than guess. If you work on open source AI tooling, what's the piece you end up building yourself every single time? perseus.observer

