How Multica Implements Hosted AI Agents Without Embeddings: Architecture and Memory Design

This article analyzes Multica’s open‑source hosted‑agent platform, detailing how it orchestrates multiple AI agents, manages task memory through a six‑table relational schema, avoids vector embeddings, and balances human‑in‑the‑loop collaboration with scalable workspace isolation.

JavaEdge
JavaEdge
JavaEdge
How Multica Implements Hosted AI Agents Without Embeddings: Architecture and Memory Design

Introduction

Recent tools such as Paperclip, Multica, and Claude Managed Agents make it easier for developers to assign concrete tasks to AI systems like Claude, Hermes, OpenClaw, or Codex.

What Is a Hosted Agent?

A hosted agent allows multiple AI agents to run within the same workflow. Users can assign a task to Claude, hand the next one to Hermes, allocate a bug to Codex, or give an execution item to OpenClaw. The platform distributes tasks, tracks status, and maintains coordination among agents, abstracting away the need to decide which CLI tool to invoke.

Experience Using Multi‑Agent Systems

Initially I used Claude Cowork, which performed well but struggled when several agents needed to share state, requiring manual copy‑paste of context across sessions.

Anthropic’s Claude Managed Agents offered a better experience but remained tied to the Claude ecosystem.

Paperclip provided powerful features but felt more like a simulated enterprise system with heavy emphasis on organization, approval, and cost control.

Multica stands out as an open‑source hosted‑agent platform.

Mixing Different Agents

Claude, Codex, Hermes, OpenClaw, Gemini, Pi, and Cursor Agent can all cooperate on the same panel, sharing a common skill library and remaining vendor‑agnostic.

Human‑in‑the‑Loop

Agents propose modifications, comment on issues, and flag blockers while the human remains in the decision loop, creating a true “human + AI” collaboration rather than merely operating a tool.

Simplified UI

The UI/UX is intuitive, allowing easy creation of issues, agents, and assignment of execution environments.

Key Observation: Multica’s source code reveals that it does not use vector embeddings at all.

How Memory Flows Through Tasks

The process of assigning an issue to an agent follows eight steps:

User creates an issue with title, description, and optional context_refs linking other issues.

The record is inserted into the issue table and bound to a workspace_id.

The issue is assigned to a specific agent or user.

The backend builds a context snapshot containing workspace.context, the current issue, related issues, and bound skills, packs it into a JSONB blob, and writes it to agent_task_queue with status queued.

A daemon polls pending tasks via the idx_agent_task_queue_pending index.

The daemon fetches the task, reads the JSONB snapshot, invokes the appropriate CLI (e.g., claude, codex, gemini, hermes, openclaw, cursor), and loads the skill files.

During execution the agent continuously writes updates to the original record, as well as to the comment and activity_log tables, pushing real‑time updates via WebSocket.

When the task finishes, its result is transformed into a new or updated skill and reused through the agent_skill table.

This design enables cumulative memory: the skill table starts empty but grows as the team’s experience is distilled.

Six Tables That Form Multica’s Memory System

workspace.context

(TEXT): Global prompt inherited by every agent. issue (JSONB): Task unit containing linked issues and acceptance criteria. agent_task_queue.context (JSONB): One‑time snapshot for the daemon, avoiding repeated DB reads. skill + skill_file + agent_skill: Reusable capabilities scoped by workspace and bound to agents. comment: Thread‑style working memory, each entry clearly marked as human or agent. activity_log: Append‑only audit log recording all state changes.

Only these six tables exist; there is no vector similarity search or embedding storage.

How Agents Retrieve Memory

Each agent is linked to a set of skills via explicit agent_skill associations, using a simple relational query rather than cosine similarity:

# No cosine similarity, no top‑K retrieval
# Just a plain join query
SELECT *
FROM skill s
JOIN agent_skill a_s ON a_s.skill_id = s.id
WHERE a_s.agent_id = $1
AND s.workspace_id = $2;

For code‑focused agents, manually curated relevance often outperforms statistical similarity, especially when precise operation manuals are required.

Chat assistants, product search, or research analysis may need fuzzy retrieval, which Multica does not target.

Workspace Isolation as the Core

All tables include workspace_id and use foreign‑key cascade deletes. Deleting a workspace automatically removes all related data:

DELETE FROM workspace WHERE id = $1;

This design offers strong deployability; retrofitting vector databases later would be difficult and likely require a rewrite.

JSONB Snapshot Pattern

Multica builds a custom JSONB snapshot at task dispatch, keeping the database “cold” during inference. This avoids frequent DB queries or overly long prompts.

Significance of 26‑Year Hosted‑Agent Journey

Multica’s pure relational + JSONB approach has earned over 15,400 stars, disproving the claim that embeddings are mandatory at the infrastructure layer, though embeddings remain valuable for downstream context understanding.

Memory Systems Vary by Scenario

Accumulating a skill library boosts system value, while chat logs need an additional memory layer for context organization.

Human‑in‑the‑Loop Is a Data‑Structure Issue

Fields such as author_type, assignee_type, and actor_type give each message and state change an explicit owner, reflecting a deeper architectural decision rather than UI polish.

Limitations

Lack of fuzzy search: Unmarked skills cannot be discovered during task dispatch.

Snapshot staleness: Agents cannot see new comments after the snapshot is taken.

Skill quality depends on team habits; without regular curation the skill base degrades.

Snapshot size grows with the skill library (e.g., 200 skills produce a large context block).

No cross‑workspace memory sharing; experience from Team A cannot directly aid Team B.

Optimization Directions

The relational schema itself is solid—workspace isolation, cascade deletes, and audit logs work well. However, the agent experience and context handling can improve.

PostgreSQL serves as a robust “skeleton” for managing skills, tasks, and states, but it may not be ideal for holding the full agent context.

Agent context includes not only skills but also historical decisions, behavior patterns, collaboration styles, and emerging “personality.” Relying solely on skill_file and agent_skill is insufficient.

Introducing a dedicated context layer that supports fuzzy retrieval and semantic understanding, while integrating with the existing schema, would create a more complete system.

Analogy: The schema is the skeleton; the context layer is the nervous system.

In the next article, the author plans to integrate mem0 into this hosted‑agent framework to address the identified gaps.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

SQLAI Agentsmemory architectureHuman-in-the-loopJSONBhosted agentsMultica
JavaEdge
Written by

JavaEdge

First‑line development experience at multiple leading tech firms; now a software architect at a Shanghai state‑owned enterprise and founder of Programming Yanxuan. Nearly 300k followers online; expertise in distributed system design, AIGC application development, and quantitative finance investing.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.