MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / registerConversations

Method registerConversations

internal/httpapi/conversations.go:89–109  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

87}
88
89func (s *Server) registerConversations() {
90 huma.Register(s.API, huma.Operation{
91 OperationID: "listConversations",
92 Method: http.MethodGet,
93 Path: "/v1/agents/{email}/conversations",
94 Summary: "List conversations",
95 Description: "List an agent's conversation threads (derived from messages.conversation_id).",
96 Tags: []string{"conversations"},
97 Security: []map[string][]string{{"bearer": {}}},
98 }, s.handleListConversations)
99
100 huma.Register(s.API, huma.Operation{
101 OperationID: "getConversation",
102 Method: http.MethodGet,
103 Path: "/v1/agents/{email}/conversations/{id}",
104 Summary: "Get a conversation",
105 Description: "Fetch a single conversation thread with its participants, labels, and member messages.",
106 Tags: []string{"conversations"},
107 Security: []map[string][]string{{"bearer": {}}},
108 }, s.handleGetConversation)
109}
110
111func (s *Server) handleListConversations(ctx context.Context, in *ListConversationsInput) (*listConversationsOutput, error) {
112 ag, err := s.resolveOwnedAgent(ctx, in.Address)

Callers 1

registerOperationsMethod · 0.95

Calls 1

RegisterMethod · 0.80

Tested by

no test coverage detected