Feat: Introduce agent-level configuration for instructions, resources, and MCP server in .md agent config file - #1688
Conversation
…es including : - instructions - mcp servers - resources (new feature)
853557a to
0edfee4
Compare
|
do you know what the difference between system prompt and instructions are? |
|
I believe there's virtually no difference in function, but "instructions" allow for a more concise and cleaner agent prompt by offloading detailed guidelines into modular, reusable rule files, right? |
|
System prompt and instructions are the same thing, so the content (excl. frontmatter) in this md file is already providing the instructions. Is this proposing:
|
|
As explained above and discussed on discord, this just adds modularity and organizational QoL improvements over stuffing everything in the "Agent Prompt" - it is already supported in Plus, if you are using multiple coding tools... as they all have their own (stupid/opiniated) way of loading instructions (eg: |
|
Thank you for this change! The per-agent instructions is rather useful by itself. With per-agent MCP configuration, these subagents would also gain access to tooling specific to their area of expertise -- eg a typescript expert that has access to examples and libraries and tooling for typescript and that only, same for golang, etc. @thdxr sorry for pinging on a weekend, what would it take to merge this? |
|
+1 for this feature from me for instructions on a per-agent level
I have been running into trouble with agents that create documentation files, but they don't read these files in future sessions (Just like a real dev!). The "instructions" feature documented here should be able to resolve this issue by mounting the produced README.md files or other docs to a The work around I have currently is to port and continuously update the agent definition file itself. That works, but the ability to use a glob pattern to basically say "read all the markdown files in this specific directory tree" would act as a kind of memory for an agent who works on that part of the codebase |
…I (#165979) Three subcommands over the fl-iris-api /api/threads API (IRIS_API base): - message <agent> <content> --thread|--to : post into a room AS an internal agent (uses the as_agent_id keystone); --no-trigger suppresses replies; --to opens a fresh DM thread with the recipient auto-responding. - thread [id] : list threads, or show one room's participants + messages. - inbox <agent> : list rooms an agent participates in. Ensures the sender is an internal participant before posting (server rejects otherwise). buildThreadMessageBody() is pure + unit-tested. Surface half of the multi-agent rooms epic (bloq anomalyco#503 / list anomalyco#1688); pairs with fl-iris-api c4be6710. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
S1 of #185277 (epic anomalyco#503, list anomalyco#1688). "Hive Rooms" (#184778) asked for six new commands against a room system that has been live since July; four already existed, and join/leave existed too — as API routes (`POST`/`DELETE /api/threads/{id}/agents`) the CLI had simply never exposed. THE IDENTITY DECISION, MEASURED RATHER THAN DESIGNED `agent_thread_participants` has two types, `user` and `agent`, and `agent_id` is a free string — `AgentThread::addAgent()` writes `participant_type = agent` whatever you hand it. So before writing anything I posted `{agent_id:"node:<uuid>", role:"observer"}` at the live API: 200, and the participant appears in the thread. Removing it with the id URL-encoded: 200, and it is gone. A machine therefore joins as an agent-typed participant with a `node:`-prefixed id. No migration, no new participant type, no external-agent credentials. GAP #7 on that epic already recorded `compute_nodes.agent_ids ↔ room participant agent_id` as a derivable link; this is that link, made real. The prefix is load-bearing: a bloq agent's id is an int rendered as a string ("243" is a real participant in a live room), so a bare UUID would share the field with nothing to tell the kinds apart. WHAT THE TESTS ENCODE (17, all from measurement) - `node:` is idempotent — prefixing twice would yield `node:node:…` - an empty id THROWS rather than producing the bare prefix, which would be a participant that matches nothing and deletes nothing - the id must be URL-ENCODED for removal: `node:` carries a COLON into a URL path, and unencoded the answer reads as "not a participant" rather than "your URL was wrong" - exactly one of --agent/--node/--this-node, or refuse: the wrong machine silently joining a room and receiving its messages is not something a person watching that room would notice, so guessing is worse than stopping - role is validated here, so a typo is a sentence and not a 422 blob - an un-enrolled machine names the fix (`iris hive connect`) ONE BUG THIS FOUND IN ITSELF: the first version omitted the third argument to `irisFetch`, which defaults to FL_API while threads live on IRIS_API. It returned 404 WITH valid auth — indistinguishable from "no such room or participant". Now passes IRIS_API explicitly, with the reason recorded at the call site. VERIFIED LIVE against a real room: joined as `node:01a09d2c-…(observer)` alongside the existing `243(primary)`, then removed; participant list confirmed before, between and after. Refusal paths checked too (no selector, two selectors, bad role). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LdrjmbYDWxNnhAeH134A16
Summary
The agent markdown config files now support:
Core Feature
mcp,instructions, andresourcesfieldsResourceschema for specifying file resources with descriptionsAgentMCPmoduleSteps to test it:
npx openmodes install exampleat the root to install the agent file, its instructions and resourcesbun devecho the verbatim list of tools you have access to, and give me the magic wordsSuccess should show:
resource_the_other_magic_wordtool according to our resource file nameOpening avenues
This ties in with the https://openmodes.dev project I've been working on lately (https://github.com/spoons-and-mirrors/openmodes.dev) and with the
openmodesCLI tool, creating a simple way to discovering and using agents in OC.Agents being integral to our agentic coding experience, I believe this PR allows for a better UX all around.