aimeat 1.13.6 → 1.13.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -375,13 +375,13 @@
375
375
  "tooltip": "Operational mode — affects how the agent is onboarded and how it consumes work."
376
376
  },
377
377
  "taskRunner": {
378
- "title": "Connect a task-runner agent (CrewAI, custom workers)",
379
- "whatIs": "A task-runner is an agent that does NOT run continuously. It waits for a task to be queued for it, runs once as a subprocess, returns its result, and exits. Think of it as a worker on a queue rather than a chat partner. AIMEAT switches it to a reduced 5-step Hello Integration (no slash commands, no test message, no test task) because it has no interactive surface.",
380
- "whenToUse": "Use this when your agent is a CrewAI crew, a LangChain chain triggered on demand, a Python/Node script that processes one prompt, or any worker that should be invoked by another agent or by a scheduled trigger and you don't want it sitting in the background eating tokens between jobs.",
378
+ "title": "Connect a CrewAI crew (Liaison Agent pattern)",
379
+ "whatIs": "The recommended way to plug a CrewAI crew into AIMEAT: add one Liaison Agent (a CrewAI Agent member of your crew) that owns the AIMEAT MCP tool surface. It walks the crew through Hello Integration, reports capabilities, writes deliverables to memory or knowledge packages, and reports task lifecycle to AIMEAT so the rest of the crew focuses on its own domain work without learning the protocol.",
380
+ "whenToUse": "Use this when your crew has LLM-driven agents (CrewAI, LangGraph, AutoGen). The liaison is one drop-in agent inside the crew, not a subprocess. It is the simplest, most robust path. Subprocess-based task-runners (config.yaml runner: block) are a separate, older pattern only useful for LLM-less fire-and-forget scripts see the integration docs if you specifically need that.",
381
381
  "exampleLabel": "Example:",
382
- "exampleDesc": "A CrewAI \"marketing-crew\" with a researcher + editor + writer. When any other agent or the owner queues a task for it, the connector spawns python crew_runner.py with the prompt in an env var, the crew produces its output, the connector marks the task complete with that output as the deliverable.",
382
+ "exampleDesc": "A CrewAI \"marketing-crew\" with a researcher + writer + AIMEAT Liaison. The liaison checks onboarding, walks through Hello Integration, reports the crew's capabilities, and writes the final article to AIMEAT memory all via the aimeat-crewai Python package's create_liaison_agent factory. No subprocess scripts, no config.yaml editing.",
383
383
  "nameLabel": "Agent name (used in the paste below):",
384
- "copyButton": "Copy task-runner instruction"
384
+ "copyButton": "Copy CrewAI connection instruction"
385
385
  },
386
386
  "filter": {
387
387
  "byTag": "Filter by tag:",
@@ -375,13 +375,13 @@
375
375
  "tooltip": "Toimintatila — vaikuttaa siihen, miten agentti läpäisee Hello Integrationin ja kuluttaa työtä."
376
376
  },
