r/ContextEngineering • • 1d ago

Release: The Agentic Collaboration Framework (ACF) and Intelligent Context Management (ICM), on an OpenCode v2 fork (MIT)

Context compaction is an event that injures an agent's understanding. Each compaction loses detail, and the agent has to recover from it. Repeat it and the loss compounds.

Intelligent Context Management (ICM) replaces compaction. The working agent assesses what it needs for the work ahead and why, then keeps material verbatim, distills tool output, compresses finished work, releases what no longer serves, or leaves its context as it is. Edits change what the model sees, not the saved history. ICM selects content itself only for model input limit overflow protection.

ICM is part of the Agentic Collaboration Framework (ACF), a multi-agent framework for long-horizon work that spans many sessions, where a problem has to be modeled before it can be solved. You work with one primary agent, the Principal. It delegates to Partners, Associates and Assistants, and checks and integrates their work against its working-model, its evolving model of the problem. ACF's instructions are protocols that agents enact as processes, not a rule for each case.

Both run on acf-opencode, our fork of OpenCode v2. Upstream OpenCode v2.2.5 had no place to keep a context plugin's decisions with the session; the fork adds an API that keeps them and applies them whenever the session's history is loaded for the model. It also adds a session Interlink tool, so Principals in different sessions can message and task each other.

The ICM README describes the system, includes an exploratory replay study with its limits, and says what hasn't been measured: https://github.com/DefendTheDisabled/intelligent-context-management

ACF: https://github.com/DefendTheDisabled/agentic-collaboration-frameworkContext compaction is an event that injures an agent's understanding. Each compaction loses detail, and the agent has to recover from it. Repeat it and the loss compounds.

Intelligent Context Management (ICM) replaces compaction. The working agent assesses what it needs for the work ahead and why, then keeps material verbatim, distills tool output, compresses finished work, releases what no longer serves, or leaves its context as it is. Edits change what the model sees, not the saved history. ICM selects content itself only for model input limit overflow protection.

ICM is part of the Agentic Collaboration Framework (ACF), a multi-agent framework for long-horizon work that spans many sessions, where a problem has to be modeled before it can be solved. You work with one primary agent, the Principal. It delegates to Partners, Associates and Assistants, and checks and integrates their work against its working-model, its evolving model of the problem. ACF's instructions are protocols that agents enact as processes, not a rule for each case.

Both run on acf-opencode, our fork of OpenCode v2. Upstream OpenCode v2.2.5 had no place to keep a context plugin's decisions with the session; the fork adds an API that keeps them and applies them whenever the session's history is loaded for the model. It also adds a session Interlink tool, so Principals in different sessions can message and task each other.

The ICM README describes the system, includes an exploratory replay study with its limits, and says what hasn't been measured: https://github.com/DefendTheDisabled/intelligent-context-management

ACF: https://github.com/DefendTheDisabled/agentic-collaboration-framework

4 Upvotes

9 comments sorted by

2

u/DuckDatum 14h ago

I hate frameworks that invent role names like Partner and Associate. Why is it using human role names like that?

I think, the framework that actually lasts is going to be (1) composable as a framework to fit most needs, (2) centered on engineering terminology, and (3) accompanied by benchmarks that show both when it helps and limits reasoning, as well as by how much, from various measurements (token efficiency, completion time, hallucination rate, result quality, …)

1

u/MakesNotSense 12h ago

Principal is the principal investigator. The Principal investigator has Partners. The terms for ACF roles establish clear hierarchy which agents intuitively grasp based upon their training data. 

The terms also span across disciplines, but are very common in law firms. LLMs are heavily trained on law, and other disciplines which adopts these terms which establish hierarchal roles on an organizations structure. 

That helps agents organize into a functional system which applies reason and logic to problem solving. A principal agent by its name rightly steers towards holding ownership over the work, but not being dismissive of a Partners feedback, and scoping tasks appropriately to Partners, Associates, and Assistants. 

The agent/ prompts merely reinforce and fine-tune what the roles name establishes, or more precisely, function-calls to in the models weights.

ACF adopts logical self-defining schema that bakes in structure across all its parts, not just agent roles. The terms are not 'inventions'; they're semantic definitions which trigger the activation of parameters within the llm which aid its understanding and operational capabilities within the role.

As to benchmarks, I could find none which test agents cognitive capabilities and task performance on long-horizon complex problems. After 2 weeks of trying SWE Marathon runs it became clear how inadequate current benchmarks are. 

The workloads I see ACF agents struggle with or start to breakdown on indicate the industry needs new benchmarks for context management, state/memory systems, and multi-agent workflows. 

Benchmarks often give tasks that are a grind rather than a cognitive challenge. Are narrow rather than open ended. Tasks where agents don't have to do much thinking or orchestrating and the value of multiple agents is minimal to none. 

 As a result, quantitative data has not been a priority. I don't want to spend time inventing benchmarks. I did create and perform a simple replay study to benchmark ICM vs compaction. It showed ICM greatly improves how well agents carry understanding throughout a session which would compact 6x. Study results summarized in a readme section and full report in docs.

1

u/DuckDatum 11h ago edited 11h ago

Okay, I get what you’re going for. Am I mistaken in taking from this that your framework’s justification is based on the assumption that, because LLMs are heavily trained on law data, that law-firm native roles would necessarily carry context on the agents role within a swarm — thus helping guide alignment?

It’s a big assumption in my opinion. It could just as easily be true that LLMs perform in a certain way when assigned a role with that description, regardless of what you want to call the role.

