Mert
# Week 4: Understanding Solana’s Account Model as a Web2 Developer
If you come from a Web2 background, Solana’s account model can feel confusing at first.
You might ask:
“Why does everything seem to be an account?”
In traditional backend development, your application state usually lives in a database like PostgreSQL or MongoDB. Your server controls the logic, updates records, and manages permissions.
On Solana, things work differently.
The Core Idea
On Solana, everything is stored inside accounts.
Think of an account as a structured container that holds:
- Data
- Tokens
- Program state
- Ownership information
Instead of a centralized server managing a database, Solana stores application state directly on-chain inside these accounts.
A Web2 Analogy
Here’s a simple comparison:
| Web2 | Solana |
|---|---|
| Database row | Account |
| Backend server | Program |
| API endpoint | Instruction |
| User session | Wallet |
| Database update | Transaction |
If you have built a REST API before, you can think of a Solana program as your backend logic.
But unlike Web2 servers:
- Programs are mostly stateless
- State lives in accounts
- Users sign transactions directly with wallets
Programs vs Accounts
This is one of the biggest mindset shifts.
Programs
Programs contain executable logic.
They are similar to backend services or server functions.
However, programs do not store mutable state internally.
Accounts
Accounts store the actual data.
For example:
- User profile data
- NFT metadata
- Token balances
- Game state
When a Solana program runs, it receives accounts as input, modifies them if allowed, then saves the updated state back on-chain.
Ownership Matters
Every Solana account has an owner.
The owner determines which program can modify the account’s data.
Example:
- A token account is owned by the Solana Token Program
- Your wallet may control the tokens
- But only the token program can modify token balances
This creates strong security guarantees.
Rent and Storage
Unlike traditional databases, blockchain storage is expensive.
On Solana, accounts must hold enough SOL to remain active. This is called rent exemption.
You can think of it like prepaying for storage space.
The larger the account data, the more SOL required.
Why This Model Exists
Solana’s account model is designed for:
- Parallel transaction execution
- High throughput
- Predictable state access
Because transactions specify which accounts they will read or write beforehand, Solana can process many transactions simultaneously.
This is one reason Solana achieves very high performance compared to many blockchains.
Example Mental Model
Imagine building a todo app.
In Web2:
- Frontend sends request to backend
- Backend updates database
- Database stores todo item
In Solana:
- Wallet signs transaction
- Transaction calls a program
- Program updates a todo account
- Updated state is stored on-chain
The blockchain itself becomes the shared database.
Final Thoughts
The hardest part of learning Solana is not syntax — it is changing how you think about application state.
Once you understand that:
- programs execute logic
- accounts store state
- wallets authorize actions
…the architecture starts making much more sense.
For Web2 developers, Solana development feels less like building a traditional backend and more like designing a distributed state machine.
And that mindset shift is the key to understanding blockchain development.
The Answer Is an Edge, Not a Sentence — Building a Topology-Native GraphRAG Intelligence Platform with TigerGraph
How we built Shadow Network Intelligence — a GraphRAG-powered fraud investigation platform that proved why topology-aware retrieval outperforms traditional RAG for financial crime investigations.
Introduction
Most retrieval systems are built around documents.
Financial crime investigations are not.
Fraud networks, laundering chains, shell company ecosystems, mule accounts, and intermediary ownership structures do not exist as clean paragraphs inside a single document. They exist across:
- transactions
- shared devices
- addresses
- shell corporations
- account transfers
- ownership chains
- hidden intermediaries
- multi-hop relationships
Traditional retrieval systems can retrieve text.
But financial investigations are fundamentally about reconstructing relationships.
That realization became the foundation for our TigerGraph GraphRAG Inference Hackathon project:
Shadow Network Intelligence
A topology-native intelligence platform built to prove one thing:
Traditional retrieval preserves documents.
GraphRAG preserves relationships.
Or more simply:
The answer is an edge, not a sentence.
The Problem with Traditional Retrieval
Most modern AI retrieval systems rely on semantic similarity.
That works well when:
- the answer exists inside a chunk
- semantic similarity is enough
- relationships are shallow
- the retrieval target is local
But financial crime investigations behave very differently.
The answer often emerges only after reconstructing:
- multi-hop ownership chains
- indirect transaction flows
- hidden intermediary entities
- shell-company cascades
- device-sharing patterns
- ring structures
- laundering topology
In these situations:
semantic similarity alone breaks down.
A chunk may contain a clue.
But the relationship continuity between clues disappears.
That is the core limitation of VectorRAG.
Our Hypothesis
We hypothesized that:
- PureLLM systems would hallucinate or miss hidden structural relationships
- VectorRAG systems would retrieve partial clues but fail to reconstruct topology
- GraphRAG systems would recover hidden investigative structure through graph traversal
To test this properly, we needed:
- adversarial datasets
- relationship-dense ecosystems
- hidden rings
- multi-hop structures
- topology-aware benchmarks
Not simple Q&A datasets.
Building the Dataset
We built a synthetic financial crime ecosystem specifically designed to stress retrieval systems.
The generated graph included:
- 6,000 people
- 5,000 companies
- 10,000 accounts
- 150,000+ transactions
- shared devices
- shared addresses
- ownership structures
- hidden fraud rings
- intermediary laundering chains
Final graph scale:
| Graph Component | Count |
|---|---|
| Vertices | 175,204 |
| Edges | 373,439 |
| Transaction Vertices | 150,054 |
| Reverse Edge Types | 6 |
The important part was not scale alone.
It was:
Structural density.
We intentionally designed adversarial investigation scenarios where:
- topology mattered
- intermediary entities mattered
- chunk retrieval failed structurally
- graph traversal became necessary
Architecture Overview
The platform evolved into a full operational intelligence environment.
1_data_engine/
├── synthetic fraud generation
├── topology-aware ecosystems
├── adversarial benchmark generation
└── ingestion pipelines
2_baseline_systems/
├── PureLLM baseline
├── VectorRAG baseline
└── benchmark orchestration
3_graph_intelligence_core/
├── TigerGraph integration
├── GraphRAG traversal
├── topology-aware retrieval
└── structural expansion
4_orchestrator_api/
├── FastAPI orchestration
├── SSE investigation streaming
├── benchmark APIs
└── cognitive orchestration
5_agent_swarm/
├── retrieval analyst
├── topology investigator
├── sanctions tracer
└── fraud ring analyst
6_reasoning_engine/
├── grounded claims
├── contradiction detection
├── confidence scoring
└── explainability
7_reporting_engine/
├── operational reports
├── markdown exports
└── benchmark summaries
8_dashboard_ui/
├── operational workspace
├── graph investigation UI
├── benchmark comparison
└── cognitive reasoning surfaces
Why We Chose TigerGraph
This project required:
- high-performance traversal
- multi-hop exploration
- topology-native reasoning
- relationship continuity
- structural neighborhood expansion
TigerGraph became the backbone of the entire intelligence system.
We used TigerGraph to:
- reconstruct hidden ownership chains
- detect fraud rings
- traverse laundering paths
- surface intermediary entities
- expand graph neighborhoods
- support topology-aware retrieval
The graph became:
not just storage,
but the reasoning substrate itself.
Building the Benchmark
One of the biggest goals of the project was to avoid fake benchmark theater.
We wanted:
real adversarial evaluation.
So instead of asking simplistic questions, we built investigation tasks such as:
- tracing hidden ownership cascades
- reconstructing laundering paths
- identifying hidden ring members
- detecting intermediary shell structures
- recovering topology continuity
Each investigation was executed across:
- PureLLM
- VectorRAG
- GraphRAG
inside the same operational environment.
The Results
The benchmark results became the strongest validation of the project thesis.
Structural Recall
| System | Structural Success |
|---|---|
| PureLLM | 0 / 20 |
| VectorRAG | 0 / 20 |
| GraphRAG | 20 / 20 |
GraphRAG successfully reconstructed:
- hidden rings
- intermediary chains
- ownership topology
- laundering paths
- multi-hop relationships
while the other systems failed structurally.
And importantly:
this was not a tuning failure.
Vector retrieval fundamentally lacks topology.
A chunk cannot retrieve an edge that no longer exists.
The Most Important Realization
During development, one insight became impossible to ignore:
The answer was never hidden in a document.
It was hidden in the relationships.
That single realization completely shaped the rest of the platform.
Building the Cognitive Layer
We wanted the system to do more than retrieve graph neighborhoods.
We wanted:
grounded investigative reasoning.
So we added a cognitive reasoning layer capable of:
- structural claim synthesis
- contradiction detection
- confidence scoring
- evidence grounding
- entity explanation
- topology-based justification
Most importantly:
we intentionally prevented fake AI theater.
The reasoning system:
- validates real graph IDs
- rejects hallucinated entities
- lowers confidence when evidence is weak
- grounds every structural claim in topology
One of the most satisfying moments was watching the sanctions tracer correctly return:
low confidence.
Not because the system failed.
But because:
there genuinely was no sanctions evidence in the graph.
That honesty made the platform feel operationally credible.
Real-Time Investigation Streaming
To make investigations feel operational, we built a real SSE-driven orchestration flow.
Investigations stream live events such as:
- entity discovered
- ring reconstructed
- hidden relationship surfaced
- neighborhood expanded
- reasoning synthesized
- report finalized
Importantly:
these were not fake loading animations.
The events reflected:
real graph state transitions.
The Frontend Philosophy
At first, we built a conventional dashboard.
It quickly felt wrong.
Financial investigations are not spreadsheet experiences.
So the frontend evolved into:
an operational intelligence environment.
We built:
- Worldspace continuity
- TacticalRail navigation
- investigation-first layouts
- graph-native interaction flows
- cognitive reasoning surfaces
- operational benchmark visualization
The UI was intentionally designed to feel:
calm,
focused,
and structurally investigative.
Not flashy.
The Biggest Engineering Challenge
Ironically, the hardest problem was not graph traversal.
It was:
credibility.
Late in development, we realized something important:
A visually impressive system is meaningless if judges cannot trust the metrics.
So we performed a full credibility hardening pass.
We:
- removed fake benchmark routes
- eliminated synthesized frontend metrics
- surfaced real TigerGraph counts
- exposed reproducible benchmark artifacts
- clearly labeled synthetic vs live surfaces
- ensured every visible benchmark number traced back to real JSON artifacts
This completely changed the maturity of the platform.
The system stopped feeling like:
“a cool hackathon UI”
and started feeling like:
an actual reviewable intelligence platform.
The Final Platform
By the end of the project, Shadow Network Intelligence supported:
- live TigerGraph integration
- GraphRAG retrieval
- adversarial benchmarking
- cognitive reasoning
- topology-aware investigation
- multi-agent analysis
- grounded structural claims
- operational reporting
- live SSE investigation streaming
- graph-native UI workflows
- real benchmark reproducibility
The platform evolved far beyond what we originally planned.
What We Learned
The biggest lesson was surprisingly simple:
AI retrieval systems fail when relationships matter more than text.
That is exactly where graphs become essential.
We learned that:
- semantic similarity is not structural intelligence
- topology changes retrieval fundamentally
- graph traversal enables hidden relationship recovery
- operational credibility matters more than visual complexity
- grounded reasoning is more valuable than theatrical confidence
Most importantly:
we learned that:
GraphRAG is not just “RAG with a graph.”
It is a fundamentally different retrieval philosophy.
Final Thought
Traditional retrieval systems search for relevant documents.
Graph-native systems reconstruct hidden structure.
And in fraud investigations:
structure is the investigation.
That became the foundation of Shadow Network Intelligence.
And ultimately:
the answer was never a sentence.
It was an edge.
Tech Stack
- TigerGraph
- FastAPI
- React + TypeScript
- LangGraph
- Ollama
- ChromaDB
- Docker
- SSE Streaming
Join the Discussion
- Have you found semantic similarity to become a bottleneck in relationship-heavy RAG systems?
- How are you handling multi-hop topology reconstruction in your own GraphRAG pipelines?
Camellia: A Small Go Linter for Camel-Case Abbreviations
Go code has a long-running naming habit around initialisms: ID, URL, HTTP, API, and friends often stay fully capitalized inside identifiers. That gives you names like UserID, ParseURL, HTTPClient, and APIError.
I understand the convention, but I do not like how it reads.
My preference is simpler: treat abbreviations like normal words when they are part of a mixed-case identifier.
type ApiError struct{}
type HttpClient struct{}
func ParseUrl(userId string) {}
The reason is not that Api is more “correct” than API in isolation. It is that code is scanned in context. Once a codebase has a mix of ordinary words and all-caps abbreviation runs, identifiers start to look jagged. The reader has to remember which words are special, where the special casing starts, and where it stops.
I would rather remove the exception.
UserId follows the same visual rhythm as UserName. HttpClient follows the same rhythm as FileClient. ParseUrl follows the same rhythm as ParsePath. The names become less noisy because the rule is boring: use camel case everywhere.
That is why I made Camellia, a small golangci-lint module plugin for this exact preference.
Camellia flags project-declared Go identifiers with all-caps abbreviation runs and suggests the camel-case spelling instead:
type APIError struct{} // ApiError
type HTTPClient struct{} // HttpClient
func ParseURL(userID string) {} // ParseUrl, userId
It is intentionally narrow. It does not try to reformat your whole project or invent a broad style guide. It just enforces one naming choice consistently. Imported symbols are left alone, and if you need to roll the rule out gradually, Camellia supports its own exclude list for generated code, fixtures, or legacy paths.
If you also prefer ApiError over APIError, try it here:
How to Deploy an Ubuntu Linux VM in Azure
We will use the Azure Portal (GUI) to launch an Ubuntu Linux Virtual Machine (VM).
Note: Azure charges by the minute while your VM is running. Don’t forget to delete everything at the end so you pay nothing (or just pennies).
Step 1: Create Your Resource Group
Think of a Resource Group as a folder that will hold your VM and all its related parts. Creating it first keeps things organized.
Sign In: Log into the Azure Portal.
Create a Resource Group:
Click + Create a resource in the top left corner.
Type “Resource Group” in the search bar and select it.
Click Create.
Name it MyLinuxLab_RG
Select a Region close to you (e.g., East/West US)
Click Review + create → Create
Quick Definition: A Region is the physical location of the data center where your cloud resources will live.
Step 2: Create the Ubuntu Linux VM
Now that your folder (Resource Group) is ready, let’s build the actual Linux computer.
Basics Tab:
Resource Group: Select MyLinuxLab_RG from the dropdown
Virtual Machine Name: Ubuntu-Lab-01
Region: Choose the same region you used for your Resource Group
Availability Options: Leave as “No infrastructure redundancy required” (fine for learning)
Image: Confirm it says Ubuntu Server 22.04 LTS (or newer)
Size: Choose Standard_B2s — it’s cost-effective and perfect for learning or the default.
Administrator Account:
Authentication type: Select password
Username: azadmin (or a name you’ll remember)
Quick Definition: SSH (Secure Shell) is the secure “door” that lets you type commands into your Linux VM from your own terminal. The key pair is like a digital lock and key.
Inbound Port Rules: Under “Public inbound ports,” ensure Allow selected ports is checked Http Port 80 and SSH (22) is selected as we move forward we will learn more together.
Click Review + create → wait for the green “Validation passed” message → Click Create
Note: Don’t worry if you see yellow warnings — those are usually fine. Look for the green checkmark.
To ensure that your terminal section does not go off. Click the IP address ensure you extend the time under networking.
Step 3:
Click Connect which would enable you remotely login to the Linux VM:
For windows you would need to open/launch Powershell and For Mac you would open/launch Terminal and run the ID and Ip given.
Now you see my powershell on my windows prompting for Password.

