dde71cf8e2
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 1m12s
CI / quality (pull_request) Successful in 1m24s
CI / push-validation (pull_request) Successful in 33s
CI / helm (pull_request) Successful in 34s
CI / typecheck (pull_request) Successful in 1m33s
CI / build (pull_request) Successful in 1m13s
CI / benchmark-regression (pull_request) Failing after 37s
CI / security (pull_request) Successful in 2m25s
CI / e2e_tests (pull_request) Successful in 4m31s
CI / unit_tests (pull_request) Successful in 6m25s
CI / integration_tests (pull_request) Successful in 6m24s
CI / docker (pull_request) Successful in 1m36s
CI / coverage (pull_request) Successful in 13m7s
CI / coverage (push) Blocked by required conditions
CI / docker (push) Blocked by required conditions
CI / status-check (push) Blocked by required conditions
CI / benchmark-publish (push) Waiting to run
CI / benchmark-regression (push) Waiting to run
CI / status-check (pull_request) Successful in 5s
CI / push-validation (push) Successful in 31s
CI / quality (push) Successful in 1m22s
CI / lint (push) Successful in 1m28s
CI / helm (push) Successful in 43s
CI / build (push) Successful in 1m0s
CI / security (push) Successful in 1m41s
CI / typecheck (push) Successful in 2m5s
CI / e2e_tests (push) Successful in 4m13s
CI / integration_tests (push) Successful in 4m37s
CI / unit_tests (push) Has been cancelled
Split docs/advanced-concepts.md (554 lines) into four sub-documents under docs/advanced-concepts/ and docs/tui.md (634 lines) into four sub-documents under docs/tui/, each under the 500-line limit per CONTRIBUTING.md. Advanced Concepts sub-documents: - docs/advanced-concepts/index.md: Overview, context strategies, LLM backends - docs/advanced-concepts/resource-types.md: Resource types, A2A rename - docs/advanced-concepts/container-tools.md: Container tools, scope chain, budgets, safety - docs/advanced-concepts/e2e-tests-and-plugins.md: E2E tests, code review, plugins TUI sub-documents: - docs/tui/index.md: Overview, getting started, main screen layout - docs/tui/sidebar-and-personas.md: Sidebar states, persona system - docs/tui/input-and-sessions.md: Reference/command input, session management - docs/tui/configuration-and-integration.md: Config, key bindings, theme, integration Updated mkdocs.yml navigation to reflect new sub-document structure. Updated CONTRIBUTORS.md with contribution entry for PR #9903. ISSUES CLOSED: #10533
118 lines
4.9 KiB
Markdown
118 lines
4.9 KiB
Markdown
# Advanced Concepts (v3.6.0)
|
||
|
||
> **Milestone:** v3.6.0 — M7: Advanced Concepts & Deferred Features
|
||
> **Status:** In Progress (~33% complete as of 2026-04-15)
|
||
> **Goal:** Advanced capabilities that extend beyond the core MVP without requiring the TUI (M8) or Server (M9).
|
||
|
||
---
|
||
|
||
## Overview
|
||
|
||
v3.6.0 builds on the stable foundation established by v3.0.0–v3.5.0 to introduce advanced
|
||
capabilities that were intentionally deferred from the MVP. These features enrich the
|
||
CleverAgents platform for power users and production deployments: richer context strategies,
|
||
broader LLM provider support, additional resource types, a standardized A2A protocol, container
|
||
tool execution, extensible scope chain resolution, cost and safety budgets, end-to-end workflow
|
||
tests, and a plugin architecture.
|
||
|
||
None of these features require the TUI (v3.7.0) or the Server (v3.9.0) — they are fully
|
||
usable from the CLI and programmatic API.
|
||
|
||
**Sub-sections:**
|
||
|
||
- [Context Strategies & LLM Backends](index.md) — this page
|
||
- [Resource Types & A2A Rename](resource-types.md)
|
||
- [Container Tools, Scope Chain, Budgets & Safety](container-tools.md)
|
||
- [E2E Tests, Code Review Examples & Plugin Architecture](e2e-tests-and-plugins.md)
|
||
|
||
---
|
||
|
||
## Advanced Context Strategies
|
||
|
||
The ACMS (Adaptive Context Management System) introduced in v3.4.0–v3.5.0 provides a
|
||
four-stage pipeline: **Gather → Prioritize → Assemble → Deliver**. v3.6.0 extends this
|
||
pipeline with advanced strategies for large-scale and multi-project workloads.
|
||
|
||
### Beyond the Basic ACMS Pipeline
|
||
|
||
The basic pipeline assembles context from a single project's resources using a fixed priority
|
||
order. Advanced strategies add:
|
||
|
||
| Strategy | Description |
|
||
|----------|-------------|
|
||
| **Cross-project context merging** | Assembles context from multiple projects simultaneously, respecting per-project budgets and cross-project relevance scores |
|
||
| **Incremental context updates** | Sends only the diff of context changes between turns rather than re-assembling the full context on every prompt |
|
||
| **Semantic deduplication** | Detects and removes semantically equivalent fragments before assembly, reducing token waste |
|
||
| **Adaptive tier promotion** | Automatically promotes frequently-accessed warm/cold fragments to hot tier based on access patterns across a session |
|
||
| **Resource-type-aware budgeting** | Allocates context budget by resource type (e.g., 40% source code, 30% tests, 20% docs, 10% config) rather than a flat priority queue |
|
||
|
||
### Context Request Protocol (CRP) Extensions
|
||
|
||
The CRP (defined in ADR-014) is extended with new directive types:
|
||
|
||
- `focus_path` — elevates a specific file path to the highest priority tier, overriding all
|
||
other budget constraints
|
||
- `exclude_pattern` — excludes files matching a glob pattern from context assembly
|
||
- `max_fragment_size` — caps the size of any single fragment to prevent one large file from
|
||
consuming the entire budget
|
||
- `semantic_group` — groups related fragments so they are either all included or all excluded
|
||
(prevents partial inclusion of tightly coupled files)
|
||
|
||
---
|
||
|
||
## Additional LLM Backends
|
||
|
||
v3.6.0 adds first-class support for additional LLM providers beyond the Anthropic and OpenAI
|
||
backends available in v3.5.0.
|
||
|
||
### Supported Providers (v3.6.0 additions)
|
||
|
||
| Provider | Actor Namespace | Notes |
|
||
|----------|----------------|-------|
|
||
| **Google Gemini** | `google/gemini-*` | Gemini 1.5 Pro and Flash; supports long-context (1M tokens) |
|
||
| **Mistral AI** | `mistral/*` | Mistral Large, Codestral; strong code generation |
|
||
| **Ollama (local)** | `ollama/*` | Any model served by a local Ollama instance |
|
||
| **LM Studio** | `lmstudio/*` | OpenAI-compatible local inference |
|
||
| **Azure OpenAI** | `azure/*` | Azure-hosted OpenAI models with enterprise auth |
|
||
| **AWS Bedrock** | `bedrock/*` | Anthropic, Meta, and Mistral models via AWS |
|
||
| **Groq** | `groq/*` | Ultra-fast inference for Llama and Mixtral models |
|
||
|
||
### Provider Configuration
|
||
|
||
All providers are configured in `~/.config/cleveragents/config.toml` under the `[providers]`
|
||
section. Each provider supports a common set of base arguments (`temperature`, `max_tokens`,
|
||
`thinking_effort` where applicable) plus provider-specific extensions.
|
||
|
||
```toml
|
||
[providers.google]
|
||
api_key = "${GOOGLE_API_KEY}"
|
||
default_model = "gemini-1.5-pro"
|
||
|
||
[providers.ollama]
|
||
base_url = "http://localhost:11434"
|
||
default_model = "llama3.2"
|
||
```
|
||
|
||
### Provider Fallback Chains
|
||
|
||
A new `provider_fallback` configuration allows defining ordered fallback chains for resilience:
|
||
|
||
```toml
|
||
[actor.default]
|
||
provider_fallback = [
|
||
"anthropic/claude-4-sonnet",
|
||
"google/gemini-1.5-pro",
|
||
"ollama/llama3.2",
|
||
]
|
||
```
|
||
|
||
When the primary provider fails (rate limit, outage, or cost budget exceeded), the system
|
||
automatically retries with the next provider in the chain.
|
||
|
||
---
|
||
|
||
*Documentation for v3.6.0 — IN PROGRESS. Features described here reflect the planned scope
|
||
as of 2026-04-15. Some features may be adjusted as implementation progresses.*
|
||
|
||
*Generated by [AUTO-DOCS-5] — CleverAgents Documentation Bot*
|