Skip to content

Instantly share code, notes, and snippets.

@TechNickAI
Last active May 28, 2025 13:45
Show Gist options
  • Save TechNickAI/c322bfb42e7648d037739459f1982675 to your computer and use it in GitHub Desktop.
Save TechNickAI/c322bfb42e7648d037739459f1982675 to your computer and use it in GitHub Desktop.
Thrustworthy Agent Profiles

πŸš€ Major Update: AI Agent Configuration System for Thrustworthy

Hey team! Just completed a major improvement to how we manage our AI agents. Here's what we've built and why it matters:

🎯 The Problem We Solved

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.

πŸ’‘ The Solution: Agent Profile Files

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)

πŸŽ‰ Why This is Awesome

  1. AI Agents as Employees: Each .agent file is like an employment contract - clear role, responsibilities, and capabilities all in one place

  2. Instant Configuration: Change temperature, model tier, or prompts without touching code. Just edit the .agent file and reload!

  3. VS Code Superpowers:

    • Full IntelliSense and autocomplete
    • Real-time validation
    • Type agent + Tab for a complete template
    • Schema validation catches errors before runtime
  4. 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
  5. Clear Overview: See all our AI employees and their roles at a glance in li/prompts/

  6. Version Control Friendly: Prompt changes are now separate from code changes, making git history cleaner

πŸ”§ Technical Details (Brief)

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 files
  • LuminousAgent automatically applies configuration from agent files
  • Full backward compatibility - existing agents work unchanged
  • Comprehensive test coverage

πŸš€ What This Enables

  1. Rapid Experimentation: Tune agent behavior in seconds, not hours
  2. Self-Improving Agents: Agents can analyze their own performance and update their profiles
  3. Dynamic Agent Creation: Agents can create other specialized agents on the fly
  4. Better Collaboration: Non-engineers can understand and even modify agent behavior
  5. Scalability: Adding new agents is now trivial

πŸ“… What's Next

  1. Phase 1: Convert all existing agents to use .agent files
  2. Phase 2: Implement self-improvement - agents analyzing their performance and tuning their own configs
  3. 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! πŸš€βœ¨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment