Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Harshitk-cp/engram
/ functions
Functions
2,051 in github.com/Harshitk-cp/engram
⨍
Functions
2,051
◇
Types & classes
484
↓ 1 callers
Function
RateLimitBurst
RateLimitBurst returns the burst size for rate limiting. Defaults to 20 if not set.
internal/config/config.go:179
↓ 1 callers
Function
RateLimitRPS
RateLimitRPS returns requests per second limit. Defaults to 100 if not set.
internal/config/config.go:169
↓ 1 callers
Function
RazorpayPlanIDs
RazorpayPlanIDs maps the self-serve plan names to their Razorpay Plan IDs, created in the Razorpay dashboard. Plans without a configured plan id can't
internal/config/config.go:297
↓ 1 callers
Method
RecallExhaustive
(ctx context.Context, queryEmbedding []float32, agentID uuid.UUID, tenantID uuid.UUID, opts RecallOpts)
internal/domain/stores.go:101
↓ 1 callers
Method
RecallHybrid
(ctx context.Context, query string, queryEmbedding []float32, agentID uuid.UUID, tenantID uuid.UUID, opts Reca
internal/domain/stores.go:102
↓ 1 callers
Method
RecordTraversal
(ctx context.Context, edgeID uuid.UUID, strengthBoost float32)
internal/domain/graph.go:175
↓ 1 callers
Method
RedactMemory
RedactMemory replaces a memory's content with a tombstone and clears its embedding (GDPR redaction). The audit row keeps the original content hash as
internal/service/admin.go:129
↓ 1 callers
Method
ReembedAgent
ReembedAgent recomputes the vector for every memory of an agent using the currently configured embedding model. Use it after switching to a different
internal/service/admin.go:239
↓ 1 callers
Method
RejectQuarantine
RejectQuarantine permanently deletes a quarantined trace, recording the rejection (with a content snapshot) in the audit chain first.
internal/service/memory.go:578
↓ 1 callers
Method
Remember
Remember stores a memory in Engram. confidence=0 lets the server assign the default. anchor is the caller's own id for who/what the memory is about; w
mcp/client.go:85
↓ 1 callers
Method
Report
Report computes the calibration report for a tenant,
internal/service/calibration.go:26
↓ 1 callers
Function
RequestIDFromContext
RequestIDFromContext returns the request ID from context.
internal/api/middleware/requestid.go:17
↓ 1 callers
Method
ResolveSessionAuth
(ctx context.Context, rawToken string)
internal/api/middleware/auth.go:28
↓ 1 callers
Method
Revoke
Revoke sets revoked_at immediately, invalidating the key on the next request.
internal/domain/stores.go:24
↓ 1 callers
Method
RunDecayForAgent
RunDecayForAgent runs decay for a specific agent
internal/service/decay.go:553
↓ 1 callers
Method
RunStats
(ctx context.Context)
internal/service/learning.go:125
↓ 1 callers
Method
ScrubAnchorEntity
ScrubAnchorEntity erases the subject entity's identity in place: name, aliases, metadata, external id and embedding are cleared (the row remains for a
internal/store/memory.go:361
↓ 1 callers
Function
ServerAddr
()
internal/config/config.go:163
↓ 1 callers
Function
SessionTTLHours
SessionTTLHours is how long a console session lasts. Default 7 days. A shorter lifetime narrows the window during which a stolen session token is usab
internal/config/config.go:226
↓ 1 callers
Method
SetCalibrationService
(cs *service.CalibrationService)
internal/api/handlers/cognitive.go:29
↓ 1 callers
Method
SetConfidenceService
(cs *service.ConfidenceService)
internal/api/handlers/cognitive.go:25
↓ 1 callers
Method
SetContradictionStore
(cs domain.ContradictionStore)
internal/service/memory.go:191
↓ 1 callers
Method
SetEpisodeMemoryUsageStore
(store domain.EpisodeMemoryUsageStore)
internal/service/learning.go:60
↓ 1 callers
Method
SetGraphBuilder
(gb GraphBuilder)
internal/service/memory.go:261
↓ 1 callers
Method
SetGraphStore
SetGraphStore sets the graph store for edge decay and pruning.
internal/service/consolidation.go:126
↓ 1 callers
Method
SetInterval
SetInterval sets the consolidation interval.
internal/service/consolidation.go:117
↓ 1 callers
Method
SetMemoryStore
(ms domain.MemoryStore)
internal/service/episode.go:57
↓ 1 callers
Method
SetMutationLogStore
(mls domain.MutationLogStore)
internal/service/decay.go:105
↓ 1 callers
Method
SetMutationLogStore
(mls domain.MutationLogStore)
internal/service/memory.go:195
↓ 1 callers
Method
SetMutationLogStore
(mls domain.MutationLogStore)
internal/service/implicit_feedback.go:33
↓ 1 callers
Method
SetPlan
SetPlan sets the plan directly without Razorpay (manual/enterprise contracts).
internal/domain/billing.go:89
↓ 1 callers
Method
SetPolicyEnforcer
(pe PolicyEnforcer)
internal/service/memory.go:257
↓ 1 callers
Method
SetRazorpayCustomer
SetRazorpayCustomer records the Razorpay customer id seen on a webhook.
internal/domain/billing.go:85
↓ 1 callers
Method
SetSessionStore
(ss domain.SessionStore)
internal/service/hybrid_recall.go:37
↓ 1 callers
Method
SetSessionStore
SetSessionStore enables the session-memory expiry sweep (optional).
internal/service/expirer.go:28
↓ 1 callers
Method
SetSettingsStore
SetSettingsStore wires per-tenant engine tuning. When set, BatchDecay uses the tenant's configured decay rate / floor / archive threshold / competitio
internal/service/decay.go:112
↓ 1 callers
Method
SetSettingsStore
SetSettingsStore wires per-tenant engine tuning. When set, Reinforce/Penalize use the tenant's configured log-odds deltas instead of the service defau
internal/service/confidence.go:73
↓ 1 callers
Method
SetUnitOfWork
(uow *store.UnitOfWork)
internal/service/decay.go:152
↓ 1 callers
Method
SetUnitOfWork
(uow *store.UnitOfWork)
internal/service/feedback.go:41
↓ 1 callers
Method
SetUnitOfWork
(uow *store.UnitOfWork)
internal/service/learning.go:72
↓ 1 callers
Method
SetUnitOfWork
(uow *store.UnitOfWork)
internal/service/memory.go:206
↓ 1 callers
Method
ShouldQuarantine
ShouldQuarantine decides whether an incoming write must be held by the firewall. An explicit caller flag always quarantines (e.g. content from an untr
internal/domain/settings.go:44
↓ 1 callers
Method
SnapshotAsOf
SnapshotAsOf reconstructs what the agent believed at `at` (transaction time).
internal/service/console.go:105
↓ 1 callers
Method
Start
Start begins the background consolidation worker.
internal/service/consolidation.go:131
↓ 1 callers
Function
Stdio
This is the transport used by Claude Desktop and most local MCP hosts.
mcp/transports/stdio.go:16
↓ 1 callers
Method
Stop
()
internal/service/learning.go:107
↓ 1 callers
Method
Stop
Stop gracefully stops the tuner, cancelling any in-flight run.
internal/service/tuner.go:90
↓ 1 callers
Method
Stop
Stop gracefully stops the expirer, cancelling any in-flight sweep.
internal/service/expirer.go:74
↓ 1 callers
Function
TrustProxyHeaders
TrustProxyHeaders controls whether client-IP headers (X-Real-IP / X-Forwarded-For) are honored. Default false: on a directly-exposed server those head
internal/config/config.go:244
↓ 1 callers
Method
UpdateGoal
UpdateGoal updates the current goal in working memory.
internal/service/working_memory.go:767
↓ 1 callers
Method
UpdateSubscriptionPlan
UpdateSubscriptionPlan changes the plan on an existing subscription in place. When atCycleEnd is true the change applies at the end of the current bil
internal/billing/razorpay.go:122
↓ 1 callers
Method
UpdateValidation
(ctx context.Context, id uuid.UUID)
internal/domain/stores.go:340
↓ 1 callers
Function
ValidEvidenceType
(e string)
internal/domain/memory.go:45
↓ 1 callers
Method
VerifyChain
VerifyChain walks the tenant's audit hash chain in the DB and reports whether it is intact, how many rows verified, the first broken seq (nil if intac
internal/store/learning.go:191
↓ 1 callers
Method
Write
(b []byte)
internal/api/middleware/logging.go:26
↓ 1 callers
Method
WriteHeader
(code int)
internal/api/middleware/quota.go:18
↓ 1 callers
Function
acceptJSON
(r *http.Request)
internal/api/metrics_test.go:74
↓ 1 callers
Function
activateContextHandler
(c *Client)
mcp/tools.go:982
↓ 1 callers
Function
activateContextTool
─── working memory, schemas, knowledge graph ─────────────────────────────────
mcp/tools.go:970
↓ 1 callers
Method
activateFromCues
activateFromCues activates memories based on semantic similarity to cues.
internal/service/working_memory.go:207
↓ 1 callers
Method
activateFromGoal
activateFromGoal activates memories relevant to the current goal.
internal/service/working_memory.go:283
↓ 1 callers
Method
activateFromSchema
activateFromSchema activates memories related to an active schema.
internal/service/working_memory.go:408
↓ 1 callers
Method
activateRecent
activateRecent activates recently accessed memories.
internal/service/working_memory.go:451
↓ 1 callers
Method
analyzeFailurePatterns
analyzeFailurePatterns identifies common patterns in failed episodes.
internal/service/metacognitive.go:456
↓ 1 callers
Method
applyFeedbackEffect
(ctx context.Context, f *domain.Feedback, memory *domain.Memory, effect domain.FeedbackEffect)
internal/service/feedback.go:90
↓ 1 callers
Method
applyForgetting
(ctx context.Context, agentID uuid.UUID, tenantID uuid.UUID, fullPrune bool)
internal/service/consolidation.go:795
↓ 1 callers
Method
applyOutcomeEffect
(ctx context.Context, tenantID uuid.UUID, memID uuid.UUID, effect domain.FeedbackEffect, feedbackType domain.F
internal/service/learning.go:215
↓ 1 callers
Method
applyStatus
applyStatus flags a payment-trouble state (pending/halted) without changing the plan, so quota stays enforced while Razorpay retries collection.
internal/api/handlers/billing.go:359
↓ 1 callers
Function
assessConfidenceHandler
(c *Client)
mcp/tools.go:725
↓ 1 callers
Function
assessConfidenceTool
()
mcp/tools.go:721
↓ 1 callers
Method
assessSourceReliability
assessSourceReliability returns a reliability factor based on memory source.
internal/service/metacognitive.go:222
↓ 1 callers
Function
auditIntegrityResource
(client *Client)
mcp/resources.go:111
↓ 1 callers
Function
buildDecayMutation
(mem *domain.Memory, dr *DecayResult, flagged bool)
internal/service/decay.go:156
↓ 1 callers
Method
calculateOverallHealthScore
calculateOverallHealthScore computes a 0-1 health score.
internal/service/metacognitive.go:609
↓ 1 callers
Method
calculateRecencyFactor
calculateRecencyFactor computes the recency decay factor.
internal/service/metacognitive.go:192
↓ 1 callers
Method
calculateReinforcementFactor
calculateReinforcementFactor computes bonus from reinforcement.
internal/service/metacognitive.go:209
↓ 1 callers
Method
calculateUncertaintyLevel
calculateUncertaintyLevel computes the overall uncertainty 0-1.
internal/service/metacognitive.go:348
↓ 1 callers
Function
calibrationResource
(client *Client)
mcp/resources.go:97
↓ 1 callers
Method
clearSessionCookie
(w http.ResponseWriter)
internal/api/handlers/auth.go:37
↓ 1 callers
Function
clientIP
clientIP keys the limiter on the connection's remote address. Any proxy-supplied client IP must come via r.RemoteAddr (chi's RealIP is mounted only wh
internal/api/middleware/ratelimit.go:90
↓ 1 callers
Method
clusterMemories
clusterMemories groups memories by semantic similarity.
internal/service/schema.go:307
↓ 1 callers
Method
composedRecall
(ctx context.Context, req domain.HybridRecallRequest, embedding []float32, base domain.RecallOpts)
internal/service/hybrid_recall.go:178
↓ 1 callers
Function
consolidateHandler
(c *Client)
mcp/tools.go:777
↓ 1 callers
Function
consolidateTool
()
mcp/tools.go:770
↓ 1 callers
Method
contradictionDelta
(ctx context.Context, tenantID uuid.UUID)
internal/service/confidence.go:89
↓ 1 callers
Function
cosineSimilarity
cosineSimilarity computes the cosine similarity between two equal-length vectors. Returns 0 if either vector is zero-length or they have different dim
internal/service/contradiction/embedding_detector.go:132
↓ 1 callers
Function
cosineSimilarity
(a, b []float32)
internal/store/memory.go:780
↓ 1 callers
Function
countMastered
(learned map[string]int)
examples/03_benchmark_mistake_reduction/main.go:121
↓ 1 callers
Function
countsTowardLearning
ComputeLearningStats computes and stores learning statistics for an agent over a time period. countsTowardLearning reports whether a mutation type ref
internal/service/learning.go:297
↓ 1 callers
Function
createAgent
API
examples/01_learning_agent/main.go:110
↓ 1 callers
Function
createAgent
API
examples/02_memory_evolution_demo/main.go:200
↓ 1 callers
Function
createAgent
API
examples/03_benchmark_mistake_reduction/main.go:178
↓ 1 callers
Function
createAgentHandler
(c *Client)
mcp/tools.go:893
↓ 1 callers
Function
createAgentTool
─── agents & canon ──────────────────────────────────────────────────────────
mcp/tools.go:886
↓ 1 callers
Function
createAnchorHandler
(c *Client)
mcp/tools.go:798
↓ 1 callers
Function
createAnchorTool
─── multi-subject (anchors) ─────────────────────────────────────────────────
mcp/tools.go:789
↓ 1 callers
Method
createAssociations
createAssociations finds similar episodes and creates associations.
internal/service/episode.go:165
↓ 1 callers
Method
createEpisodeAssociations
createEpisodeAssociations creates cross-memory associations for an episode.
internal/service/consolidation.go:340
↓ 1 callers
Function
createOrg
(name: string)
console/src/auth.tsx:66
↓ 1 callers
Function
createSessionHandler
(c *Client)
mcp/tools.go:857
← previous
next →
601–700 of 2,051, ranked by callers