Next: We would login in as a root user which is the same as an administrator in Windows.
“sudo su” and run “apt update” which is to ensure that the latest update is installed.

Step 4: We would install the ntp package – also know as the package manager. “ntp install nginx”

This shows we did login in successfully and we can also remotely login using other options.
Step 5:
Remember to delete.
If this help you in any way kindly share. If you did like to spice up this beginner guide in the comment section I did love that.
LLM Persistent Memory & Python Tooling Elevate AI Agent Workflows
LLM Persistent Memory & Python Tooling Elevate AI Agent Workflows
Today’s Highlights
This week highlights practical advances in AI agent development with an experiment in persistent memory for LLMs. Complementing this, a new Python language server aims to boost productivity for AI framework developers, alongside a look at the future of AI-driven code review.
gave Claude Code persistent memory and after 200 sessions it started swearing at me (r/ClaudeAI)
Source: https://reddit.com/r/ClaudeAI/comments/1teuspg/gave_claude_code_persistent_memory_and_after_200/
This intriguing Reddit post details an experimental setup where a user implemented persistent memory for Claude Code, allowing the AI to learn and adapt its “thinking patterns” across over 200 sessions. Unlike simple fact retrieval, this goes into developing a cumulative understanding and operational strategy. The experiment highlights the potential of enhancing LLM agents with long-term memory to create more autonomous and context-aware systems capable of evolving their responses based on past interactions and outcomes.
While the amusing outcome (Claude “swearing”) is noted, the core value lies in the exploration of stateful AI agents for workflow automation and more sophisticated problem-solving, moving beyond stateless, turn-based interactions. This approach is crucial for AI agent orchestration frameworks, enabling agents to retain context and develop personalized heuristics over extended periods, which is vital for complex, multi-step workflows in production.
Comment: Implementing persistent memory is a game-changer for building truly intelligent AI agents, transforming them from stateless chatbots into co-workers that learn and improve. The key challenge, as this post amusingly shows, is managing the evolution of their ‘personality’ and ensuring alignment over time.
[Ann] Pyrefly v1.0 (fast type checker & language server) (r/Python)
Source: https://reddit.com/r/Python/comments/1tbyd7m/ann_pyrefly_v10_fast_type_checker_language_server/
Pyrefly, a new fast type checker and language server for Python, has officially reached its stable v1.0 release. This tool significantly enhances the developer experience for Python practitioners by providing rapid feedback on type errors and offering comprehensive language server functionalities such as auto-completion, go-to-definition, and refactoring tools. Its focus on speed promises to reduce friction during development, allowing engineers to iterate faster on complex AI models and applications.
For developers working on AI frameworks, RAG pipelines, or AI agent orchestration, robust and efficient tooling is paramount. Pyrefly’s integration as a language server makes it accessible within popular IDEs, providing real-time code quality checks and navigation. This is critical for maintaining large, evolving codebases typical in AI development, helping ensure code health and developer productivity across the lifecycle of AI projects.
Comment: A fast, reliable type checker and language server like Pyrefly streamlines Python development, making it easier to build and maintain the sophisticated codebases found in modern AI frameworks and applications. This is a must-have for any serious Python developer, especially in the AI/ML space.
Reviewing AI-generated pull requests in 2026 (r/ClaudeAI)
Source: https://reddit.com/r/ClaudeAI/comments/1teuh5w/reviewing_aigenerated_pull_requests_in_2026/
This news item, while framed as a future outlook for 2026, discusses a significant applied AI use case: the review of AI-generated pull requests. It highlights the impending reality where automated code generation reaches a level of sophistication requiring human oversight to shift from writing code to critically evaluating AI-produced code for correctness, efficiency, and adherence to best practices. This directly relates to “code generation” and “RPA & workflow automation” categories, envisioning a production deployment pattern where AI agents contribute directly to codebases.
The discussion implies the need for advanced AI agents capable of understanding code context, identifying potential bugs or security vulnerabilities, and adhering to coding standards—a complex orchestration challenge for future AI frameworks. Preparing for such a workflow today involves building robust testing and validation frameworks, as well as refining prompt engineering for code-generating LLMs to minimize the human review burden.
Comment: The shift from writing code to reviewing AI-generated PRs is a significant evolution for software development workflows. It underscores the immediate need for robust AI agents that not only generate functional code but also understand quality, making validation frameworks crucial today.
Building My Portfolio site with AI: Speed, Superpowers, and Surprising Trade-offs
A few days ago, I decided to build my developer portfolio. I leaned heavily on AI tools to do it. The theme was simple, Animated Space.
What started as a productivity experiment quickly turned into something more interesting, a lesson in how AI can both accelerate your workflow and quietly reshape the way you think as a developer.
Here’s what I learned.
Why I Used AI in the First Place
Like most developers, I’ve built portfolio sites before. The process is familiar:
Design layout
Write boilerplate code
Debug responsiveness
Optimize performance
Repeat
It’s not hard, it’s just time-consuming.
So I thought: What if I let AI handle the repetitive parts so I can focus on the interesting ones?
I didn’t just ask AI to “build my portfolio.” Instead, I used it as a collaborator:
• Generating Layout Ideas
I prompted AI for modern portfolio structures:
Hero sections
Project showcases
About/contact layouts
It gave me multiple variations instantly. Something that would normally take hours of browsing inspiration sites.
• Writing Boilerplate Code
Instead of typing everything from scratch, I asked for:
React components
CSS layouts
Responsive grids
This cut down a lot of setup time.
• Debugging Faster
When something broke (and it always does), I pasted errors and got:
Quick explanations
Suggested fixes
Alternative approaches
It felt like having a second developer looking over my shoulder.
Improving UX Copy
Even small things like:
• Button labels
• Section descriptions
• Microcopy
AI helped refine them into something cleaner and more professional.
⚡ The Advantages I Didn’t Expect
- Massive Speed Boost
The obvious one—but still worth emphasizing.
What would’ve taken days took hours.
• Reduced “Blank Page Anxiety”
Instead of staring at an empty file, I always had a starting point.
That momentum matters more than people admit.
Learning Through Iteration
AI didn’t just give answers, it exposed patterns:
• Better component structure
• Cleaner CSS practices
• Smarter layout decisions
Used correctly, it actually teaches you.
Idea Expansion
Sometimes AI suggested things I wouldn’t have thought of:
• Animated transitions
• Alternative layouts
• Accessibility tweaks
It’s like brainstorming with someone who never runs out of ideas.
⚠️ The Pitfalls Nobody Talks About Enough. This is where things got real.
Creativity Starts to Decline
The biggest surprise.
When AI constantly suggests:
• Designs
• Layouts
• Code
You slowly stop thinking from scratch.
I caught myself:
• Accepting solutions too quickly
• Not exploring alternatives
• Losing that “builder curiosity”
That’s dangerous long-term.
Over-Reliance Is Easy
It’s tempting to ask AI for everything:
“Generate this component”
“Fix this bug”
“Optimize this layout”
But then:
You debug less on your own
You experiment less
You understand less deeply
Convenience can quietly reduce mastery.
Generic Results
AI outputs are often:
Clean, Functional, But… predictable.
Without customization, your portfolio can start to look like everyone else’s. And that defeats the whole point of a personal site.
False Confidence
Sometimes AI gives code that:
Looks correct
Runs… mostly
But has hidden issues
If you don’t review it critically, you can ship bugs you don’t fully understand.
🧭 How I Found a Balance
After a few days, I changed my approach:
✅ Use AI for:
Boilerplate
Debugging hints
Idea generation
❌ Avoid using it for:
Final design decisions
Core logic thinking
Learning fundamentals
And most importantly:
I started asking “why” instead of just “give me.”
💡 Key Takeaways
AI is a multiplier, not a replacement
It can accelerate your workflow, but also flatten creativity.
The real skill is knowing when not to use it.
🎯 Final Thoughts
Building my portfolio with AI was faster, smoother, and honestly… fun.
But it also forced me to confront something important:
If you let AI do all the thinking, you stop growing as a developer.
Used intentionally, AI is a superpower.
Used blindly, it’s a shortcut that costs you originality.
The difference is entirely up to you.
The Solana Account Model Explained: Everything is an Account
The Aha Moment
During Epoch 1 of #100DaysOfSolana, I hit a wall. I’d built wallets, sent transactions, decoded data — but nothing clicked until I stopped thinking about Solana like traditional programming and started thinking about it as a system where everything is an account.
When I started learning Solana, I kept hearing this phrase: “everything is an account.” It sounded like philosophy. But then it hit me: there are literally no users, no wallets, no programs in Solana — only accounts. Your wallet is an account. The Token Program is an account. The system clock is an account. Even your SOL balance is just data in an account.
This single concept unlocks everything else on Solana.
What Is an Account? The Five-Field Structure
Every account on Solana has exactly five fields:
{
lamports: 5000000, // Balance (1 SOL = 1 billion lamports)
data: [0x00, 0x01, ...], // Binary data (up to 10 MB)
owner: "11111111111...", // Program that can modify this account
executable: false, // Is this a program (true) or data (false)?
rent_epoch: 18446744073709... // Rent exemption status
}
That’s it. Five fields. Everything on Solana fits into this model.
This is a real account (System Program) showing all five fields. You’ll see this exact structure for every account on Solana.
Understanding Each Field
lamports – The account’s balance in the smallest unit. Accounts must hold enough SOL (lamports) to be “rent-exempt” (roughly $0.02-$2 depending on data size). This prevents network spam. I built a rent calculator and went deeper on storage costs in my Week 2 post if you want the full breakdown.
data – Where the actual information lives. For a wallet, this is empty (0 bytes). For a program, this is bytecode. For a token mint, this is token metadata (supply, decimals, authorities). For a sysvar, this is cluster state.
owner – The program that has permission to modify this account’s data. Your wallet is owned by the System Program (11111111111...), so only the System Program can transfer your SOL. A token mint is owned by the Token Program, so only it can mint new tokens.
executable – A boolean flag. If true, this account contains program code and can execute instructions. If false, it’s just a data account.
rent_epoch – A legacy field from when Solana charged rent monthly. Now mostly ignored, but technically tracks when rent was last collected.
Three Account Types: Wallets, Programs, and Sysvars
Let me show you how the same five-field structure represents completely different things:
Same five fields, three completely different meanings. This is the power of the account model.
Type 1: Your Wallet (A Data Account)
Owner: 11111111111111111111111111111111 ← System Program
Executable: false ← Stores data, not code
Data: (empty, 0 bytes)
Lamports: 5000000000 ← Your SOL balance
Rent Epoch: 18446744073709551615 (max) ← Rent exempt
This is what your wallet looks like on-chain: owned by System Program, no data, just lamports.
Your wallet is a System Program-owned account with empty data. The “balance” is just the lamports field. That’s it.
Your wallet is a System Program-owned account with empty data. The “balance” is just the lamports field. That’s it.
Key insight: You don’t own your wallet — the System Program does. The System Program enforces the rules that only the private key owner can transfer SOL. Your keypair is the authorization mechanism, not the owner — if this distinction feels fuzzy, I covered how Solana identity and keypairs actually work in my Week 1 post. This is what “custody” means on Solana: the program is the enforcer.
Type 2: The Token Program (An Executable Account)
Owner: BPFLoaderUpgradeab1e... ← BPF Loader (manages programs)
Executable: true ← Contains program code
Data: (36 bytes of bytecode) ← The actual program logic
Lamports: ~11 SOL ← Program's retained SOL
Rent Epoch: 18446744073709551615 ← Rent exempt
Address: TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
👆 Notice: executable=true, balance is 11+ SOL, owned by BPF Loader. This is a program account.
The Token Program is an executable account. Its data field contains the program bytecode that defines how tokens work. When you interact with a token (mint, transfer, burn), you’re actually calling instructions in this program.
Key insight: Programs are just data stored in accounts. The Solana runtime reads the executable: true flag and knows to execute that account’s code. This is why upgrading programs is so clean on Solana — you’re just swapping the data in an account.
Type 3: Clock Sysvar (A System Data Account)
Owner: Sysvar1111111111111… ← Sysvar program
Executable: false ← Stores data, not code
Data: (40 bytes of binary time data) ← Current slot, epoch, timestamp
Lamports: ~1 SOL ← Enough for rent exemption
Rent Epoch: 18446744073709551615 ← Rent exempt
Address: SysvarC1ock11111111111111111111111111111111
This sysvar is readable by every program but not executable. It contains cluster time state.
Why This Matters: Three Real-World Scenarios
The Clock sysvar is a read-only data account containing cluster-wide state. Every program can read the current slot, epoch, and Unix timestamp from this account. It’s like /proc/uptime in Linux — a public system file anyone can read.
Key insight: Sysvars are how programs access external state without making RPC calls. The Solana runtime updates them every slot.
Scenario 1: Sending SOL to a Friend
When you send 1 SOL to a friend:
- Your wallet account (owned by System Program) loses 1 billion lamports
- Your friend’s account gains 1 billion lamports
- The System Program enforces that only your keypair can authorize this
Both accounts follow the same five-field structure. The only difference is the keypair that can sign for them.
Scenario 2: Creating a Token
When someone creates a USDC token:
- They invoke the Token Program (an executable account)
- The Token Program creates a new account for the token mint
- That new account has the Token Program as its
owner - The Token Program stores token metadata in the mint account’s
datafield
Same five-field structure. Different owner (Token Program instead of System Program).
Scenario 3: Reading the Network Time
Inside a program, you might read the current slot:
const clockSysvar = await connection.getAccountInfo(CLOCK_ADDRESS);
const decodedClock = parseClockData(clockSysvar.data);
console.log(`Current slot: ${decodedClock.slot}`);
You’re just reading the data field of an account. Solana’s runtime automatically updates that account every slot.
The Permission Model: Who Can Modify What?
Here’s the crucial rule: Only the account’s owner program can modify its data.
- If
owner === SystemProgram, only the System Program can change this account - If
owner === TokenProgram, only the Token Program can change this account - If
owner === YourProgram, only your program can change this account
This is Solana’s security model. You can’t hack someone else’s account because you don’t own it. You can’t create tokens because you don’t own the token program. You can only modify accounts your program owns.
Exception: Anyone can send SOL to any wallet. The System Program allows this because receiving SOL doesn’t modify the wallet’s data field — it only changes lamports. Specifically, the System Program says: “Any keypair can increase another account’s lamports, but only the keypair owning an account can decrease it.”
That’s a Solana transaction at its core — accounts changing state, programs enforcing the rules. If you want to understand how that transaction lifecycle actually works and how it differs from a REST API call, I went deep on it in my Week 3 post.
The Account Model in Action: Building an Explorer
To prove this, I built a simple account explorer that queries any address and shows all five fields:
// solana-account-explorer/explorer.mjs
import { createSolanaRpc, address } from "@solana/kit";
const rpc = createSolanaRpc("https://api.devnet.solana.com");
async function inspectAccount(addressString) {
const acct = address(addressString);
const [balance, accountInfo] = await Promise.all([
rpc.getBalance(acct).send(),
rpc.getAccountInfo(acct).send()
]);
console.log(`Address: ${addressString}`);
console.log(`Lamports (Balance): ${Number(balance.value)}`);
console.log(`Owner: ${accountInfo.value?.owner}`);
console.log(`Executable: ${accountInfo.value?.executable}`);
console.log(`Data Length: ${accountInfo.value?.data.length} bytes`);
console.log(`Rent Epoch: ${accountInfo.value?.rentEpoch}`);
}
// Try it:
// node explorer.mjs 11111111111111111111111111111111



