
Security News
NVD Concedes Inability to Keep Pace with Surging CVE Disclosures in 2025
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
@cogment/cogment-js-sdk
Advanced tools
Cogment is an innovative open source AI platform designed to leverage the advent of AI to benefit humankind through human-AI collaboration developed by AI Redefined. Cogment enables AI researchers and engineers to build, train and operate AI agents in simulated or real environments shared with humans. For the full user documentation visit https://docs.cogment.ai
This module, cogment-js-sdk
, is the Javascript SDK for making use of Cogment when working with Javascript. It's full documentation can be consulted at https://docs.cogment.ai/cogment/cogment-api-reference/javascript/modules/.
Install the package:
npm install @cogment/cogment-js-sdk
The test suite embeds a working Cogment application. Parts of the example application pertinent to the js-sdk test suite:
The ActorSession.test.ts is the most feature complete example of a working cogment application and is documented to be read as such.
Examples follow.
import {createService} from 'cogment';
import cogSettings from './CogSettings';
const cogmentService = createService({
cogSettings,
});
import {createService} from 'cogment';
import cogSettings from './CogSettings';
const cogmentService = createService({
cogSettings,
});
const trialController = cogmentService.createTrialController();
const {trialId} = await trialController.startTrial('unique-id');
return trialController.terminateTrial(trialId);
import {createService, TrialActor} from 'cogment';
import cogSettings from './CogSettings';
import {ClientAction, Observation} from './data_pb';
const cogmentService = createService({
cogSettings,
});
const trialActor: TrialActor = {
name: 'client_actor',
actorClass: 'client',
};
cogmentService.registerActor<ClientAction, Observation, never>(
trialActor,
async (actorSession) => {
// Actor implementation here.
},
);
const trialController = cogmentService.createTrialController();
const {trialId} = await trialController.startTrial(trialActor.name);
await trialController.joinTrial(trialId, trialActor);
return trialController.terminateTrial(trialId);
import {createService} from 'cogment';
import cogSettings from './CogSettings';
const cogmentService = createService({
cogSettings,
});
const trialController = cogmentService.createTrialController();
for await (const trialListEntry of trialController.watchTrials([
0,
1,
2,
3,
4,
5,
])) {
// Do stuff!
}
git clone https://github.com/cogment/cogment-js-sdk.git
docker-compose build cogment-js-sdk
docker-compose run cogment-js-sdk npm run init
bin/up.bash
docker-compose run cogment-js-sdk npm run test
git clone https://github.com/cogment/cogment-js-sdk.git
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash
source ~/.nvm/nvm.sh
cd /path/to/cogment-js-sdk
nvm install
npm run init
module.exports = {
connection: {
http: 'http://grpcwebproxy:8080',
},
logger: {
level: 'debug',
},
};
To
module.exports = {
connection: {
http: 'http://localhost:8080',
},
logger: {
level: 'debug',
},
};
bin/up.bash
npm run test
npm run test:watch
npm run test:ui
People having maintainers rights of the repository can follow these steps to release a version MAJOR.MINOR.PATCH. The versioning scheme follows Semantic Versioning.
./scripts/create_release_branch.sh
automatically compute and update the version of the package, create the release branch and update the changelog from the commit history,./scripts/tag_release.sh MAJOR.MINOR.PATCH
to create the specific version section in the changelog, merge the release branch in main
, create the release tag and update the develop
branch with those.The rest, publishing the packages to dockerhub and updating the mirror repositories, is handled directly by the CI.
FAQs
Javascript SDK for the Cogment Framework
The npm package @cogment/cogment-js-sdk receives a total of 1 weekly downloads. As such, @cogment/cogment-js-sdk popularity was classified as not popular.
We found that @cogment/cogment-js-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
Security Fundamentals
Attackers use obfuscation to hide malware in open source packages. Learn how to spot these techniques across npm, PyPI, Maven, and more.
Security News
Join Socket for exclusive networking events, rooftop gatherings, and one-on-one meetings during BSidesSF and RSA 2025 in San Francisco.