Detailed instructions for configuring the development environment and executing the CORTEX platform.
- Bun Runtime (v1.0 or higher): Primary JavaScript/TypeScript runtime.
- Git: Version control system.
- Visual Studio Code: Recommended development environment.
- Groq API Key: Required for AI agent inference. Obtain a key from the Groq Console.
git clone https://github.com/your-organization/cortex.git
cd cortexNavigate to the backend directory and install the necessary dependencies:
cd backend
bun installCreate a .env file in the backend/ directory based on the provided template:
cp .env.example .envConfigure the following variables within the .env file:
GROQ_API_KEY: Your unique Groq API key.SOLANA_RPC_URL: (Optional) Custom Solana RPC endpoint; defaults to devnet.SOLANA_NETWORK: (Optional) Targeted network (e.g., devnet, mainnet-beta).
CORTEX utilizes a comprehensive testing suite to ensure agent integrity and system stability.
To test a specific agent neuron in isolation:
# Example: Testing the YieldNeuron
bun run src/test-playground/test-yield-agent.tsTo validate the coordination and voting logic of the complete ten-agent swarm:
bun run src/test-playground/test-orchestration.tsTo verify the connection to the Solana network and protocol data retrieval:
bun run src/test-playground/test-blockchain-simple.tsbackend/src/agents/: Implementations of the ten specialized neurons.backend/src/blockchain/: Services for Solana and DeFi protocol integration.backend/src/test-playground/: Comprehensive test suite for all system components.mobile/: React Native application source code.docs/: Supplemental technical documentation.
- Define the agent logic in a new file within
backend/src/agents/. - Ensure the new class extends the base
Agentclass. - Register the new agent role in the
AgentRoletype definition withinbase.ts. - Integrate the new agent into the orchestrator or test playground as required.
If agent deliberation fails, verify that the GROQ_API_KEY is correctly defined in the .env file and that you have remaining quota on your Groq account.
Solana devnet may occasionally experience congestion. If blockchain tests fail due to timeouts, verify the status of the devnet and consider using a dedicated RPC provider.
If you encounter runtime errors related to modules, perform a clean installation:
rm -rf node_modules
bun install- Credential Management: Never commit
.envfiles or hardcode API keys. - Wallet Safety: Use only devnet keypairs for development. Production keys must be handled via secure provider integrations.
Last Updated: February 21, 2026