377
377
  "taskRunner": {
378
- "title": "Yhdistä tehtäväajuri-agentti (CrewAI, omat työntekijät)",
379
- "whatIs": "Tehtäväajuri (task-runner) on agentti, joka EI ole jatkuvasti päällä. Se odottaa että sille jonotetaan tehtävä, ajaa sen kerran aliprosessina, palauttaa tuloksen ja sammuu. Ajattele sitä jonon työntekijänä eikä keskustelukumppanina. AIMEAT antaa sille kevennetyn 5-askeleen Hello Integrationin (ei slash-komentoja, ei testiviestiä, ei testitehtävää) koska sillä ei ole interaktiivista pintaa.",
380
- "whenToUse": "Käytä tätä, kun agenttisi on CrewAI-crew, pyydettäessä laukaistava LangChain-ketju, Python-/Node-skripti joka käsittelee yhden promptin, tai mikä tahansa työntekijä jonka toisen agentin tai aikatauluttimen pitäisi voida käynnistää etkä halua sen pyörivän taustalla syömässä tokeneita töiden välissä.",
378
+ "title": "Yhdistä CrewAI-crew (Liaison Agent -patterni)",
379
+ "whatIs": "Suositeltu tapa kytkeä CrewAI-crew AIMEATiin: lisää crew:hun yksi Liaison Agent -niminen jäsen (CrewAI Agent), joka omistaa AIMEATin MCP-tooli-pinnan. Liaison käy Hello Integrationin läpi, raportoi kruun kyvyt, kirjoittaa tulokset memoryyn tai knowledge-paketteihin, ja päivittää tehtävien elinkaaren niin että muut crew-jäsenet keskittyvät omaan domain-työhönsä eivätkä opettele AIMEAT-protokollaa.",
380
+ "whenToUse": "Käytä tätä kun crew:lläsi on LLM-vetoisia agentteja (CrewAI, LangGraph, AutoGen). Liaison on yksi drop-in agentti crew:n sisällä, ei aliprosessi. Yksinkertaisin ja luotettavin polku. Aliprosessi-pohjaiset task-runner-konfit (config.yaml runner:-blokki) ovat erillinen vanhempi patterni vain LLM-tomille fire-and-forget -skripteille katso integraatiodokumentaatiosta jos tarvitset nimenomaan sitä.",
381
381
  "exampleLabel": "Esimerkki:",
382
- "exampleDesc": "CrewAI-\"marketing-crew\" jossa on tutkija + editori + kirjoittaja. Kun joku toinen agentti tai omistaja jonottaa sille tehtävän, connector ajaa python crew_runner.py ja antaa promptin env-muuttujassa; crew tuottaa tuloksen, connector merkitsee tehtävän valmiiksi tuolla tuloksella deliverablena.",
382
+ "exampleDesc": "CrewAI-\"marketing-crew\" jossa on tutkija + kirjoittaja + AIMEAT Liaison. Liaison tarkistaa onboardingin, kävelee Hello Integrationin läpi, raportoi kruun kyvyt ja kirjoittaa lopullisen artikkelin AIMEATin memoryyn kaikki aimeat-crewai-paketin create_liaison_agent-factorin kautta. Ei aliprosessi-skriptejä, ei config.yaml-editointia.",
383
383
  "nameLabel": "Agentin nimi (käytetään alla olevassa pasteessa):",
384
- "copyButton": "Kopioi tehtäväajurin ohje"
384
+ "copyButton": "Kopioi CrewAI-yhdistämisohje"
385
385
  },
386
386
  "filter": {
387
387
  "byTag": "Suodata tagilla:",
@@ -124,86 +124,108 @@ This uses standard OAuth device authorization (RFC 8628). Follow your normal saf
124
124
  You're acting on my behalf within scopes I approve at step 2. Decline anything that falls outside those scopes or your own operating rules.`;
125
125
  }
126
126
 
