Skip to content

Instantly share code, notes, and snippets.

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:

@coderplay
coderplay / config.json
Created April 18, 2020 20:16
OCI bundle for docker run --runtime kata-runtime --device=/var/run/kata-containers/vhost-user/block/devices/vhostblk0:/dev/vda -it ubuntu /bin/bash
{
"ociVersion": "1.0.1-dev",
"process": {
"terminal": true,
"user": {
"uid": 0,
"gid": 0
},
"args": [
"/bin/bash"
@coderplay
coderplay / FaultInjectionRunner.java
Created October 26, 2019 07:32
Fault Injection based on RandomizedRunner
import com.carrotsearch.randomizedtesting.RandomizedRunner;
import org.jboss.byteman.contrib.bmunit.BMRule;
import org.jboss.byteman.contrib.bmunit.BMRules;
import org.jboss.byteman.contrib.bmunit.BMRunnerUtil;
import org.jboss.byteman.contrib.bmunit.BMScript;
import org.jboss.byteman.contrib.bmunit.BMScripts;
import org.jboss.byteman.contrib.bmunit.BMUnit;
import org.jboss.byteman.contrib.bmunit.BMUnitConfig;
import org.jboss.byteman.contrib.bmunit.BMUnitConfigState;
@coderplay
coderplay / bpf
Created June 2, 2018 17:14
bpf playground
$ sudo /usr/local/sbin/ply -D -c 'kprobe:vfs_read{ printf("%v: %v\n", comm(), arg(0)); }'
symtable:
ast:
`-> <script> (type:script/none size:0x0 loc:nowhere)
`-> kprobe:vfs_read (type:probe/none size:0x0 loc:nowhere)
`-> <auto>.printf (type:call/none size:0x0 loc:reg/0)
|-> "%v: %v\n"(type:str/str size:0x8 loc:virtual)
`-> <rec> (type:rec/none size:0x20 loc:stack/-0x20)
|-> 0 (type:int/int size:0x8 loc:stack/-0x20)
pool-1-thread-126" #152 prio=5 os_prio=0 tid=0x00007f34ec6ae800 nid=0xc03f waiting on condition [0x00007f3416be9000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x0000000080451948> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkUntil(LockSupport.java:256)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitUntil(AbstractQueuedSynchronizer.java:2120)
at org.apache.http.pool.AbstractConnPool.getPoolEntryBlocking(AbstractConnPool.java:378)
at org.apache.http.pool.AbstractConnPool.access$200(AbstractConnPool.java:69)
at org.apache.http.pool.AbstractConnPool$2.get(AbstractConnPool.java:246)
- locked <0x00000005d0231ab8> (a org.apache.http.pool.AbstractConnPool$2)
@coderplay
coderplay / python-bytecode
Created January 1, 2018 18:56
python bytecode
bash-3.2$ python
Python 2.7.10 (default, Feb 6 2017, 23:53:20)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> def func(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12):
def func(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12):
... return arg1+arg2+arg3+arg4+arg5+arg6+arg7+arg8+arg9+arg10+arg11+arg12
return arg1+arg2+arg3+arg4+arg5+arg6+arg7+arg8+arg9+arg10+arg11+arg12
...
@coderplay
coderplay / frequent-young-g1-gc.md
Last active April 11, 2018 15:56
user/kernel space c++ method tracing

frequent YGC.

# To display the perf.data header info, please use --header/--header-only options.
#
#
# Total Lost Samples: 0
#
# Samples: 535K of event 'cycles'
@coderplay
coderplay / .bash_profile
Last active January 21, 2017 18:30
Intellij Configurations, good for Emacs guys
export PATH=/usr/local/sbin:$PATH
export JAVA_HOME="$(/usr/libexec/java_home -v 1.8)"
# GOLANG
export GOPATH=$HOME/software/gopath
export PATH=$PATH:$GOPATH/bin
# GNU TAR
export PATH=/usr/local/opt/gnu-tar/libexec/gnubin:$PATH