Project Structure
Understanding the structure and entrypoints of your Pickaxe application.
Pickaxe does not enforce a specific project structure, but some of the tooling assumes a certain project structure to make it easier to develop agents and tools. The recommended structure for a Pickaxe application is to have a single entrypoint that imports your agents and tools, and starts the Pickaxe client.
Entrypoints
The minimal entrypoint for a Pickaxe application is a simple file that imports the pickaxe
client, imports your agents and tools, and starts it.
Automatic Registration
In this example project, the my-app/src/agents/index.ts
and my-app/src/tools/index.ts
are barrel files that imports all the agents and tools in the my-app/src/agents
and my-app/src/tools
directories respectively.
As you add more agents, tools, and toolboxes, you can add them to the barrel files and they will be automatically registered with the Pickaxe client.
Manual registration
For some more advanced use cases, you may want to manually register specific parts of your workload on multiple machines, for example cpu or memory bound work. For this you can use the register
option on the pickaxe.start
method.
This is further documented in the scaling documentation.