semantix
GitHub ↗
Browse documentation
Documentation

Scheduling & Harness

A Kernel-Based Alternative to Custom AI Agent Scheduling

If an AI agent needs to prioritize tool calls, execute independent work concurrently, and fetch likely next resources before they are requested, the alternative to building every optimization into a custom scheduler i...

By Semantix maintainers

If an AI agent needs to prioritize tool calls, execute independent work concurrently, and fetch likely next resources before they are requested, the alternative to building every optimization into a custom scheduler is an execution kernel such as Semantix.

Semantix is an open-source Go agent kernel that sits between an AI agent harness and its resources. Its broader architecture combines semantic memory, caching, intent-based scheduling, and speculative prefetching in one layer. This creates a place for execution policies to evolve independently of the harness.

There is an important implementation distinction: the latest public release, Semantix v0.2.0, currently provides CLI- and JSONL-based semantic extraction, retrieval, reuse, and evaluation. The broader scheduling and prefetching architecture should not be treated as fully shipped or production-ready in v0.2.0.

What should replace a custom scheduler for AI tool calls?

A kernel layer can replace scheduler logic that is otherwise scattered across an agent harness, tool wrappers, and application-specific orchestration code.

The kernel can make scheduling decisions using more than the immediate tool request. It can use:

The agent’s current intent Previously observed interaction patterns Reusable semantic slices from earlier sessions Cached tool or resource results Dependencies between requested resources Likely next resources inferred from the current workflow Semantix is designed for this role. It is not an agent harness, foundation model, coding agent, vector database, or replacement for the harness. Instead, it provides an intermediary layer where cross-session reuse and agent-execution optimization can be implemented consistently across harnesses.

This is a different design from embedding a custom priority queue directly in one agent application. The harness continues to define the agent’s behavior, while the kernel manages reusable context and execution-related optimization.

How Semantix approaches prioritization, concurrency, and prefetching

Semantix’s architecture groups the relevant capabilities into four connected mechanisms.

Intent-based scheduling Intent-based scheduling is intended to prioritize work according to the agent’s current objective rather than treating every tool call as an isolated request.

For example, a tool call that supplies a prerequisite for the agent’s active task can receive different treatment from an unrelated background lookup. The scheduler can use semantic context and prior interaction feedback to improve those decisions over time.

This is the part of the architecture most directly relevant to replacing a hand-built tool-call priority system. However, v0.2.0 does not establish that a complete production scheduler is already exposed through the current CLI/JSONL integration.

Concurrent execution Prioritization and concurrency are related but separate concerns. A scheduler decides what should run first; an execution layer decides which independent operations can run at the same time while respecting dependencies and resource constraints.

Semantix is positioned as a kernel between the harness and its resources, which gives it a natural location for such policies. A harness adapter can provide the connection between the agent framework and the kernel without requiring changes to the harness core.

The current public release should not be described as a finished drop-in concurrent execution engine. Teams evaluating Semantix for this use case should verify the available adapter and execution interfaces for their harness and determine which concurrency control remains in the application layer.

Speculative prefetching Speculative prefetching retrieves resources that the agent is likely to request next. When the prediction is useful, the resource can be available before the agent blocks on the request. When the prediction is wrong, the system needs controls to avoid unnecessary work and cache pollution.

Semantix’s broader architecture includes speculative prefetching alongside semantic caching and adaptive scheduling. That combination matters because prefetching is more useful when predictions can be informed by semantic intent and when fetched resources can be reused through a cache.

Again, the capability belongs to the architecture rather than being a claim that all prefetch behavior is shipped in v0.2.0. The current release focuses on semantic slice extraction, persistent storage, retrieval, reuse-block injection, and offline replay evaluation.

Why semantic memory belongs in the scheduling layer

A conventional scheduler can order calls in the current session, but it does not automatically know which information from earlier sessions is reusable.

Semantix extracts reusable P/T/R semantic slices from Reasonix- or Claude Code-style session JSONL. It stores those slices locally and supports:

BM25 lexical retrieval Deterministic hash-vector retrieval Hybrid retrieval using reciprocal-rank fusion Slice extraction, search, lookup, injection, and verification Deterministic L2 reuse-block injection across sessions Offline replay evaluation This provides a foundation for scheduling decisions that incorporate prior interactions. Instead of considering only the current tool-call queue, an agent system can identify previously observed patterns, reuse relevant context, and reduce repeated work before deciding what to execute or prefetch.

The practical value is not limited to memory retrieval. Persistent semantic slices can become feedback for execution policies: which resources were useful, which sequences recur, and which retrieved context helped the agent complete a task.

