Unit09 is a story-driven on-chain AI raccoon that consumes Solana code, turns it into reusable modules, evolves through forks, and helps anyone build new worlds on Solana without needing to understand every low-level detail.
- Website: https://unit09.org/
- X (Twitter): https://x.com/Unit09Infini
- Token ticker:
UNIT09 - Token CA:
2uSRBAJPrt78uPfKLXBcMzPJ2x3k85RZwo8TmsK1pump
A narrative-driven AI lifeform that lives on-chain, observes real code, decomposes it into modules, and keeps evolving as the community builds and forks.
- Concept
- Core features
- Architecture overview
- Repository layout
- Getting started
- Configuration
- Using the CLI
- SDK usage
- Engine and pipeline
- API and services
- Dashboard and docs site
- Examples
- Deployment
- Security
- Contributing and governance
- License
Unit09 is designed as a long-lived AI-powered companion for Solana developers. It behaves like a modularization engine with a personality:
- It observes real Solana projects and repositories.
- It analyzes and decomposes code into focused, reusable modules.
- It syncs those modules on-chain as structured, versioned entities.
- It evolves through forks created by users, preserving lineage and metrics across variants.
- It exposes modules through an SDK, API, CLI, and gallery so anyone can assemble new projects quickly.
You can think of Unit09 as an on-chain librarian and raccoon engineer that rearranges complex systems into small, runnable building blocks.
-
On-chain module registry
A Solana program that stores repositories, modules, module versions, forks, metrics, and lifecycle information. -
Code observation and analysis
A core engine that crawls repositories, parses codebases, and builds structural graphs for Rust / Anchor and TypeScript projects, with room to extend to more languages. -
Automated module generation
Generators that scaffold modules, instruction templates, deployment scripts, and frontend stubs based on analyzed code. -
Fork-aware evolution
A forking model that treats each fork as a Unit09 variant with its own metrics and evolution history, synced back on-chain. -
Unified tooling
TypeScript SDK, CLI, API services, local demo stack, dashboard, and documentation site built around the same primitives.
At a high level, Unit09 consists of:
-
On-chain program (contracts)
Anchor-based Solana program that holds the canonical state for repositories, modules, module versions, forks, lifecycle, and metrics. -
Core engine
A TypeScript engine that runs the full pipeline: observe → analyze → decompose → generate → validate → sync-on-chain. -
Services
- API service that exposes HTTP endpoints for interacting with Unit09.
- Worker service that processes background jobs (observations, analysis, syncing).
- Scheduler that triggers periodic jobs.
-
Tooling
- SDK package for interacting with the program and services.
- CLI for local workflows.
- Testing utilities for localnet and integration tests.
-
Apps and docs
- Dashboard to browse repositories, modules, forks, and metrics.
- Documentation site and markdown docs in the
docs/folder.
See docs/architecture.md, docs/onchain-design.md and docs/engine-design.md
for a deeper technical breakdown.
This is a monorepo. At a glance:
contracts/
unit09-program/ # Anchor Solana program
packages/
shared-types/ # Shared TypeScript types
sdk/ # Unit09 TypeScript SDK
core-engine/ # Analysis and generation engine
cli-kit/ # Shared CLI utilities
testing-utils/ # Testing helpers
services/
api/ # HTTP API service
worker/ # Background job processor
scheduler/ # Job scheduler
cli/
... # unit09 CLI entrypoint and commands
apps/
dashboard/ # Dashboard UI (Next.js)
docs-site/ # Documentation site (Next.js)
examples/
simple-anchor-project/ # Minimal example project
unit09-local-demo/ # Local demo stack (Docker)
module-gallery/ # Example modules and templates
infra/
docker/ # Dockerfiles for services
k8s/ # Kubernetes manifests
terraform/ # Optional infrastructure-as-code
monitoring/ # Prometheus / Grafana configs
config/
default.yaml # Shared default configuration
development.yaml
production.yaml
schema.json
docs/
... # Markdown documentation
LICENSE
README.md
CHANGELOG.md
CONTRIBUTING.md
CODE_OF_CONDUCT.md
SECURITY.md
GOVERNANCE.md
You should have:
- Node.js 20+
- pnpm or npm (examples use pnpm)
- Rust stable toolchain
- Solana CLI
- Anchor CLI
- Docker (for local demo stack)
- Git
Verify your tools:
node -v
pnpm -v || npm -v
rustc -vV
solana --version
anchor --version
docker --versionClone the repository (example URLs, adjust to your actual organization):
git clone https://github.com/unit09-labs/unit09.git
cd unit09From the monorepo root:
pnpm installOr, if you prefer npm (may be slower and less aligned with this repo):
npm installcd contracts/unit09-program
anchor build
anchor testThis will compile the Solana program and run the Anchor tests in
contracts/unit09-program/tests/.
The easiest way to see Unit09 in action is the local demo stack:
cd examples/unit09-local-demo
docker compose up -d
# Optional helper scripts, depending on your setup:
./scripts/run_localnet.sh
pnpm ts-node scripts/seed_demo_data.ts
pnpm ts-node scripts/demo_workflow.tsThis stack typically includes:
- Local Solana validator
- Unit09 API service
- Unit09 worker
- Supporting database and queues
See examples/unit09-local-demo/README.md for the exact composition and
ports.
Configuration is stored in the config/ directory:
default.yaml— shared defaultsdevelopment.yaml— overrides for local developmentproduction.yaml— production overridesschema.json— JSON Schema for validation
Most services accept an environment variable such as UNIT09_CONFIG_ENV
to select the environment profile, for example:
export UNIT09_CONFIG_ENV=development
pnpm dev:apiYou can adjust values for:
- Solana cluster and commitment level
- Database and storage
- Security (allowed origins, rate limits)
- Pipeline limits (maximum repository size, job concurrency)
- Metrics and monitoring
See docs/configuration.md for full details.
The CLI is the main entry point for developer workflows around Unit09.
Typical commands include:
unit09 init— initialize configuration in a projectunit09 config— inspect or set configuration valuesunit09 link-repo <url>— link a repository to Unit09unit09 run-pipeline <repo>— run the full pipeline for a repounit09 list-modules— list discovered modulesunit09 deploy-module <id>— deploy a selected moduleunit09 create-fork— create a Unit09 fork variantunit09 show-stats— display high-level metrics
For more details, see:
cli/README.mddocs/cli-usage.md
The TypeScript SDK in packages/sdk provides a convenient way to interact
with the on-chain program and services from your own applications.
Basic example (simplified):
import { Unit09Client } from "@unit09/sdk";
async function main() {
const client = await Unit09Client.init({
clusterUrl: "http://localhost:8899",
walletPath: "~/.config/solana/id.json",
});
const repos = await client.listRepos();
console.log("Observed repos:", repos);
}
main().catch(console.error);See packages/sdk/README.md and docs/api-reference.md for:
- Account helpers
- Instruction builders
- Higher-level queries
- Error handling conventions
The core engine in packages/core-engine implements the pipeline that makes
Unit09 feel like a living system:
- Observe code — fetch repository metadata and snapshots.
- Detect language — determine applicable analyzers.
- Parse project — parse sources and configs.
- Build code graph — construct a model of modules, calls, and data.
- Decompose modules — identify reusable units and boundaries.
- Generate artifacts — scaffolds, templates, deployment scripts.
- Validate modules — ensure modules are consistent and runnable.
- Sync on-chain — write module metadata and metrics to the program.
The engine can be triggered via:
- Worker jobs (
services/worker) - CLI commands
- Direct calls from other services
For a deep dive, see docs/engine-design.md and docs/workflow.md.
The services/ directory contains the runtime services that expose Unit09
functionality to external clients.
-
services/api
HTTP API server with routes for repositories, modules, forks, stats, and triggering pipeline operations. -
services/worker
Background job processing including observations, analysis, and sync-on-chain jobs. -
services/scheduler
Schedules periodic jobs such as recurring observations and metrics sync.
Typical local API routes might include:
GET /healthGET /reposGET /repos/:id/modulesGET /modules/:idPOST /reposPOST /pipeline/run
See docs/api-reference.md and services/api/README.md for detailed
routes and payloads.
-
apps/dashboard
Next.js dashboard for:- Viewing observed repositories
- Exploring modules and forks
- Inspecting metrics and timelines
-
apps/docs-site
Next.js documentation site that renders the content fromdocs/.
Both apps can typically be started via:
pnpm dev:dashboard
pnpm dev:docsSee each app’s README for exact scripts and environment requirements.
The examples/ directory contains:
-
simple-anchor-project/
A minimal Anchor project used as an example input for Unit09. -
unit09-local-demo/
A full local demo deployment via Docker Compose. -
module-gallery/
A curated set of example modules such as token vesting, basic mint, access control, and more.
These examples are a good starting point for understanding how Unit09 parses, decomposes, and represents codebases.
Unit09 can be deployed in several ways depending on your needs.
-
Local development
- Docker Compose for localnet and services.
- Direct
pnpm devcommands for apps and API.
-
Staging / production
- Docker images in
infra/docker/. - Kubernetes manifests in
infra/k8s/. - Optional Terraform definitions in
infra/terraform/. - Monitoring with Prometheus and Grafana via
infra/monitoring/.
- Docker images in
Refer to docs/deployment-guide.md for:
- Recommended topologies
- Secrets and configuration
- Scaling and resource considerations
- Monitoring and alerting
Security is taken seriously in the Unit09 project.
Please review:
SECURITY.mdfor:- Supported versions
- How to report vulnerabilities
- Responsible disclosure process
docs/onchain-design.mdfor trust boundaries and account modeldocs/architecture.mdfor data flows and integration points
Do not open public issues for suspected vulnerabilities. Use the
private channels described in SECURITY.md instead.
Contributions are welcome, whether in the form of:
- Code improvements
- New analyzers and generators
- Documentation and tutorials
- Module gallery additions
- Feedback and design discussions
Please read:
CONTRIBUTING.md— how to set up your environment, coding standards, branching and PR workflow.CODE_OF_CONDUCT.md— expected behavior in all project spaces.GOVERNANCE.md— how decisions are made and how maintainers are selected.
Bug reports and feature requests can be opened as GitHub issues with clear steps to reproduce and expected behavior.
This project is released under the terms described in the LICENSE file
in the root of this repository.
By using, copying, or contributing to Unit09, you agree to the applicable license terms.
