Hey team! Just completed a major improvement to how we manage our AI agents. Here's what we've built and why it matters:
Our AI agents are the heart of Thrustworthy - they analyze trades, manage positions, evaluate signals, and generate strategies. We needed a system that treats our AI agents as first-class citizens - as the AI employees they truly are.
Agent configurateion such as which model to use, system prompt, user prompt were all spread out in a file that was not easily editable by non engineers or AI.
We also wanted to be able self improve agent config by allowing the LLM to update it's own prompt, and generate new strategy agents from scratch.
We've created a new .agent
file format that serves as an "employment contract" for each AI employee. These files contain everything needed to define an agent's role, capabilities, and behavior in one place.
Here's what a real agent profile looks like:
---
name: Debugger Agent
description: Analyzes command outputs, logs, and test failures to provide actionable summaries
heart_centered_prompt_version: "terse"
model_tier: "swift"
dependencies:
mcp_servers: []
reference_materials: []
model:
api: chat
configuration:
type: openai
name: gpt-4.1-nano
parameters:
temperature: 0.1
max_tokens: 3000
---
system:
You are a Debugger Agent that analyzes command outputs, logs, and test failures to
provide concise, actionable summaries.
Your role is to:
1. Parse command outputs, logs, and test failures to identify issues
2. Identify root causes and patterns in failures and errors
3. Provide clear, concise summaries suitable for pasting into an editor
4. Handle multiple output types including pytest, logs, and generic command output
user:
Analyze the following {{output_type}} output and provide a concise summary:
<output>
{{output}}
<output>
Focus on:
1. What failed or went wrong
2. Why it failed (root cause)
3. How to fix it (specific actions)
-
AI Agents as Employees: Each
.agent
file is like an employment contract - clear role, responsibilities, and capabilities all in one place -
Instant Configuration: Change temperature, model tier, or prompts without touching code. Just edit the
.agent
file and reload! -
VS Code Superpowers:
- Full IntelliSense and autocomplete
- Real-time validation
- Type
agent
+ Tab for a complete template - Schema validation catches errors before runtime
-
Easy Agent Creation: Anyone can create a new agent:
- Use the VS Code snippet
- Copy an existing agent file
- Let Claude or Cursor AI generate one with perfect schema compliance
-
Clear Overview: See all our AI employees and their roles at a glance in
li/prompts/
-
Version Control Friendly: Prompt changes are now separate from code changes, making git history cleaner
We initially tried Microsoft's Prompty format but quickly found it wasn't right for us - it's designed for direct LLM execution, had parsing issues with our config, and added unnecessary complexity. So we built our own lightweight solution that integrates perfectly with our existing LuminousAgent
system.
The implementation is simple:
AgentProfile
class loads and validates.agent
filesLuminousAgent
automatically applies configuration from agent files- Full backward compatibility - existing agents work unchanged
- Comprehensive test coverage
- Rapid Experimentation: Tune agent behavior in seconds, not hours
- Self-Improving Agents: Agents can analyze their own performance and update their profiles
- Dynamic Agent Creation: Agents can create other specialized agents on the fly
- Better Collaboration: Non-engineers can understand and even modify agent behavior
- Scalability: Adding new agents is now trivial
- Phase 1: Convert all existing agents to use
.agent
files - Phase 2: Implement self-improvement - agents analyzing their performance and tuning their own configs
- Phase 3: Dynamic agent creation - agents spawning specialized sub-agents for specific tasks
This new system transforms our AI agents from hardcoded functions into flexible, configurable AI employees that can evolve and improve over time. It's a foundation for the next level of AI-powered trading! πβ¨