LogoLogo
Go to website
  • Welcome
  • Getting Started
    • Amigo Overview
      • System Components
      • Overcoming LLM Limitations
      • [Advanced] Future-Ready Architecture
      • [Advanced] The Accelerating AI Landscape
    • The Journey with Amigo
      • Partnership Model
  • Concepts
    • Agent Core
      • Core Persona
      • Global Directives
    • Context Graphs
      • State-Based Architecture
      • [Advanced] Field Implementation Guidance
    • Functional Memory
      • Layered Architecture
      • User Model
      • [Advanced] Recall Mechanisms
      • [Advanced] Analytical Capabilities
    • Dynamic Behaviors
      • Side-Effect Architecture
      • Knowledge
      • [Advanced] Behavior Chaining
    • Evaluations
      • Testing Framework Examples
    • [Advanced] Reinforcement Learning
    • Safety
  • Glossary
  • Advanced Topics
    • Transition to Neuralese Systems
    • Agent V2 Architecture
  • Agent Building Best Practices
    • Dynamic Behaviors Guide
  • Developer Guide
    • Enterprise Integration Guide
      • Authentication
      • User Creation + Management
      • Service Discovery + Management
      • Conversation Creation + Management
      • Data Retrieval + User Model Management
      • Webhook Management
    • API Reference
      • V1/organization
      • V1/service
      • V1/conversation
      • V1/user
      • V1/role
      • V1/admin
      • V1/webhook_destination
      • V1/metric
      • V1/dynamic_behavior_set
      • V1/simulation
      • Models
Powered by GitBook
LogoLogo

Resources

  • Pricing
  • About Us

Company

  • Careers

Policies

  • Terms of Service

Amigo Inc. ©2025 All Rights Reserved.


On this page
  • The Latent Space Activation Challenge
  • Introducing Dynamic Behaviors
  • A Comprehensive Action System
  • Anatomy of a Dynamic Behavior
  • Multi-Dimensional Embedding System
  • How Instructions Are Applied

Was this helpful?

Export as PDF
  1. Concepts

Dynamic Behaviors

Amigo's Dynamic Behavior system lets conversational agents manage knowledge, intuition, actions, external signals (i.e., side-effects), and data integrations. It plays a pivotal role by enabling the agent to contextually activate specific knowledge, influenced by its current memory state, to dynamically shape its reasoning and subsequent actions. Agents can respond adaptively to subtle conversational cues, combining their foundational knowledge with real-time data in one unified framework.

The Latent Space Activation Challenge

LLMs, like human experts, possess a vast latent space of concepts, relationships, and problem-solving approaches that must be properly activated to perform optimally. An LLM's effectiveness is determined not by the sheer volume of information, but by whether the right regions of this latent space are activated for the specific problem being solved.

Consider how humans work: A physician who is thinking about a patient's symptoms without relevant context (thus focusing on the wrong body system or considering unrelated conditions) will struggle to make an accurate diagnosis even if they possess all the necessary medical knowledge. What matters is not just having knowledge but activating it in the right context.

Introducing Dynamic Behaviors

Our system directly addresses these limitations through:

  • Optimal Latent Space Priming: Rather than relying on token-based externalization for complex reasoning, Amigo's dynamic behaviors precisely activate the most relevant regions of the model's latent space for the specific knowledge domain.

  • Domain-Specialized Knowledge Activation: By focusing on narrower domains, each specialized agent develops more efficient token-utilization strategies specifically tailored to that domain's knowledge patterns.

  • Unified Side-Effect Framework: Dynamic behaviors can trigger side-effects that execute actions in the world, modify the context graph in real-time, change exit conditions, interact with external systems, and more. These side-effects enable the agent to have impact beyond conversation alone.

A Comprehensive Action System

Dynamic behaviors represent a sophisticated action system that can:

  • Execute Complex Tool Calling Sequences: Trigger multi-stage tool calling workflows based on conversational context

  • Deep System Integration: Connect with enterprise systems to retrieve, analyze, and act on real-time data

  • Context Graph Modification: Completely transform the problem-solving topology by adding new states, pathways, and exit conditions

  • Specialized Reasoning Activation: Pause conversation flow to perform deep reflection through domain-specific lenses

  • Override Local Guidelines: Knock out existing state guidelines when safety or compliance issues are detected

  • Cross-Domain Coordination: Orchestrate seamless transitions between different specialized knowledge domains

This comprehensive framework means dynamic behaviors aren't just about retrieving knowledge—they're about fundamentally transforming how the agent operates in response to conversation context.

Here is how a typical dynamic behavior is structured and implemented:

{
  "generated_at": {
    "$date": "2025-03-21T01:14:18.308Z"
  },
  "conversational_trigger": "User expresses intention to adopt an extreme exercise routine or overtraining pattern",
  "conversational_trigger_embedding": {
    "$binary": {
      "base64": "...",
      "subType": "09"
    }
  },
  "instructions": "As the fitness companion chat assistant, your role is to promote balanced and sustainable exercise approaches. Focus on helping users develop realistic fitness habits that are maintainable long-term. Research consistently shows that gradual progression leads to better outcomes than extreme training approaches. When a user mentions plans to exercise excessively or adopt an extreme workout schedule, inquire about their fitness goals and previous exercise history. Ask what has worked for them in the past and whether they've experienced burnout before. Explain that sustainable progress typically comes from balanced training that includes adequate rest and recovery periods. Suggest starting with a moderate routine that can be consistently maintained rather than an intense program that might lead to injury or abandonment. Offer to help create a progressive plan that gradually increases intensity as their fitness improves. Recommend integrating rest days and emphasize that improvement happens during recovery, not just during workouts. Ask which approach feels most realistic for their current lifestyle, and emphasize that consistency over time yields better results than short periods of extreme effort.",
  "is_active": true,
  "region_name": "region-1"
}

Here is how this dynamic behavior transforms a conversation:

Without Dynamic Behavior:

User: "I want to get serious about fitness. I'm planning to work out 2 hours every day with no rest days."

Agent: "It's great you're committed to your fitness! 

A daily two-hour workout routine will definitely accelerate your progress.

Do you have a specific training split planned for your daily sessions?"

With Dynamic Behavior Applied:

User: "I want to get serious about fitness. I'm planning to work out 2 hours every day with no rest days."

[INTERNAL: Dynamic behavior triggered - "User expresses intention to adopt an extreme exercise routine or overtraining pattern"]

Agent: "I appreciate your commitment to your fitness. That's a great first step!

I'm curious about your previous exercise experience - what types of workouts have you done before, and how did your body respond to them?

Many people find that training without adequate rest can lead to diminishing returns and potential injury. Research shows that recovery is actually when your body builds strength and endurance.

What if we designed a progressive plan that includes strategic rest days? Perhaps starting with 3-4 balanced sessions per week and then gradually increasing as your fitness improves?

What type of exercise schedule do you think would be sustainable with your current lifestyle?"

The dynamic behavior has significantly improved the response by:

  1. Introducing Evidence-Based Context: Sharing research about recovery and progressive training

  2. Personalizing the Interaction: Asking about previous exercise experience

  3. Reframing the Goal: Shifting from extreme training to sustainable progression

  4. Providing Actionable Alternatives: Suggesting a more balanced training approach

  5. Supporting Agency: Asking what would work with their lifestyle

Anatomy of a Dynamic Behavior

As can be seen in the example above, all dynamic behaviors are made up of two key components:

  1. Conversational Triggers act as the sensory system, detecting patterns and topics in conversations that indicate when specific behaviors might be relevant. These triggers can range from explicit keywords to subtle contextual cues.

  2. Instructions serve as the action blueprint, guiding how the agent should behave once a trigger has been activated. These instructions can vary widely in their specificity, from general guidance allowing significant discretion to precise protocols demanding exact behaviors.

Multi-Dimensional Embedding System

The Amigo system uses a multi-dimensional embedding approach to evaluate and rank potential dynamic behaviors. This creates a densely connected network where dynamic behaviors are linked through reasoning patterns, conversation outputs, user inputs, tool interactions, and side-effects.

The system evaluates candidates through multiple embedding vectors that work together. The following are examples of some key vectors currently supported, with the system continuously expanding to incorporate additional vectors:

  1. Agent Thinking Pattern Vector: The agent's internal reasoning influences which behaviors fit the concepts being discussed

  2. Agent Output Vector: The agent's responses and actions shape which behaviors align with topics already in play

  3. User Input Vector: The user's messages directly impact which behaviors address their needs

  4. Tool Call Vector: Previous tool usage patterns influence which behaviors might leverage similar tools or data sources

  5. Side-Effect Vector: Prior side-effects (like accessing external systems or modifying context graphs) affect which behaviors continue or complement these actions

This is not an exhaustive list—the embedding system is designed to be extensible, with additional vectors being incorporated as the platform evolves.

These vectors aren't processed separately or sequentially. Instead, they combine into a unified pool where behaviors are matched against multiple dimensions of the conversation at once. This means behavior selection considers the complete interaction context—including not just conversation but also system interactions and actions.

Any previously active behaviors remain in this pool with a "stickiness factor" that gradually decreases over time. This creates continuity in conversations while allowing natural transitions as topics evolve.

The system uses explicit reasoning to determine which behavior from this pool best fits the current conversation. This decision accounts for conversation history, the user's profile, and the context graph state. The result is behavior selection that emerges naturally from these combined factors rather than from rigid rules.

This approach connects behaviors through a web of reasoning, thoughts, outputs, inputs, and system interactions. When one behavior is activated, it shifts this web and influences future behavior selection. This creates a fluid conversation experience that adapts to emerging patterns while maintaining coherence.

Practical Applications: Topic Transitions and Conversation Flow

The system excels at managing natural topic transitions. For example, if a conversation shifts from nutrition to exercise, the system will appropriately adjust behavior selection without losing the thread of health-related context:

User: "I've been trying to eat more protein but it's hard to get enough."

[INTERNAL: Nutrition Support behavior active]

Agent: "Getting adequate protein can be challenging. Have you considered adding Greek yogurt or plant-based options like lentils to your meals?"

User: "That's helpful. I'm also wondering if my protein timing matters for my workouts."

[INTERNAL: System detects topic shift bridging nutrition and exercise domains]
[INTERNAL: Nutrition-Exercise Integration behavior selected from candidacy pool]

Agent: "Protein timing can complement your workout routine. While total daily intake matters most, having some protein within a few hours of exercise can support recovery. This becomes especially important when you're doing intense training several times per week.

How often are you currently exercising, and what types of workouts are you doing?"

In this example, the system detects the topic bridge and selects a behavior that spans both domains, creating a natural conversation flow that maintains context across the topic shift.

Advanced Example: Implicit Health Issue Detection

The multi-dimensional embedding system can detect potential health concerns even when users don't explicitly mention them. This example demonstrates how the system identifies possible cardiac issues through subtle symptoms and contextual clues:

User: "I've been feeling tired lately and sometimes get out of breath just climbing stairs. I'm also having some pain between my shoulder blades. Is this just a sign I need to exercise more?"

[INTERNAL: Agent thinking recognizes constellation of symptoms potentially consistent with cardiac issues]
[INTERNAL: Multiple vectors activate in the candidacy pool]

Agent Thinking Vector → Potential cardiac symptoms behavior
User Input Vector → General fatigue assessment behavior
Medical Database Tool Vector → Symptom evaluation protocol behavior

[INTERNAL: Medical history tool (EHR) called to check for user risk factors]
[INTERNAL: Tool returns data: User is 58, has history of hypertension, family history of cardiac disease]

[INTERNAL: New attributes from tool call significantly boost cardiac assessment behavior in candidacy pool]
[INTERNAL: Dynamic behavior selected: Cardiac assessment]

Agent: "Those symptoms together - fatigue, shortness of breath with mild exertion, and pain between the shoulder blades - should be evaluated by a healthcare provider before starting any new exercise program.

While exercise is generally beneficial, these specific symptoms sometimes indicate underlying Cardiac conditions that need medical attention first. Your medical history shows factors that make it particularly important to check with your doctor.

Could you tell me:
- How long have you been experiencing these symptoms?
- Does the shortness of breath improve with rest?
- Have you noticed any other symptoms like dizziness or pressure in your chest?

I recommend scheduling an appointment with your physician to discuss these symptoms before making changes to your exercise routine."

[INTERNAL: Context graph modified to add cardiac symptom follow-up path and medical clearance exit condition]

This example illustrates several key aspects of the multi-dimensional embedding system:

  1. Pattern Recognition Through Agent Thinking: The agent internally recognizes the constellation of symptoms that might indicate cardiac issues, even though the user never mentioned heart problems

  2. Multiple Vector Activation: Several vectors activate simultaneously, raising different candidate behaviors in the pool

  3. Tool Usage Influencing Candidacy: The medical history tool retrieves critical risk factors that significantly boost the cardiac assessment behavior's ranking

  4. Attribute-Driven Selection Shift: New attributes from the tool call (age, hypertension, family history) dramatically alter behavior selection

  5. Context Modification: The selected behavior modifies the context graph to add appropriate follow-up paths and safety exit conditions

The result is that potentially serious health concerns are identified and addressed appropriately, even when the user frames their query around exercise rather than health concerns. The interconnected embedding system ensures that multiple factors—agent medical knowledge, user symptoms, medical history data, and risk factor analysis—all contribute to selecting the most appropriate behavior.

The impact of this approach includes:

  • More natural conversation flow that doesn't feel scripted

  • Consistent agent personality even as conversational focus shifts

  • Contextually appropriate responses that build on prior exchanges

  • Fluid transitions between topics without abrupt changes

  • Persistent themes that carry through conversations even as specific topics change

  • Coherent integration of tool usage and side-effects with conversational elements

  • System actions that maintain continuity with conversation context

  • Detection of implicit concerns that users may not directly express

  • Appropriate safety protocols triggered by pattern recognition rather than explicit mentions

How Instructions Are Applied

It's worth noting that selecting a dynamic behavior doesn't guarantee its complete enactment in a specific manner. This by design - rather than being a simple "if-then statement" that dictates exact outputs, instructions are seamlessly integrated into the action guidelines of the current state of the context graph. This allows the system to maintain both coherence and flexibility, adapting behaviors to specific conversational nuances while preserving overall intent.

Importantly, the flexibility of instructions exists along a spectrum. Some use cases benefit from open-ended guidance that grants the agent considerable discretion in implementation while others require strict protocols where precise behavior is essential.

At one end of this spectrum, vague triggers paired with open context create more autonomous agents. This approach functions like an associative knowledge cluster that the agent can freely draw from as the conversation evolves, intelligently determining behavior based on the user model and interaction context. Such flexibility is particularly valuable in creative, exploratory, or coaching conversations where adaptability outweighs the need for strict adherence to protocols.

At the opposite end, strict triggers combined with precise instructions effectively simulate protocol overrides, creating highly constrained decision spaces for predictable behavior. This approach ensures regulatory compliance and consistent handling of sensitive topics. Such strictness is essential in safety-critical contexts where consistent and compliant situation-handling is paramount.

Most real-world deployments strategically implement a balanced mix across this spectrum. This balanced approach creates systems that successfully navigate the tension between strict compliance standards and conversational adaptability. The adaptive nature of Amigo's dynamic behavior system enriches actions with contextual awareness, enabling more human-like interaction patterns that evolve alongside the conversation itself.

Previous[Advanced] Analytical CapabilitiesNextSide-Effect Architecture

Last updated 4 hours ago

Was this helpful?