HERALD X Agent — LLM brain for mentions and DMs#145
Merged
Conversation
Extends AgentOptions with systemPrompt, tools, and toolExecutor fields so different agent identities (SIPHER vs HERALD) can share the same chat loop with their own prompts and tool sets. Falls back to SIPHER defaults when no overrides are passed, preserving all existing behavior unchanged.
…odel) Add AgentConfig interface to packages/agent/src/core/types.ts and export it from the core barrel. AgentCore now accepts an optional config object in its constructor; config fields are threaded through to chat() and chatStream() so different agent identities (SIPHER, HERALD, etc.) can supply their own system prompt, tool registry, and model without subclassing. Empty constructor default preserved — all 497 tests pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Gives HERALD an LLM brain. When the poller detects mentions or DMs on X, the X adapter routes them through AgentCore with HERALD-specific tools and system prompt, generating autonomous responses.
systemPrompt,tools,toolExecutoroverrides (backward compatible)herald:mentionandherald:dmevents on guardian bus, skips spam, respects budget gates, routes through AgentCore, auto-replies viareplyTweet/sendDMtoolsNew/Modified files
packages/agent/src/agent.ts— AgentOptions extendedpackages/agent/src/core/types.ts— AgentConfig interfacepackages/agent/src/core/agent-core.ts— constructor accepts configpackages/agent/src/adapters/x.ts— X adapter (event bus → AgentCore → X API)packages/agent/src/index.ts— wires X adapter + poller startuppackages/agent/tests/adapters/x.test.ts— 7 testsTest plan
tsc --noEmitclean