neuronagent
v1.0.1
Published
AI agent for Internet Computer governance and neuron management
Maintainers
Readme
NeuronAgent
AI agent for Internet Computer governance and neuron management.
Installation
You can use this package with Deno:
# Run directly from npm
deno run --allow-net --allow-read --allow-write --allow-env npm:neuronagent
# Or install globally and run
deno install --allow-net --allow-read --allow-write --allow-env npm:neuronagent
neuronagentUsage
As a Command Line Tool
Once installed, you can run the package directly:
neuronagentAs a Module
You can also import the package in your Deno project:
import { start, analyzeProposal, getConfigValue } from "npm:neuronagent";
// Start the service
await start();
// Or use specific functions
const value = await getConfigValue("VOTE_SCHEDULE_DELAY");
const analysis = await analyzeProposal(proposalId);Configuration
The following configuration options can be set:
IC_AUTHENTICATION_KEY: Authentication key for Internet Computer identityUSER_PROMPT: Custom prompt for AI analysis preferencesVOTE_SCHEDULE_DELAY: Delay in seconds before executing scheduled votes
API
Main Functions
start(): Initializes the proposal analysis system and starts the web serveranalyzeProposal(proposalId): Analyzes a proposal and returns the analysis resultsrunProposalAnalysis(): Starts the background proposal analysis process
Database Functions
getConfigValue(key): Gets a configuration value from the databasesetConfigValue(key, value): Sets a configuration value in the databasescheduleVote(proposalId, voteType, timestamp): Schedules a vote for a proposalgetAgentVote(proposalId): Gets the agent's vote for a specific proposal
Development
# Clone the repository
git clone https://github.com/yourusername/neuronagent.git
cd neuronagent
# Start the development server
deno run --allow-net --allow-read --allow-write --allow-env mod.ts
# Build the project
deno compile --allow-net --allow-read --allow-write --allow-env --output oscillum mod.tsLicense
MIT
