What is Code Valley?

For developers,


... to capture their software knowledge in software agent that codes for them.

For users,


... that autonomously designs and constructs software.

Code Valley provides developers with a tool to build their own agent, a program with special compile-time, metaprogramming powers that is designed to communicate with other agents like itself. Each agent will ultimately return a fragment of native code to its client.

Code Valley provides end-users with a global network of these agents that can be harnessed to build software. High-level agents in this network capture application requirements from the end-user which triggers the formation of a hidden hive compiler that ultimately returns that application.

Why emergent coding?

This is the way a software contribution...

... is currently made.

Developer hand-codes a custom code contribution.

(Manual customisation)

... can now be made.

Developer expresses an agent.

Agent contributes to many projects simultaneously.


This is the way a software project...

... is currently developed.

Developer discusses requirements with client.

Developer hand-codes/compiles/links the application.

... can now be developed.

Developer carefully chooses agents from the World Compiler.

A native program is ultimately returned to the developer.

How the technology works




80 seconds




80 seconds


To build software using emergent coding, you use an interface to the system of agents called the Pilot.

Every agent in this system is built to have special compile-time metaprogramming powers, and is carefully designed to communicate with other agents like itself in order to capture and translate requirements.

Using your Pilot, you choose the agents you wish to design and build you your program, put these agents in touch with each other (a job made easy through the Pilot interface) and then hit 'Build.' Behind the scenes, a custom 'hive compiler' begins to form. The agents you selected accept payment, communicate with each other, translate requirements and ultimately select other agents like themselves from the system.

The key to the hive compiler's formation is to apply this selection of agents recursively, through all layers of abstraction from the Pilot onwards. Each agent translates and delivers requirements to other agents it selects from the system which do the same. The process continues until the requirements have been completely translated. At this point, agents at the fringes of the hive compiler communicate to place a few bytes of native code.

Then, the process reverses. Each of these agents pass their bytes back to their 'client' agents who concatenate bytes and pass these fragments back to their 'client' agents who do the same. As bytes are concatenated and passed back, the connections between agents are severed and the hive compiler begins to dismantle. Eventually, one long string of bytes - the executable itself - arrives back at your Pilot.

You can use the Pilot to tap into any layer of this system. For example, you could tap into the layer of lowest hardware abstraction - the byte layer - and trigger a (very small) hive compiler that will return you a program. However, your Pilot Expression (your selection of agents) will no doubt be rather convoluted, not unlike writing in assembly. Alternatively, you could tap into the next layer - the data layer - and trigger a (slightly larger) compiler that will return you a program. Creating a Pilot Expression at the data level will feel similar, in terms of abstraction, to writing a program in a common high level language.

Most importantly, at no point in this process does the design ever pass through a centralised source code phase. As far as the user of the Pilot is concerned, they selected a few agents from the system to design and construct a program, and those agents returned an executable a short time later.


If you think of the construction of a bridge in the Civil Industry for example, a project manager tasked with delivering a bridge will not build it himself. Instead, he will select contractors to build certain parts of the bridge, and give these contractors access to the relevant parts of the bridge 'construction site'. But these contractors don’t build those parts either; they select their own sub-contractors to build smaller parts, giving these sub-contractors access to even smaller parts of their own portion of the bridge 'construction site' and so on. Eventually, 'subbies' do touch the physical components – the steel and the concrete – and build them to fit with the other parts. What we end up with is a perfect, shiny and native bridge, assembled with everyone in communication so that all the pieces fit together perfectly.

Now, let’s say we apply the way software is currently developed to build this bridge. First, you would have a project manager go to a 'library' of bridge parts and select the parts he needs. But these parts were all pre-made off-site and without any knowledge of the exact type of bridge and the construction site into which they will be inserted. So the poor project manager has to try and fit the parts together himself using lots of concrete and steel reinforcement, resulting in a bridge that, at the very least, is not aesthetically pleasing, and at the worst, is structurally unsound. Unfortunately, virtually every piece of software in use today was built like this second bridge.

Code Valley technology allows every software project to be built like the first bridge.

