Quick Start
Prerequisites
Section titled “Prerequisites”- Docker
Start Actionbase
Section titled “Start Actionbase”docker run -it ghcr.io/kakao/actionbase:standaloneThis runs the server in the background (port 8080) and the CLI in the foreground.
actionbase>Write Data
Section titled “Write Data”Load sample data using a preset (at actionbase> prompt):
load preset likesThis creates a likes database/table and inserts 3 edges:
│ 3 edges inserted │ - Alice → Phone │ - Bob → Phone │ - Bob → LaptopAlice --- likes ----> +--------+ | Phone |Bob ----- likes ----> +--------+ | | +--------+ +-- likes ----> | Laptop | +--------+At write time, Actionbase precomputes everything for reads—counts, indexes, ordering for both directions. This means you can instantly query:
“What did Bob like?” (direction: OUT)
“Who liked Phone?” (direction: IN)
Counts and indexes ready at write time—no computation at query time.
REST API equivalent
To use curl, run with
-p 8080:8080and use another terminal:Terminal window docker run -it -p 8080:8080 ghcr.io/kakao/actionbase:standalone
Create service (database)
curl -X POST "http://localhost:8080/graph/v2/service/likes" \ -H "Content-Type: application/json" \ -d '{"desc":"Likes"}'Create label (table)
curl -X POST "http://localhost:8080/graph/v2/service/likes/label/likes" \ -H "Content-Type: application/json" \ -d '{ "desc":"Like", "type":"INDEXED", "schema":{ "src":{"type":"STRING"}, "tgt":{"type":"STRING"}, "fields":[{"name":"created_at","type":"LONG","nullable":false}] }, "dirType":"BOTH", "storage":"datastore://likes/likes", "indices":[{"name":"recent","fields":[{"name":"created_at","order":"DESC"}]}] }'Insert edges
curl -X POST "http://localhost:8080/graph/v3/databases/likes/tables/likes/edges" \ -H "Content-Type: application/json" \ -d '{ "mutations":[ {"type":"INSERT","edge":{"version":1737377177245,"source":"Alice","target":"Phone","properties":{"created_at":1737377177245}}}, {"type":"INSERT","edge":{"version":1737377177297,"source":"Bob","target":"Phone","properties":{"created_at":1737377177297}}}, {"type":"INSERT","edge":{"version":1737377177350,"source":"Bob","target":"Laptop","properties":{"created_at":1737377177350}}} ] }'Read Data
Section titled “Read Data”Check if a specific edge exists:
get --source Alice --target Phone │ The edge is found: [Alice -> Phone] │ |---------------|--------|--------|---------------------------| │ | VERSION | SOURCE | TARGET | PROPERTIES | │ |---------------|--------|--------|---------------------------| │ | 1737377177245 | Alice | Phone | created_at: 1737377177245 | │ |---------------|--------|--------|---------------------------|REST API equivalent
curl "http://localhost:8080/graph/v3/databases/likes/tables/likes/edges/get?source=Alice&target=Phone"What did Bob like? (direction: OUT)
scan --index recent --start Bob --direction OUT │ The 2 edges found (offset: -, hasNext: false) │ |---|---------------|--------|--------|---------------------------| │ | # | VERSION | SOURCE | TARGET | PROPERTIES | │ |---|---------------|--------|--------|---------------------------| │ | 1 | 1737377177350 | Bob | Laptop | created_at: 1737377177350 | │ | 2 | 1737377177297 | Bob | Phone | created_at: 1737377177297 | │ |---|---------------|--------|--------|---------------------------|Who liked Phone? (direction: IN)
scan --index recent --start Phone --direction IN │ The 2 edges found (offset: -, hasNext: false) │ |---|---------------|--------|--------|---------------------------| │ | # | VERSION | SOURCE | TARGET | PROPERTIES | │ |---|---------------|--------|--------|---------------------------| │ | 1 | 1737377177297 | Bob | Phone | created_at: 1737377177297 | │ | 2 | 1737377177245 | Alice | Phone | created_at: 1737377177245 | │ |---|---------------|--------|--------|---------------------------|REST API equivalent
# OUTcurl "http://localhost:8080/graph/v3/databases/likes/tables/likes/edges/scan/recent?start=Bob&direction=OUT"
# INcurl "http://localhost:8080/graph/v3/databases/likes/tables/likes/edges/scan/recent?start=Phone&direction=IN"How many items did Alice like? (direction: OUT)
count --start Alice --direction OUT │ |-------|-----------|-------| │ | START | DIRECTION | COUNT | │ |-------|-----------|-------| │ | Alice | OUT | 1 | │ |-------|-----------|-------|How many users liked Phone? (direction: IN)
count --start Phone --direction IN │ |-------|-----------|-------| │ | START | DIRECTION | COUNT | │ |-------|-----------|-------| │ | Phone | IN | 2 | │ |-------|-----------|-------|REST API equivalent
# OUTcurl "http://localhost:8080/graph/v3/databases/likes/tables/likes/edges/count?start=Alice&direction=OUT"
# INcurl "http://localhost:8080/graph/v3/databases/likes/tables/likes/edges/count?start=Phone&direction=IN"Next Steps
Section titled “Next Steps”- Core Concepts — How Actionbase works
- Build Your Social Media App — Hands-on guide
- CLI Reference — Full CLI documentation