-
Notifications
You must be signed in to change notification settings - Fork 2
Usage
The Principles Framework enables you to generate and utilize specialized AI agents tailored to your singular goal. This section provides detailed instructions on how to generate agents and run them to process prompts related to your specific objectives.
To generate agents based on your singular goal, use the generate-agents script. This script processes your goal, breaks it down into fundamental components using first principles thinking, and creates specialized agents for each component.
npm run generate-agents "Your singular goal or problem statement here."
# or
yarn generate-agents "Your singular goal or problem statement here."npm run generate-agents "I want to optimize my daily schedule to improve productivity."- Process Your Singular Goal: Understands the specific objective you provided.
- First Principles Breakdown: Decomposes your goal into its most fundamental components, such as time management, task prioritization, and energy level assessment.
- Generate Specialized Agents: Creates specialized agents designed to address each fundamental component.
-
Create a Package: Generates a new package containing the agents and necessary configurations, typically located in the
packages/directory with a unique name based on the timestamp.
Upon successful execution, you should see output indicating the creation of agents and the package directory.
Created agentsConfig.ts at /path/to/principles/packages/agent-package-1633036800000/src/config/agentsConfig.ts
Created index.ts at /path/to/principles/packages/agent-package-1633036800000/src/index.ts
Copied .env to /path/to/principles/packages/agent-package-1633036800000/.env
Installing dependencies in /path/to/principles/packages/agent-package-1633036800000...
# npm install logs...
Building the package in /path/to/principles/packages/agent-package-1633036800000...
# tsc logs...
Package agent-package-1633036800000 created successfully.
Current package name saved to /path/to/principles/current_package.txt
After generating the agents, you can use them to process prompts related to your goal. The agents are designed based on the fundamental components of your goal, ensuring that they handle prompts more effectively.
Navigate to the generated package directory and run the agents with your prompt:
cd packages/<generated-agent-directory>/
npm run run-agents "Your test prompt here."
# or
yarn run-agents "Your test prompt here."cd packages/agent-package-1633036800000/
npm run run-agents "Here is my list of tasks for today: write a report, attend a meeting, respond to emails, and plan the next project. How should I prioritize them to maximize productivity?"- Compile the Project: Ensures that all generated agents are compiled and ready for execution.
- Run the Agents: Executes each specialized agent to process the provided prompt.
- Display Results: Presents the optimized schedule along with reasoning and additional suggestions.
{
"optimizedSchedule": [
{
"time": "9:00 AM - 11:00 AM",
"task": "Writing the report",
"reason": "High-priority task aligned with peak energy levels."
},
{
"time": "11:30 AM - 12:30 PM",
"task": "Team meeting",
"reason": "Collaborative task scheduled before lunch."
},
{
"time": "2:00 PM - 4:00 PM",
"task": "Responding to emails",
"reason": "Less demanding task scheduled during lower energy period."
}
],
"additionalSuggestions": [
"Take a short walk after lunch to boost energy.",
"Prioritize deep work tasks in the morning."
]
}Interpreting the Output:
- Optimized Schedule: The agents have provided a structured schedule that aligns tasks with your energy levels, ensuring that high-priority tasks are addressed during peak productivity periods.
- Reasons Provided: Each scheduling decision is accompanied by reasoning based on the fundamental components, such as energy levels and task importance.
- Additional Suggestions: Offers practical tips to further enhance productivity and maintain energy throughout the day.
If you need to update the agents or regenerate them based on a revised goal, simply rerun the generate-agents script with the new goal. Existing agents can be modified or extended as needed.
Generated agents are located in the packages/ directory, each within its unique package folder. You can navigate to these folders to view, modify, or extend the agents' functionalities.
cd packages/<generated-agent-directory>/Each agent is designed to handle a specific fundamental component of your goal. You can customize these agents by modifying their code to better suit your preferences or to enhance their capabilities.
- Provide a Clear and Specific Goal: The more well-defined your goal, the more effectively Principles can decompose it and generate appropriate agents.
- Focus on Singular Goals: Keep your goals singular to ensure effective breakdown into fundamental components.
- Iterate and Refine: Continuously refine the generated agents based on performance feedback to improve their effectiveness.
If you encounter issues while generating or running agents, refer to the Troubleshooting page for guidance.