Not to mention, if you can’t tell me how doing this is harmful too — I don’t (can’t) believe enough research was put into it. Everything is a tradeoff. That doesn’t mean explaining agentic failure modes, it means explaining what your framework changes about it — both in positive and negative light.

When I see a framework impose jargon from other industries, it immediately screams immature solution. That’s my personal take.

Also: long running tasks for assessment are totally feasible. It’s why you’re seeing solutions to things like Riemann hypothesis — because they were using it for that purpose. You can also do something like: rebuild the Linux kernel.

You also need good monitoring. Look into Phoenix for traces.

You also need to be able to run side by side experiments over and over and over again.

1

u/MakesNotSense 5h ago

I don't think agents mimicking the roles within a law firm would be helpful. The ACF role terms are chosen because they are used across a variety of disciplines and workplaces. Law firms are just one obvious example. The point is to make it easy for agents to understand their roles and not need a list of definitions and rules to exercise sound judgement across a range of tasks while working in a collaborative manner.

Agents can rely upon their training to understand what a Principal is, what it does, what it's duties are. That aligns the agents to good conduct; it reduces the rate or error and it's propagation throughout a workflow.

As to data, I like data. I prefer it. But I am disabled and have limited resources and time. I can't burn tokens generating data I don't need - I've done little else but build ACF over 11 months. Observational data alone through daily use is more than enough for my needs. I hear people complain about failures I do not encounter; problems I solved several months ago. I don't need a benchmark to confirm what has become obvious.

I have no intention of becoming an ML researcher. My primary goal is suing an entire state Medicaid system.

Publishing ACF is part of a strategic plan. I don't need or want 'users'. I want people who need these tools to have access to them. Getting people to use ACF matters to me only inasfar as it would help people realize the tools they need are built and available to them.

I don't have a product to sell. I have an outcome to realize.

1

u/DuckDatum 3h ago edited 3h ago

You’re providing a product that replaces compaction, the industry standard for context window management as its length grows. I’m all for supporting your goals and outcomes, though I think it’s fair to judge the state of your product in its own right. It has several implications.

If someone is reporting a problem that you don’t experience, wouldn’t you think that’s preventing someone from being able to “realize the tools they need are built and available to them?” If you product can’t be used on anyone’s machine but your own, you haven’t really made to tool available to anyone but yourself.

Furthermore, you can’t rule out your own biases if you don’t even test for objective outcomes. Your results are anecdotal at best without anything more, and potentially misleading otherwise. This is why it’s important to test your results against the goals you intended to resolve. Not the distant outcome… the immediate goal you set to solve in replacing compaction with your custom solution.

Seeing good results is great, but intuition is a low bar for publishing. Help people understand why your results aren’t more noise in an ocean of ai slop.

You should also look into other solutions to the same problem and explain why yours is different / better. For example, SKILL.state

1

u/MakesNotSense 2h ago

> "If you product can’t be used on anyone’s machine but your own, you haven’t really made to tool available to anyone but yourself."

Not a product; a solution. It's MIT. There's nothing to sell/buy.
Agents spent a lot of time making sure ACF installs and runs Installation should be as simple as using any coding harness agent and asking it to 'install and configure ACF for our system'.

> "Your results are anecdotal at best without anything more, and potentially misleading otherwise."

Agents were tasked to find public benchmarks suitable to test ACF. Agents reported no such benchmarks exist. I pressured them to look deeper, and talked them into trying what they thought was the best candidate (SWE Marathon).

After two weeks of test runs it was obvious the agents earlier assessment was correct. Much time and tokens were wasted verifying that. That is the data; the report is 'current public benchmarks are inadequate'.

I'd like to have the time to review other systems and learn. But what little function I have is used building ACF and preparing litigation. I wasted a lot of time trying to find what I needed in 2024-2025 before I spent all of 2026 building what I required. I tasked agents to see if there's anything even close to on par to ICM - there isn't. Same with SAMS. Nvidia researchers recently published about context management and their results and finding were stuff my agents and I solved back in Feb-Apr of 2026. I don't plan to keep hunting for what investigation repeatedly indicates doesn't exist - something better. I plan to just keep building, and then use the things I build to pursue the litigation and finish my medical research thesis.

1

u/DuckDatum 25m ago

What do you mean?

If the job is managing context, then virtually any agent benchmark works. Because context management is exactly what makes some agents perform better than others, even when they use the same underlying LLM.

There are a lot of benchmarks ready made for evaluating an agents ability to complete tasks. You simply run tests side by side with (1) your context management solution and (2) the default. Document how task completion changed. Did it finish faster? Better quality? Fewer tokens?

1

u/DuckDatum 3h ago

You don’t need nor want to generate this data, not directly anyhow.

You’re using coding agents to create this product, right? Like with opencode? Or pi, Claude, codex, etc?

Try using Phoenix project that integrates with your harness to collect OpenTelemetry events from the coding agent. That’s your data. You’re already using it, so just record it better with traces in Phoenix. Or something else if you prefer.

Then you have to do the hard work. Test your results against portability, code quality, complexity, … many concerns really, I won’t list them all here. Benchmarks too.

The benchmarks and test results offer feedback that grounds the agent over time. This is important.

Every once in a while, perform reviews on those traces and your benchmarks / tests. See what in your context and agentic loop would have caused issues (which are absolutely there). Iterate.

1

u/MakesNotSense 2h ago

Sounds interesting. I'll look into Phoenix and see if it'd be useful to developing ACF.