Skip to content

Agents#148

Draft
AnthonyRonning wants to merge 18 commits intomasterfrom
agents
Draft

Agents#148
AnthonyRonning wants to merge 18 commits intomasterfrom
agents

Conversation

@AnthonyRonning
Copy link
Contributor

No description provided.

@coderabbitai
Copy link

coderabbitai bot commented Feb 23, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: d64fe07c-b057-45ef-a683-bd2f29c75c6a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch agents

Comment @coderabbitai help to get the list of available commands and usage tips.

AnthonyRonning and others added 15 commits March 5, 2026 12:32
Enables encrypted user embedding storage + cosine search with experimental /v1/rag endpoints for local/dev testing.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Use Sage's 20k default char_limit and reject oversized updates via /v1/agent/memory/blocks/:label.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Restructure agent chat to emit messages per-step via SSE instead of
batching all messages into a single JSON response. This mirrors Sage's
Signal delivery pattern: messages are sent immediately as produced,
persisted synchronously (so the next step sees them in context), and
embeddings update async.

- Split process_message into prepare() + public step() so the handler
  drives the loop
- Chat handler emits agent.message, agent.done, agent.error SSE events
- Persistence moved from runtime to handler (send first, store sync,
  embed async)
- Added ExecutedTool to carry tool results for handler-side persistence
- Updated sage-in-maple doc to reflect conversations API isolation done

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Sage uses kimi-k2 as the default model with a 256k context window.
The agent config was incorrectly defaulting to deepseek-r1-0528 with
100k context. Fixed in both the runtime code and the migration SQL.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
The get_or_create_agent_config helper in mod.rs still had the old
deepseek-r1-0528 / 100k defaults. Extracted DEFAULT_MODEL,
DEFAULT_CONTEXT_WINDOW, DEFAULT_COMPACTION_THRESHOLD as pub constants
in runtime.rs and use them from both creation sites.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Adds encrypted attachment_text storage and a vision pre-step for input_image so agents and embeddings see [Uploaded Image: ...] descriptions.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
user_id UUID NOT NULL REFERENCES users(uuid) ON DELETE CASCADE,

label TEXT NOT NULL,
description TEXT,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think we need to persist description here. Probably best it is hardcoded into the code in case we need to configure this later

label TEXT NOT NULL,
description TEXT,
value_enc BYTEA NOT NULL,
char_limit INTEGER NOT NULL DEFAULT 5000,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

do we need to enforce char_limit at the db layer or allow it to be configured? another case for this just being hard coded.

Use custom rustPlatform from rust-overlay to match rust-toolchain.toml.
Add outputHashes for baml-ids, minijinja, and rig-core git dependencies.
Update PCR values for dev and prod.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
conversation_id BIGINT REFERENCES conversations(id) ON DELETE SET NULL,

enabled BOOLEAN NOT NULL DEFAULT FALSE,
model TEXT NOT NULL DEFAULT 'kimi-k2-5',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

remove kimi default from sql layer, we should always pass this in

AnthonyRonning and others added 2 commits March 5, 2026 19:08
Hide the primary Maple relationship behind a main agent thread while giving users focused subagent chats that share memory and code-owned runtime defaults.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Mirror the conversations API so clients can list agents and browse main-agent and subagent items with consistent cursor semantics.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
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