Skip to content

feat: team model and deployment improvements#918

Merged
hyacinthus merged 14 commits intomainfrom
hyacinthus
Nov 25, 2025
Merged

feat: team model and deployment improvements#918
hyacinthus merged 14 commits intomainfrom
hyacinthus

Conversation

@hyacinthus
Copy link
Collaborator

This PR includes several improvements:

  • Add team model support for multi-user collaboration
  • Improve checkpoint cleanup and migration
  • Move checker to core for better organization
  • Enhance agent testing capabilities
  • Fix various bugs in astream and caching
  • Disable autonomous, telegram, and checker deployments in testnet-dev

Copilot AI review requested due to automatic review settings November 25, 2025 03:38
@hyacinthus hyacinthus merged commit 5550f5d into main Nov 25, 2025
5 checks passed
@hyacinthus hyacinthus deleted the hyacinthus branch November 25, 2025 03:38
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This is a comprehensive pull request that introduces team collaboration features, improves checkpoint management, enhances testing capabilities, and fixes several bugs. The PR updates numerous dependencies and makes organizational changes by moving the checker functionality into the core module.

Key Changes:

  • Introduces team model for multi-user collaboration with team ownership for agents
  • Adds checkpoint cleanup functionality to manage LangGraph database size
  • Adds Ollama provider support for local LLM execution
  • Fixes critical bugs in string concatenation and message streaming
  • Disables autonomous, telegram, and checker deployments in testnet-dev environment

Reviewed changes

Copilot reviewed 29 out of 30 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
uv.lock Updates multiple dependencies including anthropic (0.73.0→0.75.0), asyncpg (0.30.0→0.31.0), boto3, fastapi, langchain packages, numpy, and various other libraries
pyproject.toml Adds langchain-ollama>=0.2.0 to dev dependencies
intentkit/models/team.py New file introducing Team, TeamMember, and TeamRole models with database tables for multi-user team collaboration
intentkit/models/agent.py Adds optional team_id field to AgentTable and AgentCreate models
intentkit/models/draft.py Adds team_id field to AgentDraftTable
intentkit/models/credit.py Adds TEAM owner type to OwnerType enum and team_id field to CreditEventTable
intentkit/models/llm.py Adds OLLAMA provider support with OllamaLLM class for local model execution
intentkit/models/db.py Adds cleanup_checkpoints() function and assertion checks for initialized engine
intentkit/core/engine.py Fixes streaming bugs, improves tuple unpacking, and adds better attribute checking with getattr
intentkit/core/middleware.py Fixes string concatenation bug in error message
intentkit/core/scheduler.py Moves account checking jobs from separate checker to core scheduler, adds checkpoint cleanup job
intentkit/abstracts/graph.py Changes AgentState import from langgraph.prebuilt to langchain.agents
tests/core/test_agent_local.py New comprehensive tests for local agent execution with tool calling
scripts/cleanup_checkpoints.py New script for batch checkpoint cleanup with progress tracking
scripts/inspect_checkpoints.py New utility script to inspect checkpoint database statistics
app/checker.py Deleted - functionality moved to core scheduler
.github/workflows/build.yml Disables autonomous, telegram, and checker deployments in testnet-dev
Comments suppressed due to low confidence (7)

intentkit/core/middleware.py:54

  • The string concatenation is incomplete. This creates a string literal "Found AIMessages with tool_calls that do not have a corresponding ToolMessage. " without including the f-string that follows it. The fix correctly combines them into a single string expression.
    intentkit/models/credit.py:491
  • Variable amount_left is not used.
            amount_left = Decimal("0")

intentkit/models/credit.py:500

  • Variable amount_left is not used.
                amount_left = Decimal("0")

intentkit/core/engine.py:540

  • Variable last is not used.
                    last = this_time

intentkit/core/engine.py:788

  • Variable last is not used.
                        last = this_time

intentkit/models/agent.py:739

  • This import of module re is redundant, as it was previously imported on line 6.
        import re

app/services/discord/bot/pool.py:130

  • 'except' clause does nothing but pass and there is no explanatory comment.
                except asyncio.CancelledError:

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

from typing import Any, NotRequired

from langgraph.prebuilt.chat_agent_executor import AgentState as BaseAgentState
from langchain.agents import AgentState as BaseAgentState
Copy link

Copilot AI Nov 25, 2025

Choose a reason for hiding this comment

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

The import path for AgentState has changed from langgraph.prebuilt.chat_agent_executor to langchain.agents. Please verify that this import path is correct and that the AgentState class in langchain.agents has the same interface and behavior as expected. This could be a breaking change if the classes are not compatible.

Copilot uses AI. Check for mistakes.

model_config = ConfigDict(
from_attributes=True,
json_encoders={datetime: lambda v: v.isoformat(timespec="milliseconds")},
Copy link

Copilot AI Nov 25, 2025

Choose a reason for hiding this comment

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

This method requires 1 positional argument, whereas overridden TeamCreate.lambda requires 0.

Copilot uses AI. Check for mistakes.
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