Skip to content

agent creation api#98

Merged
allisoneer merged 4 commits intohumanlayer:mainfrom
allisoneer:agents_api
May 14, 2025
Merged

agent creation api#98
allisoneer merged 4 commits intohumanlayer:mainfrom
allisoneer:agents_api

Conversation

@allisoneer
Copy link
Copy Markdown
Contributor

@allisoneer allisoneer commented May 14, 2025

Important

Add agent creation API with MCP server handling and update controller image tag in kustomization.

  • API Changes:
    • Add CreateAgentRequest, MCPServerConfig, and AgentResponse structs in server.go.
    • Implement createAgent, listAgents, and getAgent functions in server.go to handle agent creation and retrieval.
    • Add processMCPServers to handle MCP server creation and validation.
    • Validate MCP server configurations, defaulting transport to stdio if unspecified.
  • Kustomization:
    • Update newTag for controller image in kustomization.yaml to 202505141236.
  • Testing:
    • Add comprehensive tests for agent creation and retrieval in server_test.go, covering valid and invalid inputs, MCP server configurations, and namespace handling.

This description was created by Ellipsis for 4c34c92. You can customize this summary. It will automatically update as commits are pushed.

Copy link
Copy Markdown
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Caution

Changes requested ❌

Reviewed everything up to 4c34c92 in 1 minute and 39 seconds. Click for details.
  • Reviewed 1048 lines of code in 3 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. acp/config/localdev/kustomization.yaml:27
  • Draft comment:
    Image tag updated; ensure this aligns with your build/versioning strategy.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
2. acp/internal/server/server.go:189
  • Draft comment:
    Double-decoding JSON to check for unknown fields; consider using a single json.Decoder with DisallowUnknownFields to streamline validation.
  • Reason this comment was not posted:
    Confidence changes required: 50% <= threshold 50% None
3. acp/internal/server/server_test.go:404
  • Draft comment:
    Agent API tests appear comprehensive; ensure any future changes in MCP server config validation are also covered by tests.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None

Workflow ID: wflow_rVBsHVpuhmqGPkUC

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

}

// Extract key from MCP server name (assuming it follows the pattern: {agent-name}-{key})
parts := strings.Split(ref.Name, "-")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Extracting the MCP key by splitting the resource name may be fragile if agent names include hyphens. Consider storing the key explicitly.

@allisoneer allisoneer merged commit fda15b7 into humanlayer:main May 14, 2025
4 of 5 checks passed
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.

2 participants