Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 18, 2026

Analyzed current agents and AKIS framework against industry patterns (LangChain, MetaGPT, OpenAI) to address context pollution in multi-agent workflows. 100k session simulation shows planning context leaking into implementation phases causes 65.7% pollution and 85.5% cognitive load.

100k Simulation Results

Metric Baseline Optimized Δ
Token Usage 20,179 10,382 -48.5%
Cognitive Load 85.5% 58.3% -31.9%
Context Pollution 65.7% 19.6% -70.1%

Changes

Simulation Engine (simulation.py)

  • Added context isolation metrics to SessionMetrics: context_pollution_score, planning_tokens_in_implementation, artifact_based_handoff
  • Added enable_context_isolation, artifact_based_handoffs to AKISConfiguration
  • Added context isolation simulation with clean handoff probability modeling

Agent Protocols (all 8 agents)

  • Defined typed artifact schemas for handoffs between agents
  • Each agent specifies clean input/output artifact format

Example artifact handoff:

artifact:
  type: design_spec
  summary: "Brief distillation"
  files_to_modify: ["file1.py"]
  key_decisions: ["use pattern X"]
  # NO conversation history, NO planning rationale

Framework Updates

  • copilot-instructions.md: Added Context Isolation section with handoff protocol
  • quality.instructions.md: Added context pollution gotchas
  • AGENTS.md: Added 100k metrics and handoff protocol
  • skills/INDEX.md: Updated with context isolation metrics

Custom agent used: AKIS
Workflow enforcement agent with 8-gate quality control, skill-based execution, and knowledge graph integration. Orchestrates all other agents.

Original prompt

we need to analzye current agents and we need to analzye insudtry and coomunity patterns and do 100k mixed sessions projections andwe should focus on agent adjustment and akis adjustment to use agents in a way that is beneficial to have whole clean context for agent itself ( for example if agent has a complex tast then planning and blueprinting should be in isolated context, and implementing should have clean context and start from scratch, then we should adjust and rerun projeted simulations andsuggest agent changes and akis framework changes to utilize this based on metrics ( token count api calls resolution precision traceability discipline ) and should use akis-dev for editing akis

Custom agent used: AKIS
Workflow enforcement agent with 8-gate quality control, skill-based execution, and knowledge graph integration. Orchestrates all other agents.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits January 18, 2026 13:38
…andoff protocols

- Add context isolation metrics to simulation.py (SessionMetrics, AKISConfiguration)
- Add context isolation simulation logic (artifact-based handoffs, clean context starts)
- Update AKIS agent with context isolation protocol and context budgets
- Update architect agent with handoff artifact format
- Update code agent with clean context input expectations
- Update research agent with output artifact for downstream agents
- Update copilot-instructions.md with context isolation section
- Update quality.instructions.md with context pollution gotchas
- Update AGENTS.md with 100k simulation results

100k Simulation Results:
- Token Usage: 20,179 → 10,382 (-48.5%)
- Cognitive Load: 85.5% → 58.3% (-31.9%)
- Context Pollution: 65.7% → 19.6% (-70.1%)
- Planning Tokens Leaked: 2,883 → 346 (-88.0%)
- Discipline: 80.8% → 88.0% (+8.9%)
- Success Rate: 85.9% → 90.0% (+4.8%)

Co-authored-by: goranjovic55 <83976007+goranjovic55@users.noreply.github.com>
…documentation, devops)

Complete the context isolation protocol across all agents with:
- debugger: Output artifact for bug diagnosis (600 tokens max)
- reviewer: Clean context input for code review (800 tokens max)
- documentation: Clean context input for docs (400 tokens max)
- devops: Clean context input for infrastructure (1000 tokens max)

Co-authored-by: goranjovic55 <83976007+goranjovic55@users.noreply.github.com>
…ontext isolation

Co-authored-by: goranjovic55 <83976007+goranjovic55@users.noreply.github.com>
Copilot AI changed the title [WIP] Analyze current agents and industry patterns for projections feat: Add context isolation simulation and agent handoff protocols for 48% token reduction Jan 18, 2026
Copilot AI requested a review from goranjovic55 January 18, 2026 13:44
@goranjovic55
Copy link
Owner

@copilot we should simplify and remove token budgets pleaes

Remove specific token budget numbers while keeping the core
context isolation concept (artifact-based handoffs):

- Remove context budget tables from AKIS, AGENTS.md
- Remove max token numbers from all agent artifact specs
- Remove context_budget_per_agent and max_planning_tokens from simulation.py
- Simplify copilot-instructions.md and skills/INDEX.md tables

The key concept of clean artifact-based handoffs remains, just without
specific token limits that were too prescriptive.

Co-authored-by: goranjovic55 <83976007+goranjovic55@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 18, 2026

@copilot we should simplify and remove token budgets pleaes

Removed token budgets in commit 3c1b942. The context isolation concept (artifact-based handoffs) remains, just simplified without specific token limits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants