{"slug":"internal/agents/twin","title":"Twin Agent","section":"internal","sectionLabel":"Internal","status":"unclassified","type":"document","path":"internal/agents/twin.mdx","bytes":23202,"description":null,"updated":null,"source":"integratewise/Integratewise-docs-wiki","content":"\n## Your Digital Representative in IntegrateWise\n\nThe **Twin Agent** is your permanent digital identity within IntegrateWise. It maintains your context, preferences, knowledge, and work patterns across all interactions, ensuring a consistent and personalized experience.\n\n> **Core Value:** One Twin per user = One consistent identity, context, and experience across all of IntegrateWise.\n\n## Overview\n\n### What is Twin?\n\nTwin is not just another chatbot or AI assistant. It's your **digital representative** that:\n\n- **Remembers** - Your preferences, work history, and context\n- **Coordinates** - Other agents to complete your work\n- **Learns** - From every interaction to improve over time\n- **Represents** - You consistently across all platforms and systems\n- **Protects** - Your data and maintains proper governance\n\n### Twin vs Traditional Assistants\n\n| Feature | Twin | Traditional Assistants |\n|---------|------|------------------------|\n| **Identity** | Permanent, consistent | Session-based, inconsistent |\n| **Context** | Deep, persistent | Shallow, transient |\n| **Coordination** | Multi-agent orchestration | Single-agent or manual |\n| **Memory** | Long-term, organized | Short-term, limited |\n| **Personalization** | Continuous learning | Static or minimal |\n| **Integration** | Full platform access | Limited or none |\n\n## Architecture\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│                      TWIN ARCHITECTURE                         │\n├─────────────────────────────────────────────────────────────┤\n│                                                                  │\n│  ┌─────────────────────────────────────────────────────────┐ │\n│  │                    IDENTITY LAYER                         │ │\n│  │  ┌─────────────┐  ┌─────────────┐  ┌─────────────┐    │ │\n│  │  │  User      │  │  Preferences│  │  Auth       │    │ │\n│  │  │  Profile   │  │  & Settings │  │  & Permissions│  │ │\n│  │  └─────────────┘  └─────────────┘  └─────────────┘    │ │\n│  └─────────────────────────────────────────────────────────┘ │\n│                                                                  │\n│  ┌─────────────────────────────────────────────────────────┐ │\n│  │                    MEMORY LAYER                           │ │\n│  │  ┌─────────────┐  ┌─────────────┐  ┌─────────────┐    │ │\n│  │  │  Context    │  │  History    │  │  Patterns   │    │ │\n│  │  │  Assembly   │  │  & Work     │  │  & Learning │    │ │\n│  │  └─────────────┘  └─────────────┘  └─────────────┘    │ │\n│  └─────────────────────────────────────────────────────────┘ │\n│                                                                  │\n│  ┌─────────────────────────────────────────────────────────┐ │\n│  │                    ORCHESTRATION LAYER                    │ │\n│  │  ┌─────────────┐  ┌─────────────┐  ┌─────────────┐    │ │\n│  │  │  Request   │  │  Agent      │  │  Workflow   │    │ │\n│  │  │  Parser    │  │  Coordinator│  │  Manager    │    │ │\n│  │  └─────────────┘  └─────────────┘  └─────────────┘    │ │\n│  └─────────────────────────────────────────────────────────┘ │\n│                                                                  │\n│  ┌─────────────────────────────────────────────────────────┐ │\n│  │                    INTEGRATION LAYER                       │ │\n│  │  ┌─────────────┐  ┌─────────────┐  ┌─────────────┐    │ │\n│  │  │  Core      │  │  Domain     │  │  External    │    │ │\n│  │  │  Agents    │  │  Agents    │  │  Systems    │    │ │\n│  │  └─────────────┘  └─────────────┘  └─────────────┘    │ │\n│  └─────────────────────────────────────────────────────────┘ │\n│                                                                  │\n└─────────────────────────────────────────────────────────────┘\n```\n\n## Core Capabilities\n\n### 1. Context Management\n\n**Remember everything important about your work.**\n\n#### Context Assembly\n\nTwin automatically gathers and assembles context from:\n- **Previous Interactions** - What you've asked about before\n- **Connected Systems** - CRM, email, calendar, documents\n- **Work History** - Tasks, projects, communications\n- **Team Context** - Collaborators, shared work, team knowledge\n- **Organizational Context** - Company knowledge, processes, standards\n\n#### Context Types\n\n| Type | Description | Retention |\n|------|-------------|-----------|\n| **Session Context** | Current conversation | Session duration |\n| **Work Context** | Current tasks and projects | Until completion |\n| **Domain Context** | Domain-specific knowledge | Persistent |\n| **Personal Context** | Your preferences and patterns | Permanent |\n| **Team Context** | Shared team knowledge | Persistent |\n\n### 2. Agent Orchestration\n\n**Coordinate the right agents for every task.**\n\n#### Orchestration Workflow\n\n```\n1. REQUEST RECEIVED\n   You: \"Analyze Q2 sales performance\"\n\n2. INTENT UNDERSTANDING\n   Twin: Understands you want sales analysis with Q2 timeframe\n\n3. CAPABILITY IDENTIFICATION\n   Twin + Discovery: Finds agents with sales analysis capabilities\n   Result: Sales Analyst Agent, Data Analysis Agent\n\n4. CONTEXT ASSEMBLY\n   Twin: Gathers Q2 sales data, previous analysis, relevant metrics\n\n5. AGENT COORDINATION\n   Twin: Delegates to Sales Analyst Agent with full context\n\n6. EXECUTION MONITORING\n   Twin: Tracks progress, handles exceptions, provides updates\n\n7. RESULT SYNTHESIS\n   Twin: Aggregates results, formats for you, stores in Spine Fabric\n\n8. DELIVERY\n   Twin: Presents comprehensive Q2 sales analysis\n```\n\n#### Orchestration Patterns\n\n1. **Simple Delegation**\n   ```\n   You → Twin → Single Agent → Result\n   ```\n\n2. **Multi-Agent Collaboration**\n   ```\n   You → Twin → Agent A + Agent B + Agent C → Aggregated Result\n   ```\n\n3. **Sequential Pipeline**\n   ```\n   You → Twin → Agent A → Agent B → Agent C → Final Result\n   ```\n\n4. **Parallel Execution**\n   ```\n   You → Twin → [Agent A] [Agent B] [Agent C] → Combined Result\n   ```\n\n### 3. Work Coordination\n\n**Manage your work across all systems and platforms.**\n\n#### Work Types\n\n| Work Type | Description | Example |\n|-----------|-------------|---------|\n| **Tasks** | Individual action items | \"Follow up with customer\" |\n| **Projects** | Multi-step initiatives | \"Launch new feature\" |\n| **Meetings** | Scheduled collaborations | \"Team sync on Monday\" |\n| **Communications** | Messages and conversations | \"Email to client\" |\n| **Workflows** | Automated processes | \"Lead qualification\" |\n\n#### Work Management\n\nTwin helps you:\n- **Create** work items from conversations\n- **Track** progress across all platforms\n- **Prioritize** based on importance and urgency\n- **Coordinate** with team members\n- **Automate** repetitive workflows\n\n### 4. Learning & Personalization\n\n**Continuously improve based on your interactions.**\n\n#### Learning Mechanisms\n\n1. **Explicit Feedback**\n   - You rate responses (thumbs up/down)\n   - You provide corrections\n   - You set preferences\n\n2. **Implicit Learning**\n   - Pattern recognition from your behavior\n   - Context usage analysis\n   - Work pattern detection\n\n3. **Adaptation**\n   - Adjusts tone and style to match yours\n   - Anticipates your needs based on patterns\n   - Improves recommendations over time\n\n#### Personalization Features\n\n| Feature | Description | Example |\n|---------|-------------|---------|\n| **Style Matching** | Matches your communication style | Uses your preferred tone |\n| **Preference Storage** | Remembers your settings | Default work hours, notification preferences |\n| **Pattern Recognition** | Identifies your work patterns | Knows you always review documents before meetings |\n| **Context Awareness** | Understands your current focus | Prioritizes work based on what you're doing |\n| **Proactive Suggestions** | Anticipates your needs | Suggests follow-ups, reminds you of deadlines |\n\n## User Experience\n\n### Single Interface\n\n**Talk to Twin, not to individual agents.**\n\n```\nYou: \"Schedule a meeting with the sales team about the Q2 review\"\n\nTwin:\n1. Understands you want to schedule a meeting\n2. Identifies it's about Q2 review with sales team\n3. Checks your calendar and team availability\n4. Finds the Q2 review document\n5. Creates calendar invite with relevant context\n6. Notifies participants with meeting details\n\nAll through a single conversation with Twin.\n```\n\n### Consistent Context\n\n**Never repeat yourself.**\n\n```\nDay 1: You ask about Customer A\nTwin: Gathers and stores Customer A context\n\nDay 2: You ask about Customer A's order\nTwin: Already has Customer A context, adds order information\n\nDay 3: You ask to follow up with Customer A\nTwin: Has complete context, suggests personalized follow-up message\n\nResult: Each interaction builds on the previous ones.\n```\n\n### Multi-Platform Identity\n\n**One Twin across all your platforms.**\n\n```\nWeb → Twin (same identity, context, preferences)\n   ↓\nSlack → Twin (same identity, context, preferences)\n   ↓\niMessage → Twin (same identity, context, preferences)\n   ↓\nEmail → Twin (same identity, context, preferences)\n```\n\nTwin maintains:\n- Consistent identity across all platforms\n- Unified context and memory\n- Synchronized preferences and settings\n- Coordinated work across all systems\n\n## Integration with Other Agents\n\n### Twin + Core Agents\n\n| Agent | Relationship | Example |\n|-------|-------------|---------|\n| **Schema Agent** | Data validation | Twin ensures data conforms to schemas before processing |\n| **Coworker Agent** | Collaboration | Twin + Coworker work together on complex tasks |\n| **Discovery Agent** | Capability finding | Twin uses Discovery to find the right agents |\n| **Triage Agent** | Work routing | Twin + Triage determine optimal work distribution |\n\n### Twin + Domain Agents\n\nTwin orchestrates Domain Agents based on your work context:\n\n| Domain | Twin's Role | Example |\n|--------|-------------|---------|\n| **Sales** | Opportunity management | Twin coordinates Lead Agent, CRM tools, Email Agent |\n| **Marketing** | Campaign coordination | Twin orchestrates Campaign Agent, Analytics tools |\n| **Customer Success** | Account management | Twin coordinates Support Agent, Health monitoring |\n| **Personal** | Productivity | Twin orchestrates Personal Assistant, Calendar Agent, Email Agent |\n\n### Twin + Tools\n\nTwin accesses tools through the MCP Pool:\n\n```\nYou: \"Update the customer record with this new information\"\n\nTwin:\n1. Understands intent (update CRM)\n2. Finds CRM tool in MCP Pool\n3. Validates data with Schema Agent\n4. Executes update with proper permissions\n5. Logs action in audit trail\n6. Confirms completion to you\n```\n\n## Configuration\n\n### Twin Settings\n\n```yaml\n# twin-config.yaml\ntwin:\n  # Identity\n  name: \"Your Name\"\n  avatar: \"your-avatar.png\"\n  personality: \"professional\"  # professional, friendly, technical, creative\n  \n  # Memory\n  context_retention: 365       # Days of context to retain\n  work_history: 1000          # Number of work items to remember\n  learning_rate: 0.8          # How quickly Twin learns (0-1)\n  \n  # Preferences\n  work_hours:\n    start: \"09:00\"\n    end: \"17:00\"\n    timezone: \"America/New_York\"\n    days: [monday, tuesday, wednesday, thursday, friday]\n  \n  notifications:\n    enabled: true\n    quiet_hours:\n      start: \"22:00\"\n      end: \"07:00\"\n    preferred_channels: [slack, email]\n  \n  # Style\n  communication_style: \"concise\"  # concise, detailed, technical\n  tone: \"friendly\"               # friendly, professional, formal\n  language: \"en-US\"\n  \n  # Privacy\n  remember_personal: true       # Remember personal information\n  remember_work: true           # Remember work context\n  remember_preferences: true   # Remember settings and preferences\n  \n  # Integration\n  platforms:\n    web: true\n    slack: true\n    email: true\n    imessage: false\n```\n\n### Permission Settings\n\n```yaml\n# twin-permissions.yaml\ntwin:\n  permissions:\n    # What Twin can do\n    can_execute_agents: true\n    can_access_tools: true\n    can_read_data: true\n    can_write_data: true\n    can_delete_data: false  # Requires explicit approval\n    \n  # What Twin can access\n  data_access:\n    personal: [read, write]\n    work: [read, write]\n    team: [read, write]\n    organization: [read]\n    \n  # Approval requirements\n  approvals:\n    required_for:\n      - data_deletion\n      - external_communications\n      - sensitive_operations\n    \n  # Rate limits\n  rate_limits:\n    requests_per_minute: 60\n    concurrent_tasks: 10\n    complex_operations: 3\n```\n\n## Use Cases\n\n### 1. Personal Productivity\n\n**Scenario:** Manage your daily work across multiple systems\n\n**Twin's Role:**\n- Aggregate tasks from email, Slack, project management\n- Prioritize based on urgency and importance\n- Create intelligent schedule\n- Handle routine communications\n- Track progress and remind you of deadlines\n\n**Benefits:**\n- Reduced cognitive load\n- Better time management\n- Fewer missed deadlines\n- Consistent work quality\n\n### 2. Sales Management\n\n**Scenario:** Manage customer relationships and sales opportunities\n\n**Twin's Role:**\n- Track customer interactions across all channels\n- Maintain complete customer 360 view\n- Suggest next best actions\n- Automate follow-ups and reminders\n- Coordinate with CRM and other sales tools\n\n**Benefits:**\n- Improved customer relationships\n- Higher win rates\n- Better forecasting\n- Consistent customer experience\n\n### 3. Team Coordination\n\n**Scenario:** Work effectively with your team\n\n**Twin's Role:**\n- Maintain shared team context\n- Coordinate task assignments\n- Facilitate communication\n- Track team progress\n- Resolve conflicts and dependencies\n\n**Benefits:**\n- Better team alignment\n- Improved collaboration\n- Reduced miscommunication\n- Faster project completion\n\n### 4. Knowledge Work\n\n**Scenario:** Research, analyze, and create content\n\n**Twin's Role:**\n- Assemble relevant information and context\n- Coordinate research across multiple sources\n- Synthesize insights and recommendations\n- Generate drafts and outlines\n- Manage knowledge repositories\n\n**Benefits:**\n- Faster research and analysis\n- Better quality outputs\n- Consistent style and formatting\n- Reduced duplication of effort\n\n## Best Practices\n\n### For Individuals\n\n1. **Start with the Basics**\n   - Begin with simple requests and tasks\n   - Gradually increase complexity as you build confidence\n   - Provide feedback to help Twin learn\n\n2. **Be Specific**\n   - Clear, specific requests yield better results\n   - Include relevant context when possible\n   - Set expectations for format and detail level\n\n3. **Review and Correct**\n   - Review Twin's work for accuracy\n   - Provide corrections when needed\n   - Confirm important actions\n\n4. **Set Preferences**\n   - Configure your preferred work style\n   - Set notification preferences\n   - Define your availability and boundaries\n\n### For Teams\n\n1. **Establish Team Context**\n   - Define shared team knowledge and processes\n   - Set team-level preferences and standards\n   - Create shared workspaces and repositories\n\n2. **Define Workflows**\n   - Document common team workflows\n   - Set up automated processes where possible\n   - Define escalation paths and approvals\n\n3. **Coordinate Across Twins**\n   - Enable team-level context sharing\n   - Set up cross-Twin collaboration\n   - Define team-wide permissions and access\n\n4. **Monitor Performance**\n   - Track team metrics and productivity\n   - Identify bottlenecks and opportunities\n   - Continuously improve team processes\n\n### For Administrators\n\n1. **Configure Properly**\n   - Set up Twin with appropriate permissions\n   - Configure data access and security\n   - Define approval workflows\n\n2. **Monitor Usage**\n   - Track Twin performance and adoption\n   - Monitor resource usage\n   - Identify and resolve issues\n\n3. **Train Users**\n   - Educate users on effective Twin usage\n   - Provide examples and best practices\n   - Encourage feedback and improvement\n\n4. **Iterate**\n   - Regularly review and update configurations\n   - Incorporate user feedback\n   - Continuously improve the system\n\n## Monitoring & Analytics\n\n### Twin Metrics\n\n| Metric | Description | Target |\n|--------|-------------|--------|\n| **Requests Processed** | Total user requests handled | Maximize |\n| **Context Assembled** | Context packages created | >90% of requests |\n| **Agents Coordinated** | Number of agents orchestrated | Depends on complexity |\n| **Tasks Completed** | Work items completed through Twin | >80% success rate |\n| **Response Time** | Average time to respond | <5 seconds |\n| **User Satisfaction** | User feedback scores | >4.5/5 |\n| **Learning Applied** | % of interactions using learned patterns | Grow over time |\n\n### Twin Dashboard\n\nThe Twin Dashboard provides:\n- Real-time activity view\n- Request history and patterns\n- Performance metrics\n- User feedback and ratings\n- Learning and improvement tracking\n\n### Alerts\n\nConfigure alerts for:\n- High error rates\n- Slow response times\n- Permission violations\n- Resource limitations\n- Unusual activity patterns\n\n## Security & Governance\n\n### Data Protection\n\nTwin ensures:\n- **Encryption** - All sensitive data encrypted\n- **Access Control** - Proper permissions enforced\n- **Audit Trails** - All actions logged and traceable\n- **Privacy** - Personal data protected and controlled\n\n### Permission Model\n\nTwin operates within a hierarchical permission model:\n\n```\nTenant Level → Organization Level → Team Level → User Level → Twin Level\n     ↓             ↓              ↓          ↓           ↓\n  Broadest       Broad          Medium     Specific   Specific\n  Controls        Controls       Controls   Controls   Controls\n```\n\n### Compliance\n\nTwin supports compliance with:\n- **GDPR** - Data privacy and protection\n- **HIPAA** - Healthcare data security\n- **SOC 2** - Security and availability\n- **Industry-specific** - Custom compliance requirements\n\n## Troubleshooting\n\n### Common Issues\n\n| Issue | Cause | Solution |\n|-------|-------|----------|\n| Twin not responding | High load or connectivity issue | Check system status, retry |\n| Incorrect responses | Insufficient context or learning | Provide more context, give feedback |\n| Slow performance | Complex requests or many agents | Simplify request, reduce agent count |\n| Permission errors | Insufficient permissions | Review and update permissions |\n| Memory issues | Too much context stored | Reduce retention settings, archive old data |\n\n### Debug Mode\n\nEnable debug mode for troubleshooting:\n\n```bash\n# Enable debug logging\nintegratewise twin debug --level verbose\n\n# View recent interactions\nintegratewise twin interactions --limit 50\n\n# Check Twin health\nintegratewise twin health\n\n# Test specific capabilities\nintegratewise twin test --capability context_assembly\n```\n\n## Roadmap\n\n### Short-term (0-3 months)\n- Enhanced personalization algorithms\n- Improved context assembly\n- Better multi-platform synchronization\n- Advanced learning capabilities\n\n### Medium-term (3-6 months)\n- Predictive assistance\n- Proactive task management\n- Enhanced team coordination\n- Advanced analytics and insights\n\n### Long-term (6-12 months)\n- Autonomous work management\n- Self-optimizing personalization\n- Cross-platform intelligence\n- Advanced collaboration features\n\n## Support\n\n### Documentation\n- [Spine Agent Network](./spine-agent-network) - Overview of all agents\n- [Core Agents](./core-agents) - Foundation agents\n- [Domain Agents](./domain-agents) - Specialized agents\n- [Network Effect](./network-effect) - How the network creates value\n\n### Community\n- [IntegrateWise Community](https://community.integratewise.com)\n- [Twin User Forum](https://forum.integratewise.com/c/twin)\n- [Developer Slack](https://slack.integratewise.com)\n\n### Professional Services\n- [Enterprise Twin Support](https://enterprise.integratewise.com/twin)\n- [Custom Twin Development](https://services.integratewise.com/twin)\n- [Implementation Consulting](https://services.integratewise.com/implementation)\n\n---\n\n## Quick Reference\n\n### Twin in One Sentence\n```\nTwin is your digital representative that remembers, coordinates, learns, and helps you get work done across all of IntegrateWise.\n```\n\n### Key Commands\n```\n# Ask Twin a question\n\"What's my schedule today?\"\n\n# Ask Twin to do something\n\"Schedule a meeting with the team\"\n\n# Ask Twin to analyze something\n\"What are the trends in our Q2 sales?\"\n\n# Ask Twin to create something\n\"Draft an email to the customer\"\n\n# Ask Twin to coordinate\n\"Work with marketing on the campaign\"\n```\n\n### Twin Capabilities\n- ✅ Understands natural language\n- ✅ Maintains context across interactions\n- ✅ Coordinates other agents\n- ✅ Accesses connected tools\n- ✅ Learns from feedback\n- ✅ Works across all platforms\n- ✅ Respects permissions and security\n\n### Next Steps\n1. [Explore Core Agents](./core-agents)\n2. [Learn about Domain Agents](./domain-agents)\n3. [Understand Network Effect](./network-effect)\n4. [Try Twin in action](https://app.integratewise.ai)\n"}