Guides

Agent DevMode

Developing agents locally with DevMode

What is DevMode?

DevMode is Agentuity's local development environment that lets you test and debug your agents before deploying them to the cloud. It provides the exact same interface and capabilities you'll have in production.

Key benefits:

  • Instant feedback on agent behavior and responses
  • Complete observability with real-time logs, sessions, and detailed traces
  • Cost visibility to monitor token usage and LLM costs
  • Performance insights to identify potential bottlenecks

Starting DevMode

Run the following command in your project directory:

$
agentuity dev

Agentuity DevMode

DevMode https://app.agentuity.com/devmode/[agent-id] Port http://127.0.0.1:3500 Public https://dev-[hash].agentuity.run/

[INFO] Loading config from /path/to/your/project/agentuity/config.json [INFO] Starting server on port 3500 Listening on http://127.0.0.1:3500 =======> (Press Ctrl+C to exit) [INFO] 🚀 DevMode ready

DevMode provides:

  • Local development server on port 3500 (configurable)
  • Web interface for testing and monitoring at the provided URL
  • Public URL for external access while the server is running

The DevMode Interface

CLI Input Section

The CLI Input section is where you test your agents with various input types and scenarios. This interface is powered by your agent's welcome() function configuration.

DevMode Interface

Input Types Available:

  • JSON: Structured data for API-like interactions
  • HTML: Rich content and web-based inputs
  • Markdown: Documentation and formatted text
  • Text: Plain text for conversational interfaces

Key Features:

  • Agent Selection: Choose which agent to test from the dropdown
  • Pre-configured Prompts: Sample inputs defined in the welcome() function
  • Custom Inputs: Write your own test scenarios
  • Run Button: Execute tests instantly and see results

Configuring the Welcome Function

Your agent's welcome() function defines the test scenarios available in DevMode:

export const welcome = (): AgentWelcomeResult => {
  return {
      "welcome": "Welcome to your agent! Send a message to get started.",
      "prompts": [
          {
              "data": "Hello, how can you help me?",
              "contentType": "text/plain"
          },
          {
              "data": JSON.stringify({"query": "What is AI?", "format": "brief"}),
              "contentType": "application/json"
          },
          {
              "data": "# Research Request\n\nPlease analyze current market trends",
              "contentType": "text/markdown"
          },
          {
              "data": "<h1>HTML Content</h1><p>Process this HTML document</p>",
              "contentType": "text/html"
          }
      ]
  };
};
def welcome():
  return {
      "welcome": "Welcome to your agent! Send a message to get started.",
      "prompts": [
          {
              "data": "Hello, how can you help me?",
              "contentType": "text/plain"
          },
          {
              "data": '{"query": "What is AI?", "format": "brief"}',
              "contentType": "application/json"
          },
          {
              "data": "# Research Request\n\nPlease analyze current market trends",
              "contentType": "text/markdown"
          },
          {
              "data": "<h1>HTML Content</h1><p>Process this HTML document</p>",
              "contentType": "text/html"
          }
      ]
  }

These prompts appear as clickable examples in the DevMode interface, making it easy to test common scenarios and edge cases.

Monitoring and Debugging

Sessions Tab

Track your test runs with details on status, duration, costs, and performance metrics.

DevMode Sessions

DevMode sessions are temporary and cleared when you exit DevMode. For persistent production analytics, see Agent Telemetry.

Logs Tab

Watch your agent's execution logs in real-time with structured timestamps, severity levels, and debug information.

DevMode Logs

DevMode logs are temporary and cleared when you exit DevMode. For persistent production logs, see Agent Logging.

Best Practices

1. Design Comprehensive Test Scenarios

Create a robust welcome() function that covers various use cases:

export const welcome = (): AgentWelcomeResult => {
  return {
      "welcome": "Welcome to your agent! Send a message to get started.",
      "prompts": [
          // Happy path
          { 
              "data": "Normal user request", 
              "contentType": "text/plain" 
          },
          // Edge cases  
          { 
              "data": "", 
              "contentType": "text/plain" 
          },
          // Structured data
          { 
              "data": JSON.stringify({"query": "structured request"}), 
              "contentType": "application/json" 
          },
          // Complex scenarios
          { 
              "data": "Multi-step task with specific requirements", 
              "contentType": "text/plain" 
          }
      ]
  };
};
def welcome():
  return {
      "welcome": "Welcome to your agent! Send a message to get started.",
      "prompts": [
          # Happy path
          { 
              "data": "Normal user request", 
              "contentType": "text/plain" 
          },
          # Edge cases  
          { 
              "data": "", 
              "contentType": "text/plain" 
          },
          # Structured data
          { 
              "data": '{"query": "structured request"}', 
              "contentType": "application/json" 
          },
          # Complex scenarios
          { 
              "data": "Multi-step task with specific requirements", 
              "contentType": "text/plain" 
          }
      ]
  }

2. Test Thoroughly Before Production

  • Monitor costs during development to avoid surprises
  • Check performance using the session timeline views
  • Validate edge cases with your comprehensive test scenarios

3. Remember DevMode Limitations

  • Sessions and logs are temporary - they won't persist after stopping DevMode
  • Use production deployments for persistent monitoring and analytics
  • Test with realistic data to ensure production readiness

Need Help?

Join our DiscordCommunity for assistance or just to hang with other humans building agents.

Send us an email at hi@agentuity.com if you'd like to get in touch.

Please Follow us on

If you haven't already, please Signup for your free account now and start building your first agent!