feat: improve configuration, memory management, and docs - #129
Conversation
Document agent internals and known limitations in English and Chinese. Extend provider configuration and generated-memory management, and improve runtime, migration, market-data, and MCP reliability with regression coverage.
There was a problem hiding this comment.
Pull request overview
This PR improves DojoAgents’ configurability and operational ergonomics by extending OpenAI-compatible provider limits, adding a Dashboard API to clear generated skill-memory safely, improving market-data fallback behavior, and significantly expanding bilingual internal documentation (including a “known limitations” register).
Changes:
- Extend provider configuration to support
context_windowandmax_tokens, propagate limits through runtime/dashboard/MCP sampling, and add frontend form controls. - Add a Dashboard
DELETE /api/v1/memory/generated-skillsendpoint backed by a new generated-memory service with deletion verification and safety checks. - Improve runtime reliability/performance (skip turn-intent classification when no history; bulk kline snapshot indexing + per-symbol fallback) and update tests/docs accordingly.
Reviewed changes
Copilot reviewed 63 out of 63 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_turn_intent.py | Adds regression coverage for skipping turn-intent classification without history. |
| tests/test_runtime_multi_agent_plan.py | Ensures runtime wires OpenAI-compatible provider routing and output limits correctly. |
| tests/test_openai_provider_usage.py | Expands provider behavior tests (minimal request shape, author-prefixing, streaming tool-call metadata, reasoning field parsing). |
| tests/test_mcp_advanced.py | Updates MCP tests and adds coverage for sampling output-limit min(config, request). |
| tests/test_gateway_state.py | Updates integrated loop expectations to account for additional LLM calls (e.g., intent classifier). |
| tests/test_dashboard_config_update.py | Ensures dashboard config updates sync agent model when default provider changes. |
| tests/test_dashboard_chat_openai.py | Verifies runtime sync preserves OpenAI-compatible provider limits and context window. |
| tests/test_config_multi_agent_plan.py | Adds config parsing coverage for provider max_tokens. |
| tests/test_cli_gateway_setup.py | Adjusts gateway setup tests to capture log output instead of stdout where appropriate. |
| tests/test_built_in_plugins.py | Removes the example-plugin loading test (likely reflecting plugin set/behavior changes). |
| tests/test_agent_loop_integrated.py | Updates integrated loop assertions to account for additional LLM call(s). |
| tests/dashboard/stores/test_portfolio_migration.py | Updates portfolio migration tests for current schema normalization and backup behavior. |
| tests/dashboard/routers/test_memory.py | New tests for generated-memory deletion endpoint behavior and safety edge cases. |
| tests/dashboard/routers/conftest.py | Extends test doubles to match updated router/service expectations. |
| mkdocs.yml | Adds new bilingual nav entries for “Agent Internals” and “Known Limitations”. |
| dojoagents/tools/mcp_tool.py | Honors both provider and request token limits for MCP sampling; aligns SSE import for patchability in tests. |
| dojoagents/dashboard/web/src/types/settings.ts | Extends provider form types to include context_window and max_tokens. |
| dojoagents/dashboard/web/src/components/settings/SettingsModal.tsx | Adds UI fields and patch logic for provider context_window / max_tokens. |
| dojoagents/dashboard/services/portfolio_store.py | Adjusts migration logic to preserve an explicit v2 intermediate state before v3 conversion. |
| dojoagents/dashboard/services/generated_memory_service.py | Introduces a generated-memory clearing service with path validation and deletion verification. |
| dojoagents/dashboard/services/dojo_data_gateway.py | Adds bulk kline indexing (warm/cache) with correct fallback behavior for windows and missing symbols. |
| dojoagents/dashboard/server.py | Propagates provider max_tokens into runtime provider wiring; registers new memory router. |
| dojoagents/dashboard/schemas/memory.py | Adds response schema for generated-memory clearing endpoint. |
| dojoagents/dashboard/routers/memory.py | Adds DELETE /api/v1/memory/generated-skills endpoint using threadpool execution and structured errors. |
| dojoagents/config/models.py | Adds LLMProviderConfig.max_tokens; allows explicit null for web tool backends. |
| dojoagents/config/loader.py | Parses provider max_tokens; preserves explicit null for web tool backends (no silent defaulting). |
| dojoagents/agent/turn_intent.py | Skips intent classification when no session history is present. |
| dojoagents/agent/runtime.py | Passes provider max_tokens into OpenAI-compatible provider construction. |
| dojoagents/agent/providers.py | Adds provider-level max_tokens support and improves reasoning extraction across response variants. |
| docs/site/zh/reference/dashboard-api.md | Documents dashboard security boundary and new memory deletion API. |
| docs/site/zh/reference/configuration.md | Documents provider max_tokens and explicit null disabling for web tools; references known limitations. |
| docs/site/zh/getting-started/model-configuration.md | Adds guidance for custom OpenAI-compatible providers including limits. |
| docs/site/zh/development/repository-map.md | Updates repository map with links to new “Agent Internals” doc and extension guidance. |
| docs/site/zh/development/known-limitations.md | Adds bilingual “known limitations” register (ZH). |
| docs/site/zh/development/index.md | Adds “Known Limitations” link in development index (ZH). |
| docs/site/zh/development/adding-tools.md | Adds further reading link to “Agent Internals” (ZH). |
| docs/site/zh/architecture/tools-and-sandbox.md | Adds “Agent Internals” cross-link (ZH). |
| docs/site/zh/architecture/runtime.md | Adds “Agent Internals” cross-link (ZH). |
| docs/site/zh/architecture/plugins.md | Adds “Agent Internals” cross-link (ZH). |
| docs/site/zh/architecture/overview.md | Updates architecture overview to reflect Strands kernel + bridges; adds further reading links (ZH). |
| docs/site/zh/architecture/multi-agent-planning.md | Adds “Agent Internals” cross-link (ZH). |
| docs/site/zh/architecture/memory.md | Adds “Agent Internals” cross-link (ZH). |
| docs/site/zh/architecture/index.md | Adds “Agent Internals” entry (ZH). |
| docs/site/zh/architecture/event-driven.md | Adds “Agent Internals” cross-link (ZH). |
| docs/site/zh/architecture/agent-loop.md | Adds pointer to “Agent Internals” for real implementation (ZH). |
| docs/site/zh/architecture/agent-internals.md | New deep-dive “Agent Internals” documentation (ZH). |
| docs/site/en/reference/dashboard-api.md | Documents dashboard security boundary and new memory deletion API. |
| docs/site/en/reference/configuration.md | Documents provider max_tokens and explicit null disabling for web tools; references known limitations. |
| docs/site/en/getting-started/model-configuration.md | Adds guidance for custom OpenAI-compatible providers including limits. |
| docs/site/en/development/repository-map.md | Updates repository map with “Agent Internals” links and extension guidance. |
| docs/site/en/development/known-limitations.md | Adds bilingual “known limitations” register (EN). |
| docs/site/en/development/index.md | Adds “Known Limitations” link in development index (EN). |
| docs/site/en/development/adding-tools.md | Adds further reading link to “Agent Internals” (EN). |
| docs/site/en/architecture/tools-and-sandbox.md | Adds “Agent Internals” cross-link (EN). |
| docs/site/en/architecture/runtime.md | Adds “Agent Internals” cross-link (EN). |
| docs/site/en/architecture/plugins.md | Adds “Agent Internals” cross-link (EN). |
| docs/site/en/architecture/overview.md | Updates architecture overview to reflect Strands kernel + bridges; adds further reading links (EN). |
| docs/site/en/architecture/multi-agent-planning.md | Adds “Agent Internals” cross-link (EN). |
| docs/site/en/architecture/memory.md | Adds “Agent Internals” cross-link (EN). |
| docs/site/en/architecture/index.md | Adds “Agent Internals” entry (EN). |
| docs/site/en/architecture/event-driven.md | Adds “Agent Internals” cross-link (EN). |
| docs/site/en/architecture/agent-loop.md | Adds pointer to “Agent Internals” for real implementation (EN). |
| docs/site/en/architecture/agent-internals.md | New deep-dive “Agent Internals” documentation (EN). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| for child in target.iterdir(): | ||
| if child.is_symlink() or not child.is_dir(): | ||
| child.unlink() | ||
| else: | ||
| shutil.rmtree(child, onexc=self._force_remove) | ||
| deleted_count += 1 |
| @staticmethod | ||
| def _validate_target(target: Path) -> None: | ||
| absolute = target.absolute() | ||
| home = Path.home().absolute() | ||
| if absolute == Path(absolute.anchor) or absolute == home: | ||
| raise UnsafeGeneratedMemoryPathError( | ||
| f"Refusing to clear unsafe generated memory path: {target}" | ||
| ) |
|
Hi, we are currently in the process of migrating new features to the feat/harness-v2 branch. Please submit your PR against that branch instead. We plan to merge feat/harness-v2 into the main branch in the next 1–2 weeks. Thank you for your contribution! |
Summary
This pull request improves DojoAgents documentation, provider configuration,
generated-memory management, and runtime reliability.
Changes
tools, events, memory, plugins, and multi-agent planning.
boundaries and validation status.
settings, including dashboard configuration support.
post-deletion verification.
available.
Validation
The full test suite was not reported as completed because the single-process run
encountered prolonged filesystem I/O stalls.
Known dependency issue
npm auditcurrently reports one high-severity issue in the transitivepostcss@8.5.15dependency. This pull request does not modify the dependencylockfile and records the issue as a known limitation.