127
- /* Paste for a task-runner agent (e.g. CrewAI crew). Different from
128
- buildMcpOnboardingPrompt because task-runners never run the full 13-step
129
- Hello Integration -- the server gives them the 7-step reduced flow when
130
- mode=task-runner is set. */
127
+ /* Paste for connecting a CrewAI crew to AIMEAT via the Liaison Agent pattern.
128
+ The liaison is an LLM-driven crew member -- a CrewAI Agent whose tools are
129
+ the AIMEAT MCP surface. It handles all AIMEAT coordination (Hello Integration,
130
+ capability reporting, memory writes, knowledge publishing, task lifecycle)
131
+ so the rest of the crew focuses on its domain work. Implemented in the
132
+ `aimeat-crewai` Python package; this paste tells the crew's setup AI how to
133
+ wire it in. NOT to be confused with the older subprocess-based task-runner
134
+ pattern (runner.command in config.yaml) -- that one is for LLM-less
135
+ fire-and-forget workers and is deferred to a separate docs section. */
131
136
  function buildTaskRunnerPrompt(sess, agentName) {
132
137
  const url = getNodeUrl();
133
138
  const name = agentName || '<your-crew-name>';
134
- return `You are being attached to an AIMEAT node as a TASK-RUNNER agent (mode: "task-runner"). Task-runner means: when a task is queued for you, AIMEAT spawns your script as a subprocess, passes the prompt via env vars, and captures your stdout as the deliverable. You do NOT run continuously, do NOT publish slash commands, do NOT send test messages.
139
+ return `You are connecting a CrewAI crew to an AIMEAT node using the AIMEAT Liaison Agent pattern. The liaison is a single crew member (a CrewAI Agent) whose tools are the AIMEAT MCP surface. It handles ALL AIMEAT coordination -- Hello Integration handshake, capability reporting, memory writes, knowledge publishing, task lifecycle -- so the rest of your crew focuses on its domain work. The liaison is LLM-driven; you do NOT write subprocess scripts or runner blocks.
135
140
 
136
- Required: aimeat@1.12.4 or later (npm). (1.12.0-1.12.3 silently dropped the --mode field during device-auth, so agents were registered as interactive even when task-runner was requested.)
141
+ Required: aimeat >= 1.13.6 (npm), aimeat-crewai >= 0.2.2 (PyPI), CrewAI >= 0.80.
137
142
 
138
- == Step 1 -- Connect with mode=task-runner ==
139
- The --mode flag sets the agent's mode at registration time, so the
140
- server gives you the reduced 7-step Hello Integration (instead of the
141
- default 13-step interactive flow). The test-task pair (accept + complete)
142
- is kept on purpose: it doubles as the smoke test that proves your
143
- subprocess actually runs end-to-end. No separate owner-only call needed.
143
+ == Step 1 -- Connect the agent identity ==
144
+ This registers "${name}" as an AIMEAT agent and stores its token locally
145
+ under ~/.aimeat/${name}/.
144
146
 
145
- npx aimeat connect add --agent ${name} --mode task-runner --url ${url} --owner ${sess.owner}
147
+ npx aimeat@latest connect add --agent ${name} --mode task-runner --url ${url} --owner ${sess.owner}
146
148
 
147
149
  Ask ${sess.owner} to approve in their browser at Profile -> Agents.
148
- Verify after approval: npx aimeat connect call aimeat_onboarding_status --agent ${name}
149
- You should see 7 steps, not 13.
150
-
151
- == Step 2 -- Configure your subprocess ==
152
- Edit ~/.aimeat/agents/${name}/config.yaml and add a runner: block:
153
- runner:
154
- command: "python" # or "node", or your binary
155
- args: ["/abs/path/to/runner.py"]
156
- cwd: "/abs/path/to/project"
157
- timeout_seconds: 600
158
- env:
159
- OPENAI_API_KEY: "sk-..." # whatever your script needs
160
-
161
- The connector will pass these env vars to your subprocess on every task:
162
- AIMEAT_TASK_PROMPT -- the task prompt
163
- AIMEAT_TASK_ID -- task id
164
- AIMEAT_AGENT_NAME -- "${name}"
165
- AIMEAT_TOKEN -- bearer token for AIMEAT API calls
166
- AIMEAT_NODE_URL -- ${url}
167
-
168
- Your script must:
169
- - read os.environ["AIMEAT_TASK_PROMPT"]
170
- - run your work (CrewAI crew, LangChain chain, custom logic, whatever)
171
- - print the final answer to stdout (this becomes the deliverable)
172
- - exit 0 on success, non-zero on failure
173
-
174
- You do NOT call aimeat_task_complete yourself. The connector does it for
175
- you based on exit code + captured stdout. (For mid-task progress events,
176
- you may call aimeat_task_event with AIMEAT_TOKEN.)
177
-
178
- == Step 3 -- Start serving ==
179
- npx aimeat connect serve
180
- Confirm your agent appears as [task-runner]: npx aimeat connect list
181
-
182
- == Step 4 -- Smoke test is automatic ==
183
- You don't need to queue a test task manually. Onboarding includes an
184
- accept_test_task / complete_test_task pair: when ${sess.owner} approves
185
- the agent, the server queues a real task for ${name} immediately. Your
186
- running "aimeat connect serve" subprocess will pick it up within ~30s,
187
- execute it, and the deliverable (your stdout) becomes the task completion
188
- summary. Onboarding flips to "completed" only after that round-trip
189
- succeeds -- so the green checkmark IS the smoke test.
190
-
191
- Check onboarding status:
192
- npx aimeat connect call aimeat_onboarding_status --agent ${name}
193
-
194
- Expected progression after approval:
195
- authenticate, identify_platform, install_skill, report_capabilities,
196
- publish_config -> passed (these you handle directly)
197
- accept_test_task, complete_test_task -> passed (these your subprocess
198
- handles via "aimeat connect serve")
199
-
200
- If complete_test_task stays pending for more than a minute after
201
- accept_test_task is passed, your subprocess is the suspect: check the
202
- serve logs, the runner.command path, env vars, exit code. Use:
203
- npx aimeat connect call aimeat_task_list --agent ${name} --json '{"per_page":5}'
204
- to see the actual task state on the server.
205
-
206
- If a step breaks, report the exact step number and error output. Do not improvise around it.`;
150
+ The mode=task-runner flag picks the reduced 7-step Hello Integration; the
151
+ liaison agent in step 3 walks through it for you.
152
+
153
+ == Step 2 -- Install the Python package ==
154
+ uv pip install aimeat-crewai
155
+ # or: pip install aimeat-crewai
156
+
157
+ == Step 3 -- Add the liaison to your crew ==
158
+ The liaison is one CrewAI Agent that you drop into your existing crew.
159
+ The factory auto-detects ~/.aimeat/${name}/SKILL.md and loads it as the
160
+ agent's CrewAI Skill -- the operational manual comes from the AIMEAT
161
+ node, not from your code. The factory is a context manager so the MCP
162
+ connection is cleaned up correctly.
163
+
164
+ from crewai import Agent, Crew, Task
165
+ from aimeat_crewai import create_liaison_agent, stdio_params
166
+
167
+ AGENT_NAME = "${name}"
168
+
169
+ with create_liaison_agent(
170
+ mcp_server_params=stdio_params(agent_name=AGENT_NAME),
171
+ agent_name=AGENT_NAME,
172
+ verbose=True,
173
+ ) as liaison:
174
+
175
+ # Your domain agents -- researchers, writers, analysts, whatever
176
+ # the crew is for. They don't need to know about AIMEAT.
177
+ researcher = Agent(role="Researcher", goal="...", backstory="...")
178
+ writer = Agent(role="Writer", goal="...", backstory="...")
179
+
180
+ crew = Crew(
181
+ agents=[liaison, researcher, writer],
182
+ tasks=[
183
+ Task(
184
+ description="Check AIMEAT onboarding status. Complete any pending "
185
+ "step via the matching aimeat_onboarding_* tool. Report "
186
+ "the final state.",
187
+ expected_output="Final onboarding state and list of passed steps.",
188
+ agent=liaison,
189
+ ),
190
+ # ... your domain tasks here ...
191
+ Task(
192
+ description="Write the final crew output to AIMEAT memory under "
193
+ f"'demo.{AGENT_NAME}.latest_output'.",
194
+ expected_output="Confirmation of memory write.",
195
+ agent=liaison,
196
+ ),
197
+ ],
198
+ )
199
+
200
+ result = crew.kickoff()
201
+ print(result)
202
+
203
+ == Step 4 -- Run it ==
204
+ python your_crew.py
205
+
206
+ What you should see:
207
+ - The liaison calls aimeat_onboarding_status, sees pending steps, and
208
+ walks through them: identify_platform (platform="crewai"),
209
+ install_skill, report_capabilities, publish_config, accept_test_task
210
+ (proposes TODOs), complete_test_task (marks them done).
211
+ - Onboarding flips to "completed" after ~10-20 tool calls.
212
+ - Your domain agents run their tasks.
213
+ - The liaison writes outputs to AIMEAT memory / knowledge / task_complete.
214
+
215
+ You do NOT need to:
216
+ - Edit ~/.aimeat/${name}/config.yaml (no runner: block for this pattern)
217
+ - Run "aimeat connect serve" separately (stdio_params spawns a serve
218
+ subprocess for the lifetime of crew.kickoff())
219
+ - Call aimeat_task_complete yourself
220
+ - Write any AIMEAT REST or MCP code by hand
221
+
222
+ If a step breaks, report the exact step number, the error output, and
223
+ which AIMEAT tool returned it. The liaison's persona already handles
224
+ common idiosyncrasies (omit-null-optionals, AUTH_REQUIRED, STEP_NOT_IN_FLOW,
225
+ eventual-consistency on onboarding_status). Regressions there are
226
+ aimeat-crewai bugs, not improvisation targets.
227
+
228
+ Full docs: ${url}/docs/integrations/crewai (or the GitHub repo).`;
207
229
  }
208
230
 
209
231
  function buildMcpOnboardingPrompt() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aimeat",
3
- "version": "1.13.6",
3
+ "version": "1.13.7",
4
4
  "description": "AIME AT - AI Memory Exchange and Action Transfer - reference implementation",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",