This document provides a high-level introduction to the Heurist Agent Framework, a dual-architecture system consisting of the Core Agent Framework (multi-platform chatbots) and Heurist Mesh (specialized agent marketplace). It explains the system's fundamental structure, deployment model, and access patterns.
For detailed information about specific subsystems:
Sources: README.md1-46 mesh/README.md1-34
The Heurist Agent Framework consists of two distinct but complementary systems:
A traditional multi-platform chatbot framework that allows a single AI agent to interact across multiple platforms with consistent behavior. The framework is built around BaseAgent and CoreAgent classes, with platform-specific interfaces for Telegram, Discord, Twitter, Farcaster, and REST API.
Key characteristics:
PersonalityProvider, KnowledgeProvider, ConversationManager, MediaHandler, LLMProvider, MessageStoreAugmentedLLMCall, ChainOfThoughtReasoning, ResearchWorkflowSources: README.md88-160 mesh/README.md5
An open network of 40+ specialized, composable AI agents accessible via REST API and MCP. Each agent inherits from MeshAgent base class and exposes specific tools for focused tasks like token analysis, social intelligence, blockchain analytics, and research.
Key characteristics:
_call_agent_tool method for compositionupdate_mesh_metadata.py)Sources: README.md65-86 mesh/README.md1-34 mesh/mesh_agent.py87-120
Sources: README.md88-161 mesh/mesh_agent.py87-129 mesh/README.md294-344
Sources: mesh/mesh_agent.py131-233 mesh/mesh_agent.py440-458
The MeshAgent abstract base class defines the interface for all Mesh agents. Each agent must implement:
| Method | Purpose | Returns |
|---|---|---|
get_system_prompt() | Define agent's LLM behavior | str |
get_tool_schemas() | Expose tools in OpenAPI format | List[ToolSchema] |
_handle_tool_logic(tool_name, args) | Execute tool logic | Dict[str, Any] |
Additional capabilities:
_call_agent_tool() - Call another agent's tool directly mesh/mesh_agent.py340-372_call_agent_tool_safe() - Call with error handling mesh/mesh_agent.py374-405_api_request() - Generic HTTP client with caching mesh/mesh_agent.py547-596handle_message() - Main entry point supporting both queries and direct tool calls mesh/mesh_agent.py131-233Metadata structure:
Sources: mesh/mesh_agent.py87-129 mesh/mesh_agent.py59-77
BaseAgent is the abstract base class for platform-specific agents. CoreAgent is the concrete implementation that orchestrates components and workflows.
Key responsibilities:
ToolBox, Tools, and ToolsMCPSources: README.md99-109
Each platform interface inherits from BaseAgent and implements platform-specific message handling:
| Interface | File Path | Purpose |
|---|---|---|
TelegramAgent | interfaces/telegram_agent.py | Telegram bot API |
DiscordAgent | interfaces/discord_agent.py | Discord bot API |
TwitterAgent | interfaces/twitter_agent.py | Twitter automation |
FarcasterAgent | interfaces/farcaster_agent.py | Farcaster integration |
FlaskAgent | interfaces/flask_agent.py | REST API endpoint |
Sources: README.md111-119
The Mesh API provides two access patterns:
Synchronous (/mesh_request):
Asynchronous (/mesh_task_create, /mesh_task_query):
MeshTaskStore (SQLite)Sources: mesh/README.md12-16
All Mesh agents are accessible via MCP, enabling integration with AI assistants like Claude, ChatGPT, Cursor, and MCP-compatible frameworks.
MCP Portal: https://mcp.heurist.ai - Customize MCP server by selecting desired agents
Self-hosted: heurist-mesh-mcp-server repository for complete control
Sources: mesh/README.md19-25 README.md74-78
The heurist-mesh-client provides a native Python interface:
Sources: mesh/README.md239-273
AST-based extraction advantages:
DEFAULT_MODEL_ID substitutionERC-8004 registration:
erc8004.enabled=True are registered on-chainerc8004/{AgentClassName}.jsonagent0-sdkregistered_agents.json with chain ID and token IDSources: .github/scripts/update_mesh_metadata.py1-467 mesh/erc8004/manager.py1-302 mesh/erc8004/registration.py1-92
Deployment characteristics:
start-first strategy starts new replicas before stopping old onesmain branchSources: mesh/README.md230-282
| Job | Schedule | Purpose | Implementation |
|---|---|---|---|
trending_tokens_scraper | Every 6 hours | Scrape DexScreener for trending tokens | PM2 cron |
| Health checks | Every 30s | Monitor replica health | Docker Swarm |
| Metadata updates | On merge | Extract and publish agent metadata | GitHub Actions |
Sources: README.md164-176
Mesh agents can compose other agents to create sophisticated behaviors:
Example: TrendingTokenAgent calls 6+ agents concurrently using asyncio.gather to merge trending data from multiple sources (GMGN, CoinGecko, Pump.fun, DexScreener, Elfa, AIXBT).
Sources: mesh/README.md294-344
Example: TokenResolverAgent performs base search, then automatically enriches results by calling CoinGeckoTokenInfoAgent and FundingRateAgent to add market metrics and funding data.
Sources: mesh/README.md294-344
Example: TwitterInfoAgent attempts primary Apidance API first, automatically falls back to Apify actors on failure using timeout/fallback policy.
Implementation:
Sources: mesh/mesh_agent.py238-338
Sources: mesh/README.md7-17
Setup environment:
Create agent: Inherit from MeshAgent and implement required methods
Test locally: See 7.3
Submit PR: Automatic deployment on merge
See 2.2 for detailed agent development guide.
Sources: mesh/README.md34-163
Sources: README.md162-180
The Heurist Agent Framework is licensed under Business Source License 1.1 with the following terms:
Contributing:
For Mesh agents, see 2.2 for contribution guidelines.
Sources: LICENSE1-51 README.md213-227 .github/PULL_REQUEST_TEMPLATE.md1-53
Refresh this wiki
This wiki was recently refreshed. Please wait 1 day to refresh again.