Knowledge Share
Technical articles, tutorials, and insights
Code Agent Dissection (11): Harness Design Part 1 — Control Flow
Examining MyCodeAgent's control flow from a harness engineering design perspective: why a single main loop rather than multiple nested loops, the engineering value of immutable state machines, the completion gate's feedback loop design, and the completeness of termination paths. This is the first article of Part 4 Harness Engineering, focused on 'why it was designed this way' rather than 'what it is.'
Code Agent Dissection (09): When the Conversation Gets Too Long, What Happens When Tokens Run Out?
A deep dive into MyCodeAgent's context engineering: HistoryManager's append-only fact log, ProjectionBuilder's read-time projection, ContextBudgetPolicy's trigger logic, and ContextCompactor's LLM summary compression. Understand why 'history is never deleted' and 'giving the model a bounded view' are two completely different things, and how an agent compresses context within budget without losing facts.
Code Agent Dissection (10): When the Agent Crashes, How Does It Recover? Where Is Conversation History Stored?
A deep dive into MyCodeAgent's persistence and recovery mechanism: TranscriptStore's append-only JSONL event stream, five event types, ResumeLoader rebuilding runtime state from events, UncertainAction's tool interruption handling, and SessionMemory for cross-run feed-forward memory. Understand why agents can't rely on memory for history, and the complete chain for deterministic crash recovery.
Enterprise Knowledge Base (03): Graph-Enhanced RAG Benchmark — GraphRAG vs HippoRAG
Same 89 questions, two graph-enhanced RAG frameworks: GraphRAG 3.1.1 and HippoRAG 2.0. This article covers the full deployment journey — GLM-4-flash structured output failures, LanceDB dimension mismatches, NV-Embed-v2 offline loading — and the actual numbers across single-hop, multi-hop, and boundary refusal.
Code Agent Dissection (08): When a Task Is Too Complex, How Do You Delegate to a Sub-Agent?
A deep dive into MyCodeAgent's sub-agent mechanism: the Task tool, RuntimeProfile sandbox constraints, SubagentLauncher's complete execution chain, and structured result contracts. Understand how the main agent delegates exploratory tasks to a read-only lightweight sub-agent, and why sub-agents are not 'simplified main agents' but strictly constrained execution units.
Code Agent Dissection (07): How Are External Tools Integrated? A Deep Dive into MCP
A deep dive into MyCodeAgent's MCP integration: optional dependencies, config discovery, stdio/HTTP transport, Adapter disguising remote tools as local Tools, and result normalization into a unified protocol. Understand how external capabilities enter the same tool pipeline, and why 'registered in the registry' and 'allowed to execute' are two separate concerns.
Open Source Project #192: shadcn-admin — Vite + shadcn/ui Admin Dashboard Reference Collection, 10+ Pages, RTL Support, Accessibility-First — A UI Reference, Not a Starter Template
satnaing's open-source admin dashboard UI reference collection built on shadcn/ui + Vite + TanStack Router. Includes 10+ pages: Dashboard, Tasks, Users, Chats, Apps, Settings, Help Center. Global search command, light/dark mode, full RTL layout support, Clerk authentication integration. Positioned as a UI reference collection, not a production scaffold. Radix UI foundation ensures accessibility. No Next.js dependency — pure Vite build, lighter and simpler to deploy. 13.9k Stars, MIT.
Open Source Project #193: Semantica — Open-Source Palantir for AI Agents, Knowledge Graph + Deterministic Reasoning + W3C Provenance for Traceable, Auditable, Compliant AI Decisions
semantica-agi's graph-native AI infrastructure layer, positioned as the context and accountability layer for AI agents. Knowledge graph construction (Neo4j/FalkorDB/RDF), deterministic reasoning (Rete/Datalog/SPARQL/forward chaining, no LLM required), W3C PROV-O provenance (every fact traceable to its source), conflict detection and resolution, time-travel snapshots, compliance export (OWL/SHACL/RDF). Not a RAG framework, not a vector database — the explainable decision layer sitting beneath all of them. Integrates with Claude Code, Cursor, Codex, Agno, CrewAI, LangChain, LlamaIndex, and more. 8.2k Stars, MIT.
Open Source Project #194: deepseek-harness — DeepSeek's AI Agent Development Framework, Everything is a Plugin + PTC Programmatic Composition + Full Trajectory Tracing, 137k Stars
DeepSeek AI's agent development framework built on the Cordis plugin architecture — the kernel manages only plugin lifecycle; everything else (tools, backends, UI) is a swappable plugin. Four modes: Standard (full toolchain), PTC (model writes a TypeScript program to compose operations rather than calling tools step-by-step), Minimal (bare bash + editor for benchmarking), Creative (runtime plugin trials). Append-only session logs capture every system prompt, CoT, tool call, and sub-agent dispatch — supports resume/fork/replay. Single-line launch: npx @deepseek-ai/dsh web. 137.1k Stars, MIT.
Open Source Project #195: OpenTelemetry Demo (Astronomy Shop) — The Official Distributed Observability Sandbox: 12 Languages, 17 Microservices, 13 Fault Switches, Used by 50+ Cloud Vendors for Integration Demos
OpenTelemetry's official demo system — a real e-commerce microservice app called Astronomy Shop that demonstrates Traces/Metrics/Logs across 17 services in 12 languages (.NET/Go/Java/Kotlin/Python/Rust/Ruby/PHP/C++/TypeScript/JavaScript/Elixir). 13 toggleable fault scenarios (memory leaks, CPU spikes, unreachable services, Kafka backlog). Full visualization stack: Grafana + Jaeger + Prometheus. Datadog, Elastic, AWS, GCP, New Relic, and 50+ more vendors use this as their OTel integration demo base. Docker or Helm deploy. 3.3k Stars, Apache-2.0.
Code Agent Anatomy (05): How Does the Model Know Which Tools Are Available? How Is Function Calling Implemented?
Follow a tool_call from start to finish: how tools register into the Registry, how the Registry generates function schemas to inform the model, how the Orchestrator batches execution after the model triggers tool_calls, the ToolExecutor's permission/optimistic-lock/circuit-breaker pipeline, why the ToolResult protocol separates internal and external representations, and how observation results are truncated before being written back to history.
Code Agent Anatomy (06): How Do Skills Dynamically Extend an Agent's Capabilities?
A deep dive into the Skills dynamic extension mechanism in MyCodeAgent: how a single Markdown file gives an agent new capabilities without writing any Python code, covering the full lifecycle from definition, scanning, and prompt injection to invocation and execution.