Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

What this book teaches

Agentic systems stop being demos once their output starts to change something: a ticket's priority, a recorded investment decision, a wallet, an invoice that someone will pay. From that point on, getting the right answer is not enough. You also have to know who was allowed to cause each change, on exactly what, what survives failure, and whether you can prove what happened afterwards.

CognoKratos is built around a larger premise: AI agents are becoming economic actors. As they gain more capability, engineers need to know how to place trustworthy infrastructure around them.

This edition teaches that engineering judgment through five runnable systems and one synthesis part:

PartEngineering questionReference implementation
IHow is a production agent engineered around an untrusted probabilistic component?simple-agent-template
IIOnce you have an agent, how does it become durable software that survives time, state, crashes and restarts?sophos-agent
IIIHow do you put deterministic policy, evidence and human authority around probabilistic reasoning?etf-research-agent
IVHow can probabilistic software request cryptographic capabilities without becoming the custodian of cryptographic authority?arktos-wallet
VHow can agents do operational financial work while humans keep the authority?tauros-revenue
VIHow do the five answers compose into a trust architecture for increasingly autonomous systems?the book's own synthesis

The current five projects are the present state of the curriculum, not its permanent definition. See A living curriculum for the open frontiers and how contributors can extend it.

Deliberate scope

Learn the architecture. Then choose the implementation.

CognoKratos is not an introductory AI-agent course, an agent framework, a governance product, an identity protocol, a wallet SDK, a payments network or a blockchain platform. Excellent projects already exist for each of those, built by people who own the problem full time, and this book points to several of them.

CognoKratos studies a narrower question:

Where does trust come from when these components are composed into systems whose actions matter?

Frameworks, clouds and protocols change faster than the properties a system depends on. A tool boundary, a recomputed decision, an approval bound to an exact payload or a key the model never sees can each be built with many technologies. So the book teaches each property through one runnable implementation, and keeps asking a second question:

The implementation may change. Which engineering property must survive?

Part I makes this concrete: the same agent is built twice, once on NVIDIA NeMo Agent Toolkit and once in Rust on Rig, so you can check whether you still recognise the architecture after the framework is replaced. Where CognoKratos fits places the book among the frameworks, runtimes, policy engines, standards and infrastructure you are likely to use, including managed platforms, which are often the right choice. Knowing the architecture tells you which responsibilities you are delegating to that infrastructure, and which remain yours to configure, integrate and verify.

The idea that runs through every part

The model is treated as a probabilistic component: useful for interpreting intent, choosing among tools, synthesising evidence and explaining. It is unreliable as a source of truth, and it has no place as a silent holder of identity, policy, custody or authority.

So each project draws the same line in a different domain:

Use the model for decisions that benefit from interpretation. Use ordinary code for decisions that can be specified deterministically.

Drawing that line puts most of the trust work in the software around the model:

  • Capability boundaries. What can the model cause at all?
  • Identity. Who is the caller, and who decides that?
  • Authority. Who may make a consequential decision bind?
  • Durability. What survives a crash, and what happens on retry or replay?
  • Evidence and audit. Can the action and its assumptions be reconstructed later?
  • Cryptographic boundaries. Can the system exercise a capability without exposing the secret behind it?
  • Human sovereignty. Which actions remain meaningfully under human control?

Graduate outcome

After working through this edition, you should be able to move from:

I can build an AI agent.

Toward:

I can engineer a system in which an autonomous agent is allowed to exercise meaningful authority safely.

Concretely, you should be able to:

  • treat the model as one probabilistic component inside a larger trust architecture;
  • identify actors, assets, capabilities, authority and trust boundaries;
  • point at the code that stops a model from authorising its own action and explain why a prompt cannot bypass it;
  • distinguish what an approval interface displays from what the mutation boundary independently verifies;
  • separate runtime state, domain state and audit history;
  • design state-changing operations so retry, replay or concurrency cannot apply them twice;
  • decide which guarantees belong in a type, database constraint, policy engine, protocol boundary, cryptographic check or human decision;
  • give an agent a useful cryptographic capability without giving it the underlying secret;
  • reason about who still holds custody and authority when the model does not;
  • explain what additional infrastructure would be required before an agent could safely sign, settle or coordinate economically across decentralized systems.

The last point matters: this edition deliberately stops before unrestricted signing or settlement. The open gaps are part of the curriculum frontier, not something hidden behind aspirational language.

Why blockchain appears in the curriculum

CognoKratos does not assume every agent needs a blockchain.

Blockchain and cryptographic systems matter where they change the trust model: signatures, custody, ownership, verifiable authorization, provenance, settlement, programmable constraints and coordination without requiring every participant to trust the same intermediary.

Part IV introduces cryptographic capability without signing. Part V models economic intent without holding keys. Part VI asks you to design the missing path from approved intent to settlement without pretending the integrated system already exists.

How the book is grounded

The projects are runnable, and their lessons are written against their code and tests. Wherever the book's editors found a lesson's statement broader than the pinned code supports, the chapter carries a labelled Book edition note.

The upstream text is left as it is. Implemented behaviour, behaviour demonstrated by a test, documented limitations and future exercises are kept distinct throughout.

This discipline is central to CognoKratos: a reference architecture is a proposition that should be possible to inspect, reproduce, challenge and improve.