Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Agents api - Add backend plumbing for agent manager #30

Merged
merged 7 commits into from
Jan 23, 2025

Conversation

jedheaj314
Copy link

@jedheaj314 jedheaj314 commented Jan 21, 2025

Fixes part of #20

Description:

Need API end points for CRUD operations with server side validation.

Changes:

  • New router, service, repository, models for agent CRUD operations

Next:

  • UI change for CRUD

Test:

@jedheaj314 jedheaj314 changed the title Jedheaj314/agents api Agents api - Add backend plumbing for agent manager Jan 21, 2025
@jedheaj314 jedheaj314 changed the base branch from main to feature/admin-agent-manager January 21, 2025 14:07
@jedheaj314 jedheaj314 marked this pull request as ready for review January 21, 2025 14:34
@jedheaj314 jedheaj314 requested a review from a team as a code owner January 21, 2025 14:34
Copy link
Contributor

@ljtill ljtill left a comment

Choose a reason for hiding this comment

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

LGTM

@ljtill ljtill requested a review from Copilot January 21, 2025 15:07

Choose a reason for hiding this comment

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

Copilot reviewed 5 out of 8 changed files in this pull request and generated no comments.

Files not reviewed (3)
  • app/api/main.py: Evaluated as low risk
  • app/api/routers/agents.py: Evaluated as low risk
  • app/api/config/config.py: Evaluated as low risk
Comments suppressed due to low confidence (4)

app/api/database/agents_repository.py:14

  • The get_agent_by_name_and_type method should return a single agent instead of a list of agents.
async def get_agent_by_name_and_type(self, name: str, type: str) -> Agent:

app/api/database/agents_repository.py:68

  • The update_agent method should have a return type of Agent instead of None.
async def update_agent(self, agent_id: str, fields: Dict[str, Any]) -> None:

app/api/database/agents_repository.py:85

  • [nitpick] The error message 'Agent {agent_id} not found' could be more descriptive.
raise ValueError(f"Agent {agent_id} not found.")

app/api/database/db_client.py:104

  • [nitpick] Verify if using 'item_id' for both 'item' and 'partition_key' is the intended behavior.
self.container.delete_item(item=item_id, partition_key=item_id)
app/api/database/agents_repository.py Outdated Show resolved Hide resolved
app/api/database/db_client.py Show resolved Hide resolved
app/api/database/db_client.py Show resolved Hide resolved
app/api/routers/agents.py Show resolved Hide resolved
app/api/routers/agents.py Show resolved Hide resolved
app/api/routers/agents.py Show resolved Hide resolved
common/models.py Outdated Show resolved Hide resolved
common/models.py Outdated Show resolved Hide resolved
@jedheaj314 jedheaj314 marked this pull request as draft January 22, 2025 15:49
@jedheaj314 jedheaj314 marked this pull request as ready for review January 23, 2025 08:35
@jedheaj314 jedheaj314 merged commit edb3189 into feature/admin-agent-manager Jan 23, 2025
1 check passed
@jedheaj314 jedheaj314 deleted the jedheaj314/agents-api branch January 23, 2025 14:33
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.

4 participants