Skip to content

Instantly share code, notes, and snippets.

@coderplay
coderplay / mini_codex.py
Last active October 14, 2025 22:41
mini version of openai codex, for study
#!/usr/bin/env python3
from __future__ import annotations
import json, os, subprocess, sys, tempfile, time, uuid
from shlex import quote as shlex_quote
from dataclasses import dataclass
from typing import Any, Dict, Iterable, List, Optional
from urllib import request
from urllib.error import HTTPError, URLError

Cline Agent System Architecture & Core Workflow

Overview

Cline is a sophisticated AI Agent system built as a VSCode extension that provides intelligent coding assistance through a multi-modal architecture. The system implements a dual-mode (Plan/Act) agent loop with robust state management, tool execution capabilities, and seamless integration with various AI providers.

Core Architecture Components

1. Extension Layer (Entry Point)

  • Location: src/extension.ts
@coderplay
coderplay / 0-state-types.md
Last active July 10, 2025 22:02
Flink State Research

Flink State Types

Flink supports 8 main state types organized in a hierarchy. Here's the complete list with detailed explanations:

1. Keyed State Types (for KeyedStream)

Core State Types:

1. ValueState<T>

  • Stores a single value per key

WrenAI Architecture Documentation

Overview

WrenAI is a comprehensive AI-powered data modeling and query generation platform that transforms natural language questions into SQL queries. The system consists of multiple interconnected services that work together to provide intelligent data analysis capabilities.

High-Level Architecture

graph TB

How AutoGPT Implements Observe → Reasoning → Action → Observe Feedback Loops

AutoGPT implements a sophisticated feedback loop system through its interaction loop architecture that closely follows the observe-reasoning-action pattern. Here's a detailed breakdown:

1. OBSERVE Phase - Information Gathering

Previous Action Results

AutoGPT observes the results of previous actions through the ActionResult system: