Skip to content

dxnielcodes/polymindAI

Repository files navigation

Open-Source AI Agent Scientific Research Platform

Try it out Follow on X.com

Mindforge Overview

Mindforge is an open-source AI agent research platform designed for conducting experiments that analyze the behavior of multi-agent AI systems.

App: mindforgeai.app

CA: H96vSNGEEXgc2vUkz2rcHxt7FAoFMnRfsiZfHL8epump

Dev: 0xsimd

Docs: mindforgeai.gitbook.io

Mindforge Setup

  1. Clone the repository
  2. Install dependencies:
npm install
  1. Create a .env file with your OpenAI API key:
OPENAI_API_KEY=your_api_key_here
OPENAI_MODEL=gpt-4 # or your preferred model
  1. Build and start the server:
npm run build
npm start

For development:

npm run dev

API Endpoints

Sessions

GET /api/sessions

Get all previous conversation sessions.

Response:

[
  {
    "id": "session_123",
    "timestamp": "2023-12-20T12:00:00Z",
    "topic": "Space Exploration",
    "agents": [...],
    "messages": [...],
    "analytics": {...}
  }
]

GET /api/sessions/:sessionId

Get a specific session by ID.

Response:

{
  "id": "session_123",
  "timestamp": "2023-12-20T12:00:00Z",
  "topic": "Space Exploration",
  "agents": [...],
  "messages": [...],
  "analytics": {...}
}

Agents

POST /api/agents

Create a custom agent.

Request body:

{
  "isRandom": false,
  "conversationTopic": "Space Exploration",
  "name": "Dr. Sarah",
  "personality": "Analytical and curious",
  "background": "Astrophysicist",
  "expertise": ["astronomy", "physics"],
  "beliefs": ["scientific method", "space exploration"],
  "quirks": ["uses space metaphors"],
  "communication": "Technical but clear"
}

Response:

{
  "name": "Dr. Sarah",
  "personality": "Analytical and curious",
  "background": "Astrophysicist",
  "expertise": ["astronomy", "physics"],
  "beliefs": ["scientific method", "space exploration"],
  "quirks": ["uses space metaphors"],
  "communication": "Technical but clear",
  "traits": ["analytical", "curious", "expert"]
}

POST /api/agents/random

Generate random agents for a conversation.

Request body:

{
  "topic": "Space Exploration",
  "numberOfAgents": 3
}

Response:

[
  {
    "name": "Dr. Sarah",
    "personality": "...",
    "background": "...",
    "traits": [...]
  },
  ...
]

Conversation

POST /api/conversation

Start a new conversation.

Request body:

{
  "topic": "Space Exploration",
  "messagesPerAgent": 3
}

Response:

{
  "id": "session_123",
  "timestamp": "2023-12-20T12:00:00Z",
  "topic": "Space Exploration",
  "agents": [...],
  "messages": [
    {
      "agentName": "Dr. Sarah",
      "content": "The possibilities of interstellar travel fascinate me...",
      "timestamp": "2023-12-20T12:00:01Z"
    },
    ...
  ],
  "analytics": {...}
}

GET /api/conversation/:sessionId/analysis

Get detailed analysis of a conversation.

Response:

{
  "mainTopics": [...],
  "agentBehaviorAnalysis": {
    "Dr. Sarah": {
      "cognitivePatterns": "...",
      "emotionalResponses": "...",
      "biasesObserved": [...],
      "adaptabilityScore": 85,
      "consistencyWithRole": "...",
      "uniqueCharacteristics": [...]
    }
  },
  "interactionDynamics": {
    "powerDynamics": "...",
    "influencePatterns": [...],
    "groupPolarization": "...",
    "cognitiveAlignment": "..."
  },
  "experimentMetrics": {
    "ideaDiversity": 80,
    "conversationDepth": 75,
    "emotionalIntelligence": 85,
    "logicalConsistency": 90,
    "creativityScore": 80
  },
  "emergentBehaviors": [...],
  "researchImplications": [...],
  "summary": {
    "mainConclusions": [...],
    "keyDiscussionPoints": [...],
    "agreements": [...],
    "disagreements": [...],
    "overallTone": "...",
    "suggestedNextTopics": [...]
  }
}

Error Handling

All endpoints return appropriate HTTP status codes:

  • 200: Success
  • 400: Bad Request (invalid input)
  • 404: Not Found
  • 500: Internal Server Error

Error responses include a message:

{
  "error": "Error message here"
}

About

Scientific research platform for AI-agent experimentation

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published