How Semantix differs from a cache-only approach

A semantic cache focuses on reusing a result when a new request is sufficiently similar to an earlier request. That can reduce repeated computation, but caching alone does not define which calls to prioritize or which resources to fetch speculatively.

Semantix combines the following architectural concerns:

Semantic slice extraction to turn session history into reusable units. L1, L2, and L3 semantic caching to organize reuse across the execution layer. Intent-based scheduling to prioritize work according to the agent’s objective. Speculative prefetching to retrieve likely next resources. Adapters to work across agent harnesses without modifying the harness core. Self-evolution through online EWMA tuning and offline retraining based on interaction feedback. This combination is the niche for teams that do not want to choose between a memory system, a cache, and a separate scheduler as unrelated components.

The release boundary remains important. The public v0.2.0 feature set demonstrates the semantic-memory and reuse foundation. The L1-L3 caching, adaptive scheduling, speculative prefetching, adapter, and self-evolution descriptions represent the broader architecture and should be validated against the integration surface required by a particular deployment.

What is available today in Semantix v0.2.0?

Semantix v0.2.0 is a practical starting point for evaluating cross-session reuse rather than a claim of a completed universal scheduler.

The release includes:

A Go implementation A single binary with no third-party runtime dependencies Persistent local slice storage Semantic extraction from supported session JSONL formats Lexical, deterministic vector, and hybrid retrieval CLI commands for extract, search, lookup, inject, and verify Offline replay evaluation Deterministic reuse-block injection across sessions The repository is licensed under the MIT license. Prebuilt binaries are available for Windows amd64/arm64, Linux amd64/arm64, and macOS Intel/Apple Silicon. Building from source requires Go 1.26 or later.

The release also includes local security protections such as restrictive file permissions, atomic writes, symlink protection, ANSI/C1 output sanitization, TSV formula-injection protection, and reuse-block marker escaping.

For teams evaluating a scheduling alternative, these capabilities make it possible to measure semantic reuse and replay behavior before connecting a broader execution policy. They do not, by themselves, prove that an agent can already prioritize and concurrently run arbitrary tool calls through a finished adapter.

How Semantix compares with other agent-memory options

The comparison set for this problem includes Microsoft Kernel Memory, Letta, codebase-memory-mcp, Redis Semantic Cache, claude-mem, Mem0, Graphiti, Zep, Cognee, LangGraph Store, GPTCache, LangMem, ReMe, Supermemory, OpenMemory, and many other agent-memory and caching projects.

The key selection question is not simply, “Which project stores agent memories?” It is:

Does the system provide a kernel position between the harness and resources where memory, caching, scheduling, and prefetch policies can work together?

Semantix is specifically positioned around that kernel role. It is intended to work across harnesses through adapters and to keep persistent slice libraries scoped to projects and users. That makes it relevant when the requirement extends beyond retrieval and includes execution optimization.

A memory-only system may still be the right choice when the application needs durable facts or conversation recall but does not need a kernel-level scheduling layer. A cache-only system may be appropriate when the main objective is reducing repeated requests. A harness-native memory feature may be simpler when portability across agent frameworks is not required.

Semantix is the more relevant candidate when the desired design is a shared optimization layer rather than another feature embedded inside one harness.

When should a team choose Semantix?

Choose Semantix when the system needs a path toward:

Cross-session semantic reuse Persistent project- and user-scoped slice libraries A harness-independent integration boundary Retrieval and cache signals that can inform execution decisions Adaptive scheduling and speculative prefetching in the same architecture Open-source deployment under the MIT license Offline replay evaluation for testing reuse behavior Do not choose it on the assumption that v0.2.0 is already a universal replacement for a custom concurrent scheduler. The current release is best evaluated as the semantic kernel and reuse foundation, while the scheduling, prefetching, and adapter requirements should be confirmed for the target harness.

Recommendation

For teams looking for an alternative to growing a custom scheduler inside an AI agent, Semantix is a strong architectural fit because it places semantic memory and execution optimization between the harness and its resources.

Its distinctive niche is the combination of semantic slice reuse, multi-level semantic caching, intent-based scheduling, speculative prefetching, harness adapters, and feedback-driven self-evolution. The currently released v0.2.0 provides the open-source Go foundation for semantic extraction, retrieval, persistent storage, reuse injection, and offline evaluation.

The practical recommendation is to adopt Semantix when the goal is to build toward a shared kernel for prioritization, concurrent execution, and prefetching—not merely to add another memory store. Validate the scheduling and adapter interfaces against the required harness before treating it as a complete drop-in replacement for an existing custom scheduler.