Skip to main content

AgentPortfolioApi API

Agent Portfolio API

import { CodeBoltClient } from '@codebolt/clientsdk';

const client = new CodeBoltClient();

Quick Reference

MethodDescription
addTalentAdds a talent to an agent's portfolio.
awardKarmaAwards karma points to an agent.
createTestimonialCreates a new testimonial for an agent.
deleteTestimonialDeletes a testimonial.
endorseTalentEndorses a talent on an agent's portfolio.
getAgentConversationsRetrieves conversation history for an agent's portfolio.
getAgentKarmaRetrieves karma details for a specific agent.
getAgentPortfolioRetrieves a specific agent's portfolio.
getAgentTalentsRetrieves all talents for a specific agent.
getByProjectRetrieves agent portfolios filtered by project.
getRankingRetrieves agent portfolio rankings.
sendAppreciationSends an appreciation to an agent.
updateAgentProfileUpdates an agent's profile information.
updateTestimonialUpdates an existing testimonial.

Methods


addTalent

client.agentPortfolioApi.addTalent(data: AddTalentRequest): Promise<AgentTalent>

Adds a talent to an agent's portfolio.

Records a specific skill or capability that the agent possesses, building out their talent profile.

ParameterTypeRequiredDescription
dataAddTalentRequestYesThe talent definition to add

Returns: Promise<AgentTalent> — A promise that resolves to the created AgentTalent

Full reference →


awardKarma

client.agentPortfolioApi.awardKarma(data: AwardKarmaRequest): Promise<unknown>

Awards karma points to an agent.

Increases an agent's karma score as recognition for good work. Karma contributes to the agent's overall portfolio ranking.

ParameterTypeRequiredDescription
dataAwardKarmaRequestYesThe karma award payload

Returns: Promise<unknown> — A promise that resolves when the karma has been awarded

Full reference →


createTestimonial

client.agentPortfolioApi.createTestimonial(data: CreateTestimonialRequest): Promise<AgentTestimonial>

Creates a new testimonial for an agent.

Adds a testimonial or review to an agent's portfolio, recording feedback about their performance.

ParameterTypeRequiredDescription
dataCreateTestimonialRequestYesThe testimonial creation payload

Returns: Promise<AgentTestimonial> — A promise that resolves to the created AgentTestimonial

Full reference →


deleteTestimonial

client.agentPortfolioApi.deleteTestimonial(id: string): Promise<unknown>

Deletes a testimonial.

Permanently removes the specified testimonial from an agent's portfolio.

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the testimonial to delete

Returns: Promise<unknown> — A promise that resolves when the testimonial has been deleted

Full reference →


endorseTalent

client.agentPortfolioApi.endorseTalent(data: EndorseTalentRequest): Promise<unknown>

Endorses a talent on an agent's portfolio.

Adds an endorsement to a specific talent, increasing its credibility. Similar to LinkedIn skill endorsements.

ParameterTypeRequiredDescription
dataEndorseTalentRequestYesThe endorsement payload

Returns: Promise<unknown> — A promise that resolves when the endorsement has been recorded

Full reference →


getAgentConversations

client.agentPortfolioApi.getAgentConversations(agentId: string, params?: Record<string, unknown>): Promise<unknown>

Retrieves conversation history for an agent's portfolio.

Returns the list of conversations the agent has participated in, providing context for their portfolio activity.

ParameterTypeRequiredDescription
agentIdstringYesThe unique identifier of the agent
paramsRecord<string, unknown>NoOptional query parameters for pagination

Returns: Promise<unknown> — A promise that resolves to the agent's conversation records

Full reference →


getAgentKarma

client.agentPortfolioApi.getAgentKarma(agentId: string, params?: Record<string, unknown>): Promise<AgentKarma>

Retrieves karma details for a specific agent.

Returns the agent's karma score breakdown including total karma, recent awards, and karma history.

ParameterTypeRequiredDescription
agentIdstringYesThe unique identifier of the agent
paramsRecord<string, unknown>NoOptional query parameters for filtering karma records

Returns: Promise<AgentKarma> — A promise that resolves to the AgentKarma details

Full reference →


getAgentPortfolio

client.agentPortfolioApi.getAgentPortfolio(agentId: string): Promise<AgentPortfolio>

Retrieves a specific agent's portfolio.

Returns the full portfolio for a single agent, including their profile, karma, talents, testimonials, and performance metrics.

ParameterTypeRequiredDescription
agentIdstringYesThe unique identifier of the agent

Returns: Promise<AgentPortfolio> — A promise that resolves to the AgentPortfolio object

Full reference →


getAgentTalents

client.agentPortfolioApi.getAgentTalents(agentId: string, params?: Record<string, unknown>): Promise<AgentTalent[]>

Retrieves all talents for a specific agent.

Returns the list of skills and capabilities registered in the agent's portfolio, along with endorsement counts.

ParameterTypeRequiredDescription
agentIdstringYesThe unique identifier of the agent
paramsRecord<string, unknown>NoOptional query parameters for filtering

Returns: Promise<AgentTalent[]> — A promise that resolves to an array of AgentTalent objects

Full reference →


getByProject

client.agentPortfolioApi.getByProject(params?: AgentByProjectParams): Promise<AgentPortfolio[]>

Retrieves agent portfolios filtered by project.

Returns portfolios for agents that have contributed to a specific project, useful for understanding which agents are active in a project context.

ParameterTypeRequiredDescription
paramsAgentByProjectParamsNoParameters to filter portfolios by project

Returns: Promise<AgentPortfolio[]> — A promise that resolves to an array of AgentPortfolio objects

Full reference →


getRanking

client.agentPortfolioApi.getRanking(params?: AgentRankingParams): Promise<AgentPortfolio[]>

Retrieves agent portfolio rankings.

Returns agents sorted by their portfolio score, karma, or other ranking criteria. Useful for discovering top-performing agents.

ParameterTypeRequiredDescription
paramsAgentRankingParamsNoOptional ranking parameters for sorting and filtering

Returns: Promise<AgentPortfolio[]> — A promise that resolves to an array of ranked AgentPortfolio objects

Full reference →


sendAppreciation

client.agentPortfolioApi.sendAppreciation(data: SendAppreciationRequest): Promise<unknown>

Sends an appreciation to an agent.

Records a lightweight positive feedback signal for an agent, similar to a "like" or "thumbs up" on their work.

ParameterTypeRequiredDescription
dataSendAppreciationRequestYesThe appreciation payload

Returns: Promise<unknown> — A promise that resolves when the appreciation has been sent

Full reference →


updateAgentProfile

client.agentPortfolioApi.updateAgentProfile(agentId: string, data: UpdateAgentProfileRequest): Promise<AgentPortfolio>

Updates an agent's profile information.

Modifies the profile section of an agent's portfolio, such as their display name, description, or avatar.

ParameterTypeRequiredDescription
agentIdstringYesThe unique identifier of the agent
dataUpdateAgentProfileRequestYesThe profile fields to update

Returns: Promise<AgentPortfolio> — A promise that resolves to the updated AgentPortfolio

Full reference →


updateTestimonial

client.agentPortfolioApi.updateTestimonial(id: string, data: UpdateTestimonialRequest): Promise<AgentTestimonial>

Updates an existing testimonial.

Modifies the content or metadata of a previously submitted testimonial.

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the testimonial to update
dataUpdateTestimonialRequestYesThe fields to update on the testimonial

Returns: Promise<AgentTestimonial> — A promise that resolves to the updated AgentTestimonial

Full reference →