Skip to content

feat(agent-bundles): au-quant-8 multi-agent quant team bundle#691

Open
TatsuKo-Tsukimi wants to merge 1 commit into
dataelement:mainfrom
TatsuKo-Tsukimi:feat/agent-bundles
Open

feat(agent-bundles): au-quant-8 multi-agent quant team bundle#691
TatsuKo-Tsukimi wants to merge 1 commit into
dataelement:mainfrom
TatsuKo-Tsukimi:feat/agent-bundles

Conversation

@TatsuKo-Tsukimi

Copy link
Copy Markdown
Contributor

What

Adds au-quant-8, an 8-agent Shanghai-gold (AU) futures quant team bundle, plus the supporting agent-bundle system (one-shot hire, per-team paper-trading isolation, bundle i18n).

Agents (zh + en variants)

  • Bull / Bear researchers, Research Manager (debate moderator), Trader, three Risk Analysts (aggressive / conservative / neutral), and the Risk-Committee Chair
  • A2A flow: RM orchestrates the bull/bear debate → investment plan → Chair runs a three-perspective risk review → Trader executes via the paper-trading MCP

Backend

  • agent_bundles/ bundle format (bundle.yaml / mcps.yaml / relationships.yaml / per-agent soul.md + skills)
  • Bundle seeder, one-shot hire flow (agent_bundle_hire.py), bundle i18n / locale-scoped Talent Market
  • Per-team paper-trading isolation via Bearer api_key; MCP exec authz hardening
  • Alembic migrations for the new bundle fields

Frontend

  • Bundle hire modal, Talent Market integration, i18n strings

Config

MCP endpoints in each bundle's mcps.yaml are placeholders (YOUR_HOST / YOUR_DATA_HOST) — set them to your own deployment before seeding.

Notes

  • This branch is based on an older main and is currently behind upstream; it will need a rebase before a clean merge (a few backend / i18n files conflict with recent upstream changes). Opening now to start the discussion / let CI run.
  • Includes two dummy-* bundles used as test fixtures — happy to drop them if you'd prefer them out of the contribution.

🤖 Generated with Claude Code

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2921e71be3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

# the ``{{agent_name}}`` template placeholders).
agent_dir = _agent_dir(agent.id)
soul_path = agent_dir / "soul.md"
soul_path.write_text(ba.soul_md or "", encoding="utf-8")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Write bundle files through storage backend

When STORAGE_BACKEND is S3 or another non-local backend, initialize_agent_files() writes the scaffold into the storage backend and does not create/update this local path. This Path.write_text() therefore either raises FileNotFoundError during bundle hire or only mutates ephemeral local disk, while build_agent_context() and container materialization read soul.md and skills from storage; hired bundle agents can keep the scaffolded soul and miss bundle skills. Use the storage backend under the agent prefix for the bundle soul/skill copies.

Useful? React with 👍 / 👎.

.where(
ChatMessage.participant_id == from_participant,
ChatMessage.created_at > since,
ChatMessage.role == "assistant",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve A2A trigger matching for user-role sends

When an agent sends via send_message_to_agent or send_file_to_agent, the A2A ChatMessage is stored with role="user" and the source agent's participant id (see agent_tools.py around the A2A message/file inserts). Adding this assistant-only predicate makes on_message triggers seeded from bundle relationships ignore the actual A2A sends/files they are meant to wake on, so daemon fallback/callback triggers stay silent unless a separate assistant-role row happens to match. Include participant-attributed user rows or remove the role filter.

Useful? React with 👍 / 👎.

8-agent Shanghai-gold (AU) quant team — bull/bear researchers, research
manager, trader, three risk analysts, risk-committee chair — with one-shot
hire, per-team paper-trading isolation via Bearer api_key, zh + en bundle
variants, plus supporting backend (bundle seeder, hire flow, MCP exec authz,
alembic migrations) and frontend (hire modal, talent market).

MCP endpoints are placeholders (YOUR_HOST / YOUR_DATA_HOST); set them to your
own deployment before seeding.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 110cf17c79

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

agent_id=to_id,
name=trigger_name,
type="on_message",
config={"from_agent_name": from_name},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Scope bundle on_message triggers to the recipient

For bundle graphs where one source agent has edges to multiple recipients, this trigger config only records the sender name. I checked check_new_agent_messages, and the lookup only filters by the sender participant and excludes trigger sessions; it does not constrain the A2A session to this trigger's recipient. As a result, the first message from that sender to any agent can fire every seeded trigger for that sender, and because these bundle triggers are capped at max_fires=1, the intended recipient-specific fallback can be consumed before the actual edge message arrives.

Useful? React with 👍 / 👎.

Comment on lines +339 to +340
f"{self.FEISHU_CONTACT_URL}/{open_id}",
params={"user_id_type": "user_id"},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Resolve Feishu contact lookups as open_id

When the OAuth user_info response supplies an open_id, this request puts that open_id in the URL but declares user_id_type=user_id. The existing Feishu webhook resolver in this repo uses the same contact endpoint with user_id_type=open_id for an open_id path, so this call will fail to populate contact_user; SSO then misses the stable employee user_id/authoritative contact fields and can fail to link org-synced members keyed by external_id.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant