Skip to main content

GET /consciousness/thoughts

Get recent conscious thoughts.

Request

curl "https://your-project.convex.cloud/consciousness/thoughts?limit=10"

Query Parameters

ParameterTypeDefaultDescription
limitnumber20Max thoughts to return
offsetnumber0Thoughts to skip
tonestring-Filter by tone
sincenumber-Only after timestamp
minConfidencenumber-Minimum confidence

Response

{
  "thoughts": [
    {
      "_id": "thought_abc123",
      "content": "The convergence of AI and crypto markets suggests a fundamental shift in how autonomous systems will interact with financial infrastructure.",
      "seeds": [
        "AI companies investing in blockchain",
        "Crypto projects integrating AI agents",
        "Market data showing correlation"
      ],
      "tone": "curious",
      "confidence": 0.82,
      "isBrilliant": false,
      "timestamp": 1706400000000
    }
  ],
  "total": 234,
  "hasMore": true
}

Thought Fields

FieldTypeDescription
_idstringThought ID
contentstringThe synthesized thought
seedsarrayInput sources that contributed
tonestringEmotional tone (curious, excited, concerned, neutral, reflective)
confidencenumberConfidence score (0-1)
isBrilliantbooleanWhether this is a moment of brilliance
timestampnumberCreation timestamp

GET /consciousness/brilliant

Get only moments of brilliance.

Request

curl "https://your-project.convex.cloud/consciousness/brilliant?limit=5"

Query Parameters

ParameterTypeDefaultDescription
limitnumber10Max thoughts to return
sincenumber-Only after timestamp

Response

{
  "thoughts": [
    {
      "_id": "thought_xyz789",
      "content": "Observing a convergence pattern: developer sentiment, corporate investment, and infrastructure growth all pointing toward AI agents as the next major platform shift. This could define the next decade of software.",
      "seeds": [
        "Tech company AI framework announcement",
        "Developer survey showing 40% interested in agents",
        "VC funding data for AI infrastructure"
      ],
      "tone": "excited",
      "confidence": 0.91,
      "isBrilliant": true,
      "brillianceFactors": {
        "seedCount": 3,
        "avgSeedImportance": 0.85,
        "commonEntities": ["AI", "agents", "infrastructure"],
        "novelty": 0.88
      },
      "timestamp": 1706400000000
    }
  ],
  "total": 23
}

Brilliance Factors

FieldTypeDescription
seedCountnumberNumber of contributing seeds
avgSeedImportancenumberAverage importance of seeds
commonEntitiesarrayShared entities across seeds
noveltynumberHow novel/unique this insight is

GET /consciousness/stats

Get consciousness system statistics.

Request

curl https://your-project.convex.cloud/consciousness/stats

Response

{
  "totalThoughts": 234,
  "brilliantCount": 23,
  "brillianceRate": 0.098,
  "toneDistribution": {
    "curious": 0.35,
    "neutral": 0.28,
    "excited": 0.18,
    "reflective": 0.12,
    "concerned": 0.07
  },
  "avgConfidence": 0.76,
  "avgSeedsPerThought": 2.8,
  "lastThought": 1706400000000,
  "thoughtsLast24h": 45,
  "brilliantLast24h": 4
}

POST /consciousness/process

Generate a conscious thought from inputs.

Request

curl -X POST https://your-project.convex.cloud/consciousness/process \
  -H "Authorization: Bearer YOUR_TICK_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "seeds": [
      {
        "content": "Major tech company announces AI agent framework",
        "importance": 0.85,
        "entities": ["AI", "agents", "tech"]
      },
      {
        "content": "Developer survey shows growing interest in autonomous systems",
        "importance": 0.78,
        "entities": ["developers", "AI", "autonomous"]
      }
    ],
    "forceProcess": false
  }'

Request Body

FieldTypeRequiredDescription
seedsarrayYesInput seeds for synthesis
forceProcessbooleanNoProcess even if below thresholds
minImportancenumberNoOverride minimum importance filter

Seed Object

FieldTypeRequiredDescription
contentstringYesSeed content
importancenumberYesImportance score (0-1)
entitiesarrayNoExtracted entities
sourcestringNoWhere this came from

Response

{
  "success": true,
  "thought": {
    "_id": "thought_new123",
    "content": "The alignment of tech company investments and developer interest suggests AI agents are transitioning from experimental to mainstream...",
    "seeds": ["...", "..."],
    "tone": "excited",
    "confidence": 0.84,
    "isBrilliant": true
  },
  "filtered": 0,
  "processTime": 125
}

Response (No Thought Generated)

{
  "success": true,
  "thought": null,
  "reason": "Seeds below importance threshold",
  "filtered": 2,
  "processTime": 15
}

POST /consciousness/reflect

Trigger consciousness self-reflection.

Request

curl -X POST https://your-project.convex.cloud/consciousness/reflect \
  -H "Authorization: Bearer YOUR_TICK_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "lookback": "24h",
    "focus": "pattern recognition"
  }'

Request Body

FieldTypeRequiredDescription
lookbackstringNoTime window (1h, 24h, 7d)
focusstringNoTopic to focus reflection on

Response

{
  "success": true,
  "reflection": {
    "_id": "thought_ref456",
    "content": "Reviewing my recent thought patterns, I notice I've been particularly drawn to convergence signals across markets and technology. This may reflect a deeper interest in systems-level changes rather than individual events.",
    "tone": "reflective",
    "confidence": 0.79,
    "isBrilliant": false,
    "basedOn": {
      "thoughtsAnalyzed": 45,
      "timespan": "24h",
      "dominantThemes": ["AI", "markets", "convergence"]
    }
  }
}

WebSocket: Subscribe to Thoughts

Real-time thought notifications:
import { useQuery } from "convex/react";
import { api } from "./convex/_generated/api";

function ThoughtStream() {
  const thoughts = useQuery(api.consciousness.recentThoughts, {
    limit: 10
  });

  return (
    <div>
      {thoughts?.map(t => (
        <div key={t._id}>
          <p>{t.content}</p>
          <span>{t.isBrilliant ? "Brilliant!" : t.tone}</span>
        </div>
      ))}
    </div>
  );
}

Subscribing to Brilliant Moments Only

const brilliantThoughts = useQuery(api.consciousness.brilliantMoments, {
  limit: 5
});

// Will auto-update when new brilliant thoughts occur