This tool runs the exact same query on System Program, Token Program, and a wallet. Same structure, different values.
Run this on any Solana address, and you’ll see those five fields. Every account. Always the same structure.
Common Misconceptions
❌ “Wallets are real objects”
✅ Wallets are just accounts with the System Program as owner and empty data. The “wallet” concept is a UI abstraction.
❌ “I own my wallet”
✅ The System Program owns your wallet. Your keypair is the authorization mechanism, not the owner. This is actually safer — you can’t accidentally delete your wallet.
❌ “Programs can access any account”
✅ Programs can read any account (it’s all public data), but they can only modify accounts they own. This is enforced by the Solana runtime.
❌ “The blockchain stores all your data”
✅ The blockchain stores account states. Your actual data lives in those accounts. Different mental model!
Everything Else Is Just Accounts (Seriously)
Once the five-field structure clicks, everything else becomes obvious:
-
Transactions – Signed instructions that modify accounts. A transaction is just a request to change the
lamportsordatafield. - Programs – Executable accounts that enforce the rules for modification. They’re the gatekeepers.
-
Tokens – Just accounts owned by the Token Program. The token’s supply, decimals, authorities? All in the account’s
datafield. -
NFTs – Same structure. Metadata lives in the account’s
data. The blockchain isn’t storing the image; it’s storing a pointer in an account. - Wallets – Accounts owned by System Program with no data.
- DeFi – Programs managing accounts representing liquidity pools, positions, swaps. Every protocol is just accounts + programs enforcing rules.
- AMMs – Programs that maintain accounts for token reserves and user positions.
All of it. Accounts and the programs that manage them.
What to Do Next
-
Explore it yourself
- Go to Solana Explorer
- Search for any address
- Look for those five fields
-
Try the inspector
solana account 11111111111111111111111111111111
This shows you a real System Program account.
- Build your own reader
const connection = new Connection("https://api.devnet.solana.com");
const accountInfo = await connection.getAccountInfo(publicKey);
// Now you have: lamports, data, owner, executable, rentEpoch
-
Understand ownership
When building a program, remember: you own accounts your program creates. You can modify them. Users’ wallets you can’t modify (only System Program can). This shapes how you architect everything.
## The Takeaway
The Solana Account Model is deceptively simple: five fields, one permission rule. That’s the entire foundation.
Everything on Solana — wallets, programs, tokens, NFTs, liquidity pools, governance, system clocks, rent — fits perfectly into this structure. There’s no special case for “smart contracts” or “user accounts.” No complexity hidden in different data structures. Just five fields, repeated across millions of accounts, with one rule controlling who can modify them.
Master this concept, and you’ve unlocked the mental model for understanding not just Solana, but why Solana is architecturally different from every other blockchain.
Next time someone says “everything is an account,” you’ll understand exactly why they’re right — and why that matters.
Series: The Account Model Foundation
- Part 1: The Account Model Explained (this post)
- Part 2: Building an Account Explorer (coming May 17)
- Part 3: Decoding Account Data (coming May 19)
- Part 4: System Program Deep Dive (coming May 21)
What aspect of the account model confused you most? Let me know in the comments — I’ll update this post with clarifications!
Part of the 100 Days of Solana Epoch 1 challenge.
الذكاء الاصطناعي في 2025: من التجارب المعملية إلى العمود الفقري للأعمال
في العامين الماضيين، شهدنا تحولاً جذرياً في كيفية تعامل الشركات مع الذكاء الاصطناعي. لم يعد الأمر يتعلق بتجارب صغيرة أو نماذج أولية، بل أصبح الذكاء الاصطناعي جزءاً لا يتجزأ من البنية التحتية الرقمية للمؤسسات. تقرير McKinsey الأخير “The state of AI in early 2025” يكشف أن 71% من الشركات تعتمد الآن على الذكاء الاصطناعي التوليدي، ارتفاعاً من 50% فقط في 2023. لكن الأهم من نسبة التبني هو كيف تستخدم الشركات هذه التقنية اليوم.
الوكيل الذكي: نجم العصر الجديد
إذا كان عام 2023 هو عام النماذج اللغوية الكبيرة (LLMs)، فإن 2025 هو بلا شك عام الوكلاء الأذكياء (Agentic AI). تتوقع Gartner أنه بحلول 2028، سيتضمن 33% من تطبيقات المؤسسات وكلاء أذكياء. هذه ليست مجرد روبوتات محادثة بسيطة؛ إنها أنظمة قادرة على التفكير، التخطيط، وتنفيذ المهام المعقدة بشكل مستقل.
ما الذي يجعل الوكيل “ذكياً” حقاً؟
السر يكمن في نمط ReAct (Reason + Act)، وهو اختصار لـ “فكر ثم تحرك”. بدلاً من مجرد توليد نص، يمر الوكيل بدورة متكررة:
- يفكر (Thought): يحلل المشكلة ويقرر الخطوة التالية.
- يتحرك (Action): ينفذ إجراءً محدداً، مثل استدعاء API أو البحث في قاعدة بيانات.
- يلاحظ (Observation): يستقبل نتيجة الإجراء.
- يكرر: حتى يصل إلى إجابة نهائية.
هذا النمط هو اللبنة الأساسية لكل الأنظمة الوكيلة الحديثة. دعنا نرى كيف يبدو هذا في الكود:
# مثال مبسط لوكيل ReAct باستخدام langchain
from langchain.agents import initialize_agent, Tool
from langchain.agents import AgentType
from langchain.llms import OpenAI
from langchain.tools import tool
# تعريف أدوات بسيطة
@tool
def search(query: str) -> str:
"""البحث عن معلومات على الويب. المدخل: استعلام بحث."""
# في التطبيق الحقيقي، هذا سيستدعي API بحث
return f"نتيجة بحث محاكاة لـ: {query}"
@tool
def calculate(expression: str) -> str:
"""تقييم تعبير رياضي. المدخل: نص تعبير رياضي."""
try:
return str(eval(expression))
except:
return "خطأ في الحساب"
# تهيئة النموذج اللغوي
llm = OpenAI(temperature=0, model="gpt-3.5-turbo-instruct")
# إنشاء الوكيل مع الأدوات
agent = initialize_agent(
[search, calculate],
llm,
agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION,
verbose=True,
max_iterations=3, # أساسي: يمنع الحلقات اللانهائية
handle_parsing_errors=True,
)
# تشغيل الوكيل
result = agent.run("ما هو عدد سكان طوكيو مقسوماً على 1000؟")
print(result)
# الناتج المتوقع: الوكيل سيبحث عن عدد سكان طوكيو، ثم يستخدم أداة الحساب للقسمة على 1000.
# الدرس الأساسي: معامل `max_iterations` ضروري لمنع التكاليف الجامحة والحلقات اللانهائية.
هذا المثال البسيط يخفي تعقيداً كبيراً. في الإنتاج، كل وكيل يمكنه استدعاء العشرات من الأدوات، والتفاعل مع أنظمة المؤسسة، واتخاذ قرارات تؤثر على ملايين المستخدمين.
العمارة الهرمية: كيف تبني نظاماً وكيلاً قوياً؟
الأنظمة الوكيلة الناجحة لا تعتمد على وكيل واحد عملاق. بدلاً من ذلك، تتبع نمط Router Agent Architecture، وهو تصميم معياري يقسم المسؤوليات. تخيل أنك تبني نظام خدمة عملاء لشركة كبيرة:
graph TD
A[المستخدم] --> B[الموجه الرئيسي Router Agent]
B --> C{تصنيف الطلب}
C -->|استرجاع/إلغاء| D[وكيل الطلبات]
C -->|استفسار عام| E[وكيل المعرفة]
C -->|شكوى/مشكلة فنية| F[وكيل الدعم الفني]
C -->|غير واضح| G[وكيل التوضيح]
D --> H[قاعدة بيانات الطلبات]
E --> I[قاعدة المعرفة]
F --> J[نظام التذاكر]
H --> K[نتيجة]
I --> K
J --> K
G --> K
K --> L[تجميع الردود]
L --> M[الرد النهائي للمستخدم]
style B fill:#4a90d9,color:#fff
style C fill:#f5a623,color:#fff
style G fill:#d0021b,color:#fff
هذه العمارة، التي استخدمتها Klarna في مساعدها الذكي، تسمح بـ:
- التوسع المستقل: يمكن تحسين كل وكيل فرعي دون التأثير على الآخرين.
- العزل: فشل وكيل الطلبات لا يعني توقف وكيل المعرفة.
- التخصص: كل وكيل مدرب على مجاله بدقة عالية.
نتائج Klarna كانت مذهلة: الوكيل الذكي تعامل مع 2.3 مليون محادثة في شهر واحد، مؤدياً عمل 700 موظف خدمة عملاء بدوام كامل، مع انخفاض بنسبة 25% في الاستفسارات المتكررة.
تحسين التكلفة: مسار سريع ومسار بطيء
أحد أكبر التحديات في نشر الأنظمة الوكيلة هو التكلفة. استدعاء نموذج كبير مثل GPT-4 لكل استفسار بسيط هو إهدار للموارد. الحل يأتي من نمط Fast Path / Slow Path الذي ابتكرته GitHub لتوسيع نطاق Copilot.
الفكرة بسيطة لكنها فعالة:
- المسار السريع: استخدم نموذجاً صغيراً (SLM) للاستفسارات الشائعة والبسيطة. هذه النماذج أرخص بـ 10-20 مرة وأسرع بشكل كبير.
- المسار البطيء: ارتقِ إلى نموذج كبير فقط للاستفسارات المعقدة أو الحالات النادرة.
Google Cloud تؤكد في تقريرها عن اتجاهات الأعمال للذكاء الاصطناعي 2025 أن صعود النماذج الصغيرة (SLMs) هو أحد المحركات الرئيسية لكفاءة الأعمال. شركات مثل Gemma من Google وPhi-3 من Microsoft تقدم أداءً مذهلاً بحجم صغير.
مخاطر الإنتاج: دروس من الواقع
الانتقال من المختبر إلى الإنتاج محفوف بالمخاطر. إليك أهم المشكلات التي واجهتها الشركات وكيفية تجنبها:
1. الحلقات اللانهائية
الوكيل يمكن أن يعلق في دورة لا نهائية من التفكير والتحرك دون الوصول إلى نتيجة. الحل: دائماً ضع حداً أقصى لعدد التكرارات (max_iterations) واستخدم مؤقتات للقطع.
2. الانهيارات المتتالية
في نظام متعدد الوكلاء، فشل وكيل فرعي واحد يمكن أن ينهار سير العمل بأكمله. الحل: طبق نمط Circuit Breaker – إذا فشل وكيل معين أكثر من 5 مرات متتالية، أوقف استدعاءه مؤقتاً وحوّل الطلب إلى وكيل احتياطي.
3. تسرب البيانات عبر سجلات التفكير
الوكلاء قد يكشفون عن بيانات حساسة (PII) في سجلات التفكير الداخلية. الحل: طبق تنقية البيانات قبل إرسالها للنموذج، وتأكد من تعقيم السجلات بعد المعالجة.
4. الانحراف المهاري
سلوك الوكيل يمكن أن يتغير بشكل غير متوقع بعد تحديث النموذج. الحل: اختبر النماذج الجديدة بدقة مقابل مجموعة بيانات تقييم ثابتة، وقفل إصدار النموذج في الإنتاج.
التخطيط والتنفيذ: المستوى التالي من الذكاء
النمط الأكثر تقدماً هو Plan-and-Execute. هنا، وكيل “المخطط” يقوم أولاً بتحليل الهدف المعقد إلى سلسلة من الخطوات، ثم وكيل “المنفذ” ينفذ هذه الخطوات مع نقاط تحقق. هذا يشبه مدير مشروع بشري يخطط ثم يفوض المهام.
على سبيل المثال، إذا طلب مستخدم “أعد تقرير المبيعات للربع الأخير وقارنه بالربع السابق، وأرسل النتيجة بالبريد الإلكتروني لفريقي”، فإن المخطط سيقسم هذه المهمة إلى:
- استعلام قاعدة بيانات مبيعات الربع الأخير
- استعلام قاعدة بيانات الربع السابق
- حساب نسبة التغيير
- توليد تقرير PDF
- إرسال البريد الإلكتروني
كل خطوة يتم تنفيذها بواسطة وكيل متخصص، مع التحقق من صحة كل خطوة قبل الانتقال للخطوة التالية.
تأثير الأعمال: أرقام لا تكذب
لننظر إلى الأثر الملموس على الأعمال:
| المقياس | قبل الذكاء الاصطناعي | بعد الذكاء الاصطناعي | المصدر |
|---|---|---|---|
| وقت معالجة استعلام العميل | 10 دقائق | 30 ثانية | Klarna |
| تكلفة خدمة العميل لكل محادثة | $5.00 | $0.50 | تقدير صناعي |
| دقة حل المشكلات من أول اتصال | 65% | 85% | Forrester |
| وقت تطوير الميزات الجديدة | 4 أسابيع | 3 أيام | GitHub Copilot |
Forrester في تقريرها “AI Predictions 2025” تؤكد أن الشركات تنتقل من مرحلة “التجربة” إلى مرحلة “التصنيع”، مع تركيز قوي على تحسين التكلفة وقياس العائد على الاستثمار.
الخلاصة: ما الذي ينتظرنا؟
الذكاء الاصطناعي الوكيل ليس مجرد موضة عابرة. إنه تحول جذري في كيفية بناء وتشغيل الأنظمة البرمجية. الشركات التي تتبنى هذه العمارات الآن ستكون في طليعة المنافسة خلال السنوات القادمة.
المفتاح هو البدء صغيراً، التركيز على حالات استخدام محددة ذات عائد استثمار واضح، وبناء البنية التحتية للتوسع التدريجي. لا تحاول بناء وكيل عملاق من اليوم الأول. ابدأ بوكيل بسيط لخدمة العملاء، ثم أضف المزيد من الوظائف تدريجياً.
Key Takeaways
- الانتقال من التجربة إلى التصنيع: 71% من الشركات تعتمد الذكاء الاصطناعي التوليدي في 2025، مع تركيز على قياس العائد والتحسين المستمر للتكلفة
- الوكلاء الأذكياء هم المستقبل: نمط ReAct وعمارة Router Agent هما أساس بناء أنظمة وكيلة قوية وقابلة للتوسع
- تحسين التكلفة أمر حتمي: استخدام النماذج الصغيرة (SLMs) للمهام البسيطة والنماذج الكبيرة للمهام المعقدة يخفض التكاليف بنسبة تصل إلى 90%
- مخاطر الإنتاج حقيقية: الحلقات اللانهائية، الانهيارات المتتالية، وتسرب البيانات هي مشكلات شائعة يجب التعامل معها منذ البداية
- التخطيط والتنفيذ المنفصلان: نمط Plan-and-Execute يسمح بمعالجة المهام المعقدة بكفاءة وموثوقية عالية















