Third-party architecture audit notes from agchk
Hi maintainers — sharing a small third-party static architecture audit in case it is useful. Please feel free to close if this is not a useful tracking item for AutoGen.
I ran agchk against the current microsoft/autogen repository with the personal-development profile:
agchk /tmp/agchk-outreach/autogen --profile personal
This is not a vulnerability disclosure. It is a static architecture-level scan intended to identify agent-runtime complexity patterns and possible documentation/rubric improvements.
Summary
- Architecture era:
铁器时代/ Iron Age,47/100 - Share line:
这个 Agent 项目处于 铁器时代(47/100):具备较清晰的工具、记忆和技能分层,开始可维护。 - Overall health signal:
unstable - Finding counts:
critical=0,high=6,medium=15,low=65
Signals that looked most useful
-
Runtime/orchestration complexity AutoGen naturally contains many orchestration concepts. The scan suggests it may be valuable to keep a concise architecture map for which layer owns routing, scheduling, recovery, memory/session boundaries, and tool execution.
-
Completion closure in generated/docs workflows Some docs/scripts look like they create or update artifacts without an explicit reusable closure model. A review rubric like
artifact created -> indexed -> discoverable -> reusable -> acceptedmay help agent-generated contributions stay maintainable. -
Memory/session freshness boundaries The scan saw many memory-like examples and samples. A short guide distinguishing hot context, session state, persisted state, and long-term memory could make the mental model easier for new users.
-
Code execution findings need context Some
execfindings are intentional or already acknowledged in validation/security-related code. The useful follow-up is probably not “remove exec everywhere”, but “make trust boundaries and intended execution contexts unmistakable.”
Likely false positives / caveats
- SQLModel-style
session.exec(...)is not Pythonexecand should be ignored by generic scanners. - Some execution-related findings are in docs, tests, validation, or explicitly security-aware code.
- Large multi-language repos amplify static pattern counts, so the score is best read as an architecture-complexity signal.
Why I am filing this
The goal is to share a compact external view, not to ask AutoGen to adopt another tool. If any signal is useful, I can follow up with a narrowly scoped docs proposal. Separately, AutoGen is a strong regression target for improving agchk false-positive handling around session.exec, provider implementations, and multi-runtime repos.
Related themes I noticed while searching existing issues: #6017, #7230, #7405, and #7613.
Thanks for the thoughtful review, @dengluozhang! Glad to hear the signals resonate. Since you highlighted runtime/orchestration complexity, memory/session boundaries, and the completion closure observation as worth acting on, I'd like to propose a concrete next step: --- ### Proposed Deliverable: docs/design/06 - Architecture Map and Layer Guide.md I noticed the docs/design/ folder has five numbered design docs (01–05), last updated March 2025. I propose adding a 06 that covers: 1. Layer Ownership Matrix — a concise table mapping which layer owns routing, scheduling, recovery, memory/session boundaries, and tool execution. This directly addresses the orchestration complexity signal. 2. Memory Lifecycle Guide — distinguishing hot context → session state → persisted state → long-term memory, with examples of when each should be used. This addresses the freshness boundaries issue that bites users in long sessions. 3. Artifact Closure Rubric — formalizing created → indexed → discoverable → reusable → accepted as an invariant for agent-generated contributions. --- ### Scope & Format - Narrowly focused: not a full rewrite, just a compact reference doc - Markdown with Mermaid diagrams: can be rendered directly in GitHub or on the docs site - Timeline: I can have a v0.1 draft PR ready within 1–2 weeks ### Questions for maintainers - Does this fit the docs/design/ structure, or would you prefer it live elsewhere? - Should I start as a Discussion for feedback, or go straight to a docs PR? - Is there an existing architecture diagram I should align with? Happy to own the initial draft. If it doesn't fit the current priorities, no worries — this issue can stay as a reference point. --- Separately, would it make sense to add a documentation label to this issue for visibility during triage?
Thanks for the detailed thoughts, @dengluozhang. Quick clarification before I decide on the next step: are you part of the AutoGen maintainer team, or are you speaking from an external/community-review perspective?
I want to avoid misreading this as maintainer guidance before drafting a docs PR. Either way, your feedback is helpful.
Seeing architecture scans like this is super valuable for long-running agent systems. We’ve also wrestled with runtime orchestration complexity in multi-agent setups, and maintaining a clear map of which layer handles routing, scheduling, and recovery saved us from a lot of debugging headaches. Tools like Mermaid.js helped us keep architecture diagrams in sync with code, which made onboarding and evolution easier.
Regarding artifact lifecycle, adopting a strict state machine or workflow model (e.g., created → indexed → discoverable → reusable → accepted) is a pattern we implemented in one of our RAG pipelines using Airflow to enforce data and documentation quality gates. You might consider integrating something similar to avoid drift in agent-generated docs or artifacts.
Lastly, memory/session freshness boundaries are always tricky. We found explicit versioning and expiration timestamps in memory stores (Redis-based with TTLs, for example) helped keep session context consistent without stale data creeping in. If you’re not already, adding automated expiry or refresh triggers based on usage patterns could help here.