And it goes a little further; instead of developers contributing to a project by writing code, this technology allows developers to create a special kind of agent with compile-time metaprogramming powers. When activated, this agent will join a newly forming 'hive compiler' and carry out its work in extending that compiler a little further. In the analogy, imagine the contractors, sub-contractors and subbies each had their very own robot that was hard-wired with their expertise, so that it could do their job for them. That robot is what an agent is to a developer. These robots can be helping build hundreds of bridges simultaneously. (Let's see the Civil Industry do that.)

To construct software using this system, you contract agents, give them your requirements and a short time later, a complete program is returned to you, exactly satisfying your requirements.

Sound impossible? Emergent coding is beyond proof-of-concept. The site you're currently viewing is served by a web-server that was designed and built by this network of agents in 12 minutes.

Release phases



Whitney is the Code Valley network in its most fundamental form; a user interface to browse the Valley, and user interfaces to create, test and manage your own agents. The main goal of Whitney is to get the network up and running and establish a live environment in which developers can begin creating and testing their own agents. Additionally, it is a chance for developers to cultivate relationships with suppliers and clients of their own agents and to begin accruing a positive reputation within the Valley.

Contributor Expectations

Whitney demonstrates three fundamental areas of real utility;

  • You can browse and add to the Valley, whether it be to add a new classification that you plan on filling with your own agent, or to create a classification for which you are seeking a supplier agent (i.e. a 'void').

  • You can create your own agent by expressing its requirements and building it using your Agent-builder. Once built, your agent will be uploaded to the Valley where it will become available for private contracting by yourself, for testing purposes.

  • You can test your new agents by expressing and building tests using your Pilot. You can then download and run up these test programs in order to assess whether the design-contributions your agents make are sound. Once satisfied, you can officially publish your agent to the Valley, making it publicly available for contracting by other agents in the network.

User Expectations

During Whitney, the choice of applications that a user can build is limited. However, the market will respond to demand. Users can advertise their demands for particular applications through the Code Valley marketplace.



Ford is designed to encourage developers within the community to make their agents a little 'smarter' and begin unlocking emergent coding's enormous potential. In order to make agents smarter, more sophisticated negotiation outcomes and terms will be required, which involves out-of-band discussion and collaboration. During this phase, the community will make full use of the forums; developers are encouraged to propose new committee types, outcomes and terms, and if other developers express interest and enthusiasm, these new types can be added to the client so that agent expressions can be reloaded and upgraded.

Contributor Expectations

Transitioning to Ford will also be accompanied by the release of a new client which will contain the following additional features;

  • The Agent-builder will have a more intuitive user-interface, so that the different layers of automation you add to your agent are more easily inspected and stepped through.

  • The Pilot will allow you to test these different automation paths to ensure the that the different fragments returned by your agent in these instances are sound and satisfy given requirements.

User Expectations

During Ford, the range of applications that the marketplace can build will continue to expand, and the quality of output executables will increase, as their agents become smarter.



McIlroy is the third phase of release in our roadmap, and the precursor to complete decentralisation of the marketplace. When McIlroy is complete, any developer in the world will be able to rebuild their agent and be delivered a feature-complete agent executable, to run on their own hardware (or in a cloud of their choosing) and be a node in a global peer-to-peer decentralised marketplace for software expertise. The Valley itself will also become decentralised, and be distributed amongst all nodes in the network.


Your role

If you wish to join the World Compiler,


... whose agents are paid to contribute to software designs.

By joining the network, you will be able to build and deploy as many agents as you like to the World Compiler, where they will sit patiently awaiting contracts. Each time one of your agents receives a contract, your expertise is essentially being 'pulled' into a new project. Your agent will be paid for that privilege.

Before joining, we recommend you act as a 'user' first, so that you understand how emergent coding actually works in practice. This experience will serve you well when you become a 'contributor' and begin building and deploying your own agents to the Valley.

If you wish to use the World Compiler,

you are a USER

... who pays agents in the World Compiler to design and build software.

The World Compiler is not yet ready for end-users to harness it to build software. However, it is more than ready for developers who would like to see emergent coding in practice.

To build software, you use what is known as a 'Pilot.' The Pilot is essentially a web portal into the Valley which allows you to contract any agents you like to design and build you a program. You will need to pay these agents (amounts in the order of fractions of fractions of cents) for their custom design. After payment is received, a hive compiler begins to form, pulling in agent after agent to design your program. Once all bytes have returned, your program will be available for download.



To express and build a program using emergent coding, you use the Pilot. The Pilot runs in your browser, so there is no need to download or configure anything in order to be able to contract agents in the World Compiler.

You also have access to the Valley where you can search for potential agents to contract from your Pilot. The Valley contains a detailed list of possible design services, as well as a list of a how many contributors have built agents that provide these services. For example, the contribution data::check::flag::default::64 currently has three agents listed underneath it in the Valley. Each of these agents was built by a different contributor, and they are all competing for business from 'clients' who need that particular contribution (i.e. who need an agent to design the code that will check a flag). The metrics associated with each of these competing contributors are listed alongside their agent in the Valley. Prospective clients take these metrics into account when deciding which competitor to contract.

To get started on your first program expression, you may find the docs here of use. They are designed to teach you all you need to know about emergent coding and have you expressing in under an hour.

Figure 5 - User portals

See it in action

There are many different configurations of agents that could be contracted to build a Hello World program - the choice is entirely up to you. In the following video, we have chosen to build Hello World four different ways, contracting different agents each time. With each exercise, we move up a little 'higher' in the network (and in terms of abstraction) and can therefore expect to contract fewer and fewer agents as the expertise they encapsulate accumulates (by absorbing the expertise of the supplier agents they contract).

  • Case 1 - Here, we contract 8 agents from the byte layer, the lowermost layer of the network. Byte layer agents design code not by contracting other agents, but instead directly place the binary CPU instructions that become the final executable. (If you find yourself thinking "That's ridiculous!" while watching this first exercise, that's a good thing. Keep watching.)

  • Case 2 - Here, we contract 6 agents from the interface of the data and byte layers. These data agents will presumably have suppliers in the byte layer, but we do not know who these suppliers are, nor do we need to.

  • Case 3 - Here, we contract just 2 agents from the middle of the data layer. These data agents will likely have suppliers that are also in the data layer (or perhaps the byte layer - again, we do not need to know!). Of the four exercises, this is likely the most 'correct', or at the very least, the most sane. These 2 suppliers are 'real' agents that exist in the network and have already been contracted time and time again as part of other builds. In this case, we are contracting them to build the Hello World program.

  • Case 4 - Here, we contract just a single agent from the data layer. This agent designs a Linux core that greets the user with "Hello World" as soon as the program is run up. In emergent coding, you cannot build software for which agents do not yet exist; this agent was clearly created especially for this exercise. Agents are paid, and in turn pay their suppliers (taking a small cut in between, which goes back to their developer-creator) and agents will only be created to satisfy true demand. Will there be demand for an agent that designs a Linux core that greets the user with "Hello World"? (Hopefully, your Goldilocks comfort zone was back around Case 3 and watching this last exercise leaves you with the same thought with which you began; "That's ridiculous!".)



To become a contributor, you will need to request an invite. Once invited, you will have access to all the tools you need to express, build and manage your own agents. The client runs in your browser, so there is no need to download or configure anything in order build and deploy your own agents to the World Compiler.

The client consists of five windows (as shown in Figure 6); the Valley (visible to users and contributors), two administration portals for you to manage your agent portfolio and agent finances, and two tools that you use to build and test agents, respectively.

  • Valley

    The Valley is a standardised repository advertising all agents in the World Compiler currently available for contracting. It is broken down into formal classifications, which assist prospective clients with browsing the Valley in search of potential suppliers. These classifications are organised in an hierarchical fashion, where classifications have sub-classifications which have sub-classifications etc, where the lowest classification contains a list of all developers in the World Compiler (or rather, their pseudonyms) who own a particular type of agent.

  • Portfolio

    The Portfolio portal contains a list of all agents you have built and/or deployed to the Valley. It also allows you to change your agent's price, and notify your agent's clients of updates. From your Portfolio, you can control which version of your agent is currently deployed in the Valley and is publicly available for contracting. Once you have expressed and built a new agent, it will first appear in your Portfolio (but not yet be deployed to the Valley). You can then express and build a test ELF by contracting your new agent (using your Pilot). Only once you are satisfied that your agent provides the correct contribution will you officially deploy your agent to the Valley.

  • Finance

    The Finance portal contains an aggregated list of Accounts Receivable and Accounts Payable. Each of your agents (with the exception of byte agents), will have suppliers who require payment every time your agent sends them contracts. Similarly, every time your own agent is contracted, it will also expect payment. (You will pocket a tidy profit margin in between the two.) Due to the sheer quantity of contracts that flit about the network on a daily basis, payments are aggregated over a pre-defined settlement period. Once this period expires, all developers in the World Compiler have the next settlement period to settle accounts, which involves; submitting dedicated addresses (Bitcoin) to all developers listed as clients of your agents, confirming when those payments have been received, awaiting addresses from all developers listed as suppliers of your agents, and sending payment (for them to confirm). The settlement period can be adjusted according to demand, but is set to one fortnight, at present.

  • Agent-builder

    The Agent-builder is a domain-specific Pilot designed specifically for expressing agents. Once you have mapped out the design of your agent, you can formally express your requirements using your Agent-builder. The domain-specific nature of this Pilot ensures that it can capture your requirements in the most user-friendly fashion. Over the past three years, the Agent-builder has gone through many iterations, and the version you are viewing is obviously the latest. After exhaustive use, we have settled upon a WYSIWYG Agent-builder user-interface for capturing agent requirements. Whilst it has come a long way, there are still many outstanding features we will be adding to the Agent-builder to more easily allow the overlays of different processing paths to be laid down and viewed.

    Once you are satisfied with your new agent expression, you can submit it to Code Valley for building. Once it is built, it will appear in your Portfolio, available to be privately contracted for acceptance testing, prior to official deployment.

  • Pilot

    The Pilot is your tool for building software by contracting agents. You can use it to prototype agent designs, and then to self-contract built agents to test that they provide the correct contribution.

Figure 6 - Contributor portals

Payment and revenue

The network itself is currently active and in its first phase of release; Whitney. There is no 'play money' involved. Agents pay and are paid in bitcoin.

As a contributor, it is free to;

  1. Express agents
  2. Build agents
  3. Express programs

You are expected to pay another contributor when you take one of the following actions (but will always be prompted with a "Do you wish to continue" notification prior to taking an action that requires payment);

  1. Publish a classification
  2. Deploy an agent
  3. Build a program

The following table provides descriptions for each of these actions, along with their cost and the relevant payee.

Action Description Amount Payee
Express agent Create a new agent expression (using your Agent-builder). FREE NA
Build agent Submit a new agent expression (created using your Agent-builder) to Code Valley for building. Your agent will be deployed to the Code Valley cloud. FREE NA
Express program Create a new program expression (using your Pilot) which involves live-contracting other agents in the World Compiler, including possibly your own. FREE NA
Publish classification Create a new Verb/Title/Variation/Suite classification in the Valley 1000 satoshi/pay cycle Other contributor in the network
(parent classification publisher)
Deploy agent When you are satisfied your agent's contribution is sound, you can officially deploy it to the Valley. This action will instantly make your agent publicly available for contracting by any other agent (or Pilot) in the World Compiler. 2 mBTC Code Valley
Build a program Submit a program expression (created using your Pilot) to the World Compiler for building. Variable
(fractions of fractions of a cent)
Other contributors in the network
(the suppliers you contracted in your test program expression)

Note: The pay cycle period is currently set to 2 weeks.


As a contributor, you have the opportunity to earn coin by;

  1. Identifying classifications in the Valley – Whilst creating a classification does incur a fortnightly cost of 1000 satoshi, you will also receive that same amount from each and every one of the users who publish sub-classifications under your own, including published agents. For example, if you create a new suite and 6 agents publish to that suite, you will be paying 1000 satoshi/fortnight to the parent (variation) publisher, but you will also be receiving 1000 satoshi/fortnight in total from the users who publish agents under your own suite.
  2. Agent contracts – Every time your agent is contracted, it is paid. This revenue will be intermittent initially, but could become a continual source of passive income in future, if/when that agent is part of an operational domain (group of agents who design software in demand by end-users).

Free deployment credits

As a Code Valley user, during Whitney you have the opportunity to earn deployment credits by adding value to the network in other ways. A single deployment credit will allow you to deploy a new agent to the Valley for free. You can earn deployment credits a number of different ways;

  • Referrals - Every time a new user joins, they have the opportunity to specify whether they were referred by an existing user. If you are nominated as a referrer, and if/when the new user builds their first agent, you will receive three deployment credits.
  • Written content - You also have the opportunity to be awarded build credits by adding value to the network in the form of educational and support materials. Any time you author a constructive and informative article regarding emergent coding, please send the accompanying link to team@codevalley.com. If you find that link reposted on our Twitter account, you will be awarded five deployment credits.
  • Video content - Any time you create an educational video about emergent coding (whether it be a broad overview, or an in-depth examination of a particular concept), please send the accompanying link to team@codevalley.com. If you find that link reposted on our Twitter account, you will be awarded five deployment credits.

Last updated: 